Question: ; Load Constant Definitions #include core _ cm 4 _ constants.s ; Load STM 3 2 L 4 7 6 xx Constants #include

; Load Constant Definitions
#include "core_cm4_constants.s"
; Load STM32L476xx Constants
#include "stm32l476xx_constants.s"
; Green LED <--> PA.5
LED_PIN EQU 5
AREA main, CODE, READONLY
EXPORT __main ; make __main visible to linker
ENTRY
__main PROC
; Enable the clock to GPIO Port A
LDR r0,=RCC_BASE
LDR r1,[r0, #RCC_AHB2ENR_OFFSET]
ORR r1, r1, #(1<< RCC_AHB2ENR_GPIOAEN_Pos) ; Enable GPIO Port A clock
STR r1,[r0, #RCC_AHB2ENR_OFFSET]
; MODE: 00: Input mode, 01: General purpose output mode
; 10: Alternate function mode, 11: Analog mode (reset state)
LDR r0,=GPIOA_BASE
LDR r1,[r0, #GPIO_MODER_OFFSET]
BIC r1, r1, #(3<<(2* LED_PIN)) ; Clear mode bits for PA5
ORR r1, r1, #(1<<(2* LED_PIN)) ; Set mode bits to output for PA5
STR r1,[r0, #GPIO_MODER_OFFSET]
; Set pin PA5 output data register to high to turn on the LED
LDR r1,[r0, #GPIO_ODR_OFFSET]
ORR r1, r1, #(1<< LED_PIN) ; Set bit for PA5
STR r1,[r0, #GPIO_ODR_OFFSET]
stop B stop ; dead loop & program hangs here
ENDP
ALIGN
AREA myData, DATA, READWRITE
ALIGN
array DCD 1,2,3,4
END why does it say invalid line start at the 2 include lines

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!