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 26 00000000 EXPORT main 27 00000000 28 00000000 ;******************************************************* ************************ 29 00000000 30 00000000 31 00000000 ;******************************************************* ************************ 32 00000000 AREA mesdonnees, data, readwrite 33 00000000 34 00000000 35 00000000 36 00000000 37 00000000 ;******************************************************* ************************ 38 00000000 39 00000000 AREA moncode, code, readonly 40 00000000 41 00000000 42 00000000 43 00000000 ;******************************************************* ************************ 44 00000000 ; On eteint la LED 45 00000000 ;******************************************************* ************************ 46 00000000 Eteint_LED PROC 47 00000000 48 00000000 E92D 1001 PUSH {R12,R0} ;On stocke R12 dans R0 49 00000004 F8DF C038 LDR R12,=GPIOBASEB ;On recupère l'a dresse de base 50 00000008 F44F 6580 MOV R5,#(0x01 << 10) ;1 décalé de 1 0 dans R5 51 0000000C F8AC 5014 STRH R5,[R12,#OffsetReset] ;On stock e la variable R5 à l'adresse 0x0X40010 C14 (reset) 52 00000010 E8BD 1001 POP {R12,R0} ;On restitue R12 da ns R0 53 00000014 4770 BX LR ;Retour 54 00000016 ;LDR R5,[R12,#0x0C] ;Valeur à l'adresse de l'output 55 00000016 ;AND R5, R5,#~(0x01 << 10) ;OU LOGIQUE pour calculer la valeur a mettre dans l'output 56 00000016 ;STRH R5,[R12,#0x0C] ;Etat du port B (R5) stocké dans l'output 57 00000016 ENDP 58 00000016 59 00000016 ;******************************************************* ************************ 60 00000016 ; On allume la LED 61 00000016 ;******************************************************* ************************ 62 00000016 Allume_LED PROC 63 00000016 64 00000016 E92D 1001 PUSH {R12,R0} ;On stocke R12 dans R0 ARM Macro Assembler Page 4 65 0000001A F8DF C024 LDR R12,=GPIOBASEB ;On recupère l'a dresse de base 66 0000001E F44F 6580 MOV R5,#(0x01 << 10) ;1 décalé de 1 0 dans R5 67 00000022 F8AC 5010 STRH R5,[R12,#OffsetSet] ;On stocke la variable R5 à l' adresse 0x0X40010C1 0 (set) 68 00000026 E8BD 1001 POP {R12,R0} ;On restitue R12 da ns R0 69 0000002A 4770 BX LR ;Retour 70 0000002C ;LDR R5,[R12,#0x0C] ;Valeur à l'adresse de l'output 71 0000002C ;ORR R5, R5,#(0x01 << 10) ;OU LOGIQUE pour calculer la v aleur a mettre dans l'output 72 0000002C ;STRH R5,[R12,#0x0C] ;Etat du port B (R5) stocké dans l'output 73 0000002C 74 0000002C ENDP 75 0000002C 76 0000002C 77 0000002C ;******************************************************* ************************ 78 0000002C ; Procédure principale et point d'entrée du projet 79 0000002C ;******************************************************* ************************ 80 0000002C main PROC 81 0000002C ;******************************************************* ************************ 82 0000002C 83 0000002C 84 0000002C F04F 0000 MOV R0,#0 ; 85 00000030 F7FF FFFE BL Init_Cible ; 86 00000034 Boucle 87 00000034 F7FF FFFE BL Allume_LED 88 00000038 F7FF FFFE BL Eteint_LED 89 0000003C E7FA B Boucle 90 0000003E 91 0000003E E7FE B . ; boucle inifinie t erminale... 92 00000040 93 00000040 94 00000040 95 00000040 96 00000040 ENDP 97 00000040 98 00000040 END 40010C00 Command Line: --debug --xref --diag_suppress=9931 --cpu=Cortex-M3 --apcs=interw ork --depend=.\objects\principale.d -o.\objects\principale.o -I.\RTE\Device\STM 32F107VC -I.\RTE\_R_el -IC:\Programdata\Keil\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Co re\Include -IC:\Programdata\Keil\Arm\Packs\Keil\STM32F1xx_DFP\2.3.0\Device\Incl ude --predefine="__EVAL SETA 1" --predefine="__MICROLIB SETA 1" --predefine="__ UVISION_VERSION SETA 534" --predefine="_RTE_ SETA 1" --predefine="STM32F10X_CL SETA 1" --predefine="_RTE_ SETA 1" --predefine="STM32F10X_CL SETA 1" --list=.\l istings\principale.lst Principale.asm ARM Macro Assembler Page 1 Alphabetic symbol ordering Relocatable symbols mesdonnees 00000000 Symbol: mesdonnees Definitions At line 32 in file Principale.asm Uses None Comment: mesdonnees unused 1 symbol ARM Macro Assembler Page 1 Alphabetic symbol ordering Relocatable symbols Allume_LED 00000016 Symbol: Allume_LED Definitions At line 62 in file Principale.asm Uses At line 87 in file Principale.asm Comment: Allume_LED used once Boucle 00000034 Symbol: Boucle Definitions At line 86 in file Principale.asm Uses At line 89 in file Principale.asm Comment: Boucle used once Eteint_LED 00000000 Symbol: Eteint_LED Definitions At line 46 in file Principale.asm Uses At line 88 in file Principale.asm Comment: Eteint_LED used once main 0000002C Symbol: main Definitions At line 80 in file Principale.asm Uses At line 26 in file Principale.asm Comment: main used once moncode 00000000 Symbol: moncode Definitions At line 39 in file Principale.asm Uses None Comment: moncode unused 5 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 At line 49 in file Principale.asm At line 65 in file Principale.asm 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 ARM Macro Assembler Page 2 Alphabetic symbol ordering Absolute symbols Symbol: MaskSerial_In1 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 At line 51 in file Principale.asm Comment: OffsetReset used once OffsetSet 00000010 Symbol: OffsetSet Definitions At line 29 in file REG_UTILES.inc Uses At line 67 in file Principale.asm Comment: OffsetSet used once SCB_VTOR E000ED08 Symbol: SCB_VTOR Definitions At line 43 in file REG_UTILES.inc ARM Macro Assembler Page 3 Alphabetic symbol ordering Absolute symbols Uses 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 Init_Cible 00000000 Symbol: Init_Cible Definitions At line 23 in file Principale.asm Uses At line 85 in file Principale.asm Comment: Init_Cible used once |Lib$$Request$$armlib| 00000000 Symbol: |Lib$$Request$$armlib| Definitions At line 16 in file Principale.asm Uses None Comment: |Lib$$Request$$armlib| unused 2 symbols 364 symbols in table