ARM Macro Assembler Page 1 1 00000000 2 00000000 3 00000000 ;******************************************************* ***************** 4 00000000 THUMB 5 00000000 REQUIRE8 6 00000000 PRESERVE8 7 00000000 ;******************************************************* ***************** 8 00000000 9 00000000 include REG_UTILES.inc 1 00000000 2 00000000 ;************************************** 3 00000000 ; Les adresess utiles 4 00000000 ;*************************************** 5 00000000 6 00000000 7 00000000 ;************************************** 8 00000000 ; Affectation des bits GPIO 9 00000000 ;*************************************** 10 00000000 ; GSLCK..... PA0 11 00000000 ; DSPRG..... PA1 12 00000000 ; BLANK..... PA2 13 00000000 ; XLAT...... PA3 14 00000000 ; VPRG...... PA4 15 00000000 ; SCLK...... PA5 16 00000000 ; SIN1...... PA7 17 00000000 ;Capteur.....PA8 18 00000000 19 00000000 ;LED.........PB10 20 00000000 ;****************************************/ 21 00000000 22 00000000 23 00000000 24 00000000 40010800 GPIOBASEA EQU 0X40010800 25 00000000 40010C00 GPIOBASEB EQU 0X40010C00 26 00000000 27 00000000 00000008 OffsetInput EQU 0x08 28 00000000 0000000C OffsetOutput EQU 0x0C 29 00000000 00000010 OffsetSet EQU 0x10 30 00000000 00000014 OffsetReset EQU 0x14 31 00000000 32 00000000 33 00000000 00000080 MaskSerial_In1 equ 0x80 34 00000000 00000080 ARM Macro Assembler Page 2 MaskSerial_Dots equ 0x80 35 00000000 00000010 MaskVprg equ 0x10 36 00000000 00000008 MaskXlat equ 0x08 37 00000000 00000004 MaskBlank equ 0x04 38 00000000 00000020 MaskSclk equ 0x20 39 00000000 00000002 MaskDsprg equ 0x02 40 00000000 00000001 MaskGsclk equ 0x01 41 00000000 42 00000000 43 00000000 E000ED08 SCB_VTOR EQU 0xE000ED08 44 00000000 40012C10 TIM1_SR EQU 0x40012c10 45 00000000 40012C24 TIM1_CNT EQU 0x40012c24 46 00000000 4000082C TIM4_ARR EQU 0x4000082C 47 00000000 40000810 TIM4_SR EQU 0x40000810 48 00000000 49 00000000 50 00000000 51 00000000 52 00000000 53 00000000 END 10 00000000 11 00000000 12 00000000 ;******************************************************* ***************** 13 00000000 ; IMPORT/EXPORT Système 14 00000000 ;******************************************************* ***************** 15 00000000 16 00000000 IMPORT ||Lib$$Request$$armlib|| [CODE, WEAK] 17 00000000 18 00000000 19 00000000 20 00000000 21 00000000 ; IMPORT/EXPORT de procédure 22 00000000 23 00000000 IMPORT Init_Cible 24 00000000 ARM Macro Assembler Page 3 25 00000000 IMPORT Eteint_LED 26 00000000 IMPORT Allume_LED 27 00000000 IMPORT Inverse_LED 28 00000000 29 00000000 IMPORT Set_SCLK 30 00000000 IMPORT Reset_SCLK 31 00000000 IMPORT DriverGlobal 32 00000000 33 00000000 EXPORT main 34 00000000 35 00000000 ;******************************************************* ************************ 36 00000000 37 00000000 38 00000000 ;******************************************************* ************************ 39 00000000 AREA mesdonnees, data, readwrite 40 00000000 41 00000000 42 00000000 43 00000000 44 00000000 ;******************************************************* ************************ 45 00000000 46 00000000 AREA moncode, code, readonly 47 00000000 48 00000000 49 00000000 50 00000000 ;******************************************************* ************************ 51 00000000 ; Procédure principale et point d'entrée du projet 52 00000000 ;******************************************************* ************************ 53 00000000 main PROC 54 00000000 ;******************************************************* ************************ 55 00000000 56 00000000 57 00000000 F7FF FFFE BL Init_Cible ; 58 00000004 ;******************************************************* ************************ 59 00000004 ; ETAPE 2 60 00000004 ;******************************************************* ************************ 61 00000004 F7FF FFFE BL DriverGlobal ; 62 00000008 63 00000008 ;******************************************************* ************************ 64 00000008 ; ETAPE 1 65 00000008 ;******************************************************* ************************ 66 00000008 ; MOV R0,#0; 67 00000008 ; MOV R1,#0; 68 00000008 ; MOV R3,#0; 69 00000008 ;Boucle 70 00000008 ; LDR R12,=GPIOBASEA ;On récup l'adresse du GPIOA 71 00000008 ; LDR R0,[R12,#OffsetInput] ;On charge sa valeur avec l 'OffsetInput 72 00000008 ; AND R0, R0, #(0x01 << 8) ;R0 est masqué pour n'avoir ARM Macro Assembler Page 4 que le bit de l'offset input 73 00000008 ; CMP R0, #(0x01 << 8) ;On compare R0 doit etre egal à 1 pour le front montant 74 00000008 ; BNE Is_detect ;On allume 75 00000008 ; MOV R1,R0 ;R1 possède la valeur de R0 avant 76 00000008 ; BL Boucle ;Sinon on boucle 77 00000008 ; 78 00000008 ;Is_detect 79 00000008 ; CMP R1, #(0x01 << 8) ;R1 doit etre egal à 0 pour le front montant 80 00000008 ; BNE Boucle 81 00000008 ; 82 00000008 ;T_Oui 83 00000008 ; BL Inverse_LED ;On inverse le status de la led gra ce a R3 84 00000008 ; B Boucle 85 00000008 ; 86 00000008 ;******************************************************* ************************ 87 00000008 E7FE B . ; boucle inifinie t erminale... 88 0000000A ENDP 89 0000000A 90 0000000A END Command Line: --debug --xref --diag_suppress=9931,A1950W --cpu=Cortex-M3 --depe nd=.\objects\principale.d -o.\objects\principale.o -I.\RTE\Device\STM32F103RB - I.\RTE\_Simul_ -IC:\Users\alzyo\AppData\Local\Arm\Packs\ARM\CMSIS\5.9.0\CMSIS\C ore\Include -IC:\Users\alzyo\AppData\Local\Arm\Packs\Keil\STM32F1xx_DFP\2.4.0\D evice\Include --predefine="__EVAL SETA 1" --predefine="__MICROLIB SETA 1" --pre define="__UVISION_VERSION SETA 538" --predefine="_RTE_ SETA 1" --predefine="STM 32F10X_MD SETA 1" --predefine="_RTE_ SETA 1" --predefine="STM32F10X_MD SETA 1" --list=.\listings\principale.lst Principale.asm ARM Macro Assembler Page 1 Alphabetic symbol ordering Relocatable symbols mesdonnees 00000000 Symbol: mesdonnees Definitions At line 39 in file Principale.asm Uses None Comment: mesdonnees unused 1 symbol ARM Macro Assembler Page 1 Alphabetic symbol ordering Relocatable symbols main 00000000 Symbol: main Definitions At line 53 in file Principale.asm Uses At line 33 in file Principale.asm Comment: main used once moncode 00000000 Symbol: moncode Definitions At line 46 in file Principale.asm Uses None Comment: moncode unused 2 symbols ARM Macro Assembler Page 1 Alphabetic symbol ordering Absolute symbols GPIOBASEA 40010800 Symbol: GPIOBASEA Definitions At line 24 in file REG_UTILES.inc Uses None Comment: GPIOBASEA unused GPIOBASEB 40010C00 Symbol: GPIOBASEB Definitions At line 25 in file REG_UTILES.inc Uses None Comment: GPIOBASEB unused MaskBlank 00000004 Symbol: MaskBlank Definitions At line 37 in file REG_UTILES.inc Uses None Comment: MaskBlank unused MaskDsprg 00000002 Symbol: MaskDsprg Definitions At line 39 in file REG_UTILES.inc Uses None Comment: MaskDsprg unused MaskGsclk 00000001 Symbol: MaskGsclk Definitions At line 40 in file REG_UTILES.inc Uses None Comment: MaskGsclk unused MaskSclk 00000020 Symbol: MaskSclk Definitions At line 38 in file REG_UTILES.inc Uses None Comment: MaskSclk unused MaskSerial_Dots 00000080 Symbol: MaskSerial_Dots Definitions At line 34 in file REG_UTILES.inc Uses None Comment: MaskSerial_Dots unused MaskSerial_In1 00000080 Symbol: MaskSerial_In1 ARM Macro Assembler Page 2 Alphabetic symbol ordering Absolute symbols Definitions At line 33 in file REG_UTILES.inc Uses None Comment: MaskSerial_In1 unused MaskVprg 00000010 Symbol: MaskVprg Definitions At line 35 in file REG_UTILES.inc Uses None Comment: MaskVprg unused MaskXlat 00000008 Symbol: MaskXlat Definitions At line 36 in file REG_UTILES.inc Uses None Comment: MaskXlat unused OffsetInput 00000008 Symbol: OffsetInput Definitions At line 27 in file REG_UTILES.inc Uses None Comment: OffsetInput unused OffsetOutput 0000000C Symbol: OffsetOutput Definitions At line 28 in file REG_UTILES.inc Uses None Comment: OffsetOutput unused OffsetReset 00000014 Symbol: OffsetReset Definitions At line 30 in file REG_UTILES.inc Uses None Comment: OffsetReset unused OffsetSet 00000010 Symbol: OffsetSet Definitions At line 29 in file REG_UTILES.inc Uses None Comment: OffsetSet unused SCB_VTOR E000ED08 Symbol: SCB_VTOR Definitions At line 43 in file REG_UTILES.inc Uses ARM Macro Assembler Page 3 Alphabetic symbol ordering Absolute symbols None Comment: SCB_VTOR unused TIM1_CNT 40012C24 Symbol: TIM1_CNT Definitions At line 45 in file REG_UTILES.inc Uses None Comment: TIM1_CNT unused TIM1_SR 40012C10 Symbol: TIM1_SR Definitions At line 44 in file REG_UTILES.inc Uses None Comment: TIM1_SR unused TIM4_ARR 4000082C Symbol: TIM4_ARR Definitions At line 46 in file REG_UTILES.inc Uses None Comment: TIM4_ARR unused TIM4_SR 40000810 Symbol: TIM4_SR Definitions At line 47 in file REG_UTILES.inc Uses None Comment: TIM4_SR unused 19 symbols ARM Macro Assembler Page 1 Alphabetic symbol ordering External symbols Allume_LED 00000000 Symbol: Allume_LED Definitions At line 26 in file Principale.asm Uses None Comment: Allume_LED unused DriverGlobal 00000000 Symbol: DriverGlobal Definitions At line 31 in file Principale.asm Uses At line 61 in file Principale.asm Comment: DriverGlobal used once Eteint_LED 00000000 Symbol: Eteint_LED Definitions At line 25 in file Principale.asm Uses None Comment: Eteint_LED unused Init_Cible 00000000 Symbol: Init_Cible Definitions At line 23 in file Principale.asm Uses At line 57 in file Principale.asm Comment: Init_Cible used once Inverse_LED 00000000 Symbol: Inverse_LED Definitions At line 27 in file Principale.asm Uses None Comment: Inverse_LED unused Reset_SCLK 00000000 Symbol: Reset_SCLK Definitions At line 30 in file Principale.asm Uses None Comment: Reset_SCLK unused Set_SCLK 00000000 Symbol: Set_SCLK Definitions At line 29 in file Principale.asm Uses None Comment: Set_SCLK unused |Lib$$Request$$armlib| 00000000 Symbol: |Lib$$Request$$armlib| ARM Macro Assembler Page 2 Alphabetic symbol ordering External symbols Definitions At line 16 in file Principale.asm Uses None Comment: |Lib$$Request$$armlib| unused 8 symbols 365 symbols in table