Simple assembly programming error
Hello
The topic that I raise has to deal with assembly programming, in particular writing everything with assembler and flashing to a development board. In my case the LM3S1968 (I call it flower power for obvious reasons;) The environment that I have is Keil Uvision3 and I use the DOS assembler located in bin31.
The code, property of J.Yiu is:
StackTop EQU 0x20002000 ; constant for SP starting value AREA Program, CODE, READONLY ; declare area for code DCD StackTop ; Stack top DCD START ; Reset vector ENTRY
START MOV R0, #10 ; Starting loop counter value MOV R1, #0 ; starting result ; Calculated 10+9+8+...+1 LOOP ADD R1, R0 ; R1 = R1 + R0 SUBS R0, #1 ; Decrement R0, update flag (“S” suffi x) BNE LOOP ; If result not zero jump to loop ; Result is now in R1 HERE BAL HERE ; Infinite loop END
Let the assembler directive in command prompt (DOS) to be: C:armasm --li --device=DLM -g --list CN1.list CN1.s and the linker to be: C:armlink --device=DLM --rw_base 0x20000000 --ro_base 0x0 --entry 0x0 -o CN1.elf CN1.o
Now the beautiful error message: L6236E: No section matches selector -no section to be First/Last.
What all this means? According to "ADS error and warnings" I should add the --entry 0x0 in order to indicate the start of my program which I suppose I did. Any suggestions?
Sincerely Chris
login or register to reply
|