Question
AREA |.text|, CODE, READONLY, ALIGN=2 ;THUMB EXPORT start start GPIOD_DIR EQU 0x4002C000 GPIOD_DATA EQU 0x4002C3FC main MOV R4,#0 LDR R0, =GPIOD_DIR ; Address GPIO Port
AREA |.text|, CODE, READONLY, ALIGN=2 ;THUMB EXPORT start start GPIOD_DIR EQU 0x4002C000 GPIOD_DATA EQU 0x4002C3FC
main MOV R4,#0 LDR R0, =GPIOD_DIR ; Address GPIO Port D (GPIOD_DIR) MOV R1, #0x00000002 ; Set PD1 as input, leave other bits unchanged STR R1, [R0]
MOV R0, #17 ; GPIO Port D pin 0 (PDO) as output MOV R1, #1 STR R1, [R0] MOV R3, #0 loop MOV R1, #1; PDO high STR R1, [R0] MOV R2, #0 ;delay for 10 us delay ADD R2, R2, #1 CMP R2, #200 BLO delay MOV R1, #0 STR R1, [R0]
; PD1 LDR R0, =GPIOD_DATA ; Address of GPIO Port D data register (GPIOD_DATA) LDR R1, [R0] AND R1, R1, #0x00000002 ; Extract the value of PD1
CMP R1, #0 ;wait for PD1 to go high BEQ loop
MOV R2, #0 ; reset time timer ADD R2, R2, #1 ;increment timer CMP R2, #255 ;check if timer has reached 255 BLO timer
; Set PD1 low LDR R0, =GPIOD_DATA ; Address of GPIO Port D data register (GPIOD_DATA) MOV R1, #0x00000002 ; Set PD1 low, leave other bits unchanged STR R1, [R0]
LDR R0, [R4] ; load address of distance into r0 MOV R0, #0 ;store timer value in distance STR R2, [R0] ;set return value to 0 (success) BX LR ;return ALIGN END
I am getting this error when I run the code. What is the solution?
.\Objects\labdeneme.axf: Error: L6218E: Undefined symbol Start (referred from startup_tm4c123.o). Not enough information to list image symbols. Not enough information to list load addresses in the image map. Finished: 2 information, 0 warning and 1 error messages. ".\Objects\labdeneme.axf" - 1 Error(s), 0 Warning(s). Target not created. Build Time Elapsed: 00:00:00
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started