Is it possible to load two project in one debug mode to simulate Boot loader and Application simulation
with another system, if you loaded the boot first and the app second, you could debug the app. if you loaded the app first and the boot second, you could debug the boot. I would imagine that, for Keil it would be the same.
Erik
Simulate one of the projects - the one you are not currently debugging.
use the debug "save" command to write a hex file for the appropriate program addresses for the project. Trim this to only the used memory.
Simulate the other project. In the simulator .INI file, "load" the saved hex file.
You may be able to just load the compiler's hex output but you need to insure you don't overwrite the boot / IRQ vectors.
For a uart bootloader, use the map function to connect the simulator's uart to a PC's real uart. This works but you may need to spit bytes out of your reflash software byte by byte with a delay as the simulator ( uvision 3, have not simulated it in v4) tends to miss bytes when they come at it quickly.
Chad
As per ARM architecture during power on it should fetch data from 0x0000 location and load the SP, but when I am going to see in debug mode I can see only LSLS r0,r6,#9 , same thing is Applicable for reset handler also. I am not able to see the handler at location 0x0004.
Configuration for the Boot loader is Flash - Start Address - 0x0000 Length - 0x1000
Configuration for Application is Flash - Start Address - 0x1000 Length - 0x7000
When Boot Loader programs a valid application in flash it will jump to Application i.e. 0x1000 location
/* Load main stack pointer with application stack pointer initial value, stored at first location of application area */ asm volatile("ldr r0, =0x1000"); asm volatile("ldr r0, [r0]"); asm volatile("mov sp, r0"); /* Load program counter with application reset vector address, located at second word of application area. */ asm volatile("ldr r0, =0x1004"); asm volatile("ldr r0, [r0]"); asm volatile("mov pc, r0");
But when we check the location in 0x1000 and 0x1004 instead of branch instruction LSLS instruction is present , please have a look below
0x00001000 0270 LSLS r0,r6,#9rload_rt2_thumb_only (0x000000C8) 0x00001004 0169 LSLS r1,r5,#5rload_rt2_thumb_only (0x000000C8)
please help?
Any help?
Maybe because these are not really instructions, but data?! Did you read the user manual of the Cortex architecture?
Your own words:
/* Load program counter with application reset vector address, located at second word of application area. */
Now you need to make a little lead of faith...
"Leap of faith"
See also: http://www.keil.com/forum/19073