2013-01-08 07:39 PM
I have been working for a couple of weeks trying to simulate a simple assembly program using Keil uVision 4. I have tried the Cortex M3 for a target and I have tried a few of the STM32F10x devices for the target, particularly the STM32F103RC. All with the same results. The program builds with only one warning:
Test3.sct(8): warning: L6314W: No section matches pattern *(InRoot$$Sections). When I run the program the program starts execution at 0x0, but the code is at 0x8000000 where it is supposed to be according to the default Read/Only Memory section. What needs to be done to execute at the instructions?AREA RESET, CODE, READONLY
ENTRY
start MOV r0, #3
MOV r1, #7
ADD r2, r1, r0
loop B loop
END
#assembly-language #arm-cortex-m3 #cross-post
2013-01-09 05:13 AM
Sounds like your scatter file isn't right. Can't you use an startup_stm32f1xx.s and example project from the firmware library as a starting point?
Also the core doesn't start executing code at 0x08000000, it loads a stack pointer (SP) followed by a program counter (PC), from the two 32-bit words starting at 0x08000000 You'd need something like dcd 0x20002000 dcd start start:2013-01-10 10:18 PM