Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/11/07 13:49
Read: times


 
#130636 - Reset Vectors
Continuing with my trials of trying to implement multiple applications on one chip...


I've now created a hex file that I believe is compiled to work at a higher memory location (0x4000)

In that hex file I noticed that three bytes are set to be written to Flash Address 0x0000.

Are these three bytes the address used by the processor on reset to locate the execution point on the program?

I though initially that this location was just part of the initially programmed code.

I was planning on selected the code on startup using a condition code of:

((void(code *)(void))0x0000)();
or
((void(code *)(void))0x4000)();

But I now presume that this would fail, as these memory locations aren't the start points of the code.

Can I just write 3 bytes to flash at 0x0000 and perform a standard reset?

Also, are these bytes defined anywhere. I presume bytes 2 & 3 are the jump point, but I don't understand byte 1. (which is set to 0x02 for me)

With the code compiled for upper memory usage... I now presume that I cannot just 'Jump to 0x4000' and expect it to work? Is the correct point to jump to stored in the hex file listed as the three bytes for 0x0000?

List of 4 messages in thread
TopicAuthorDate
Reset Vectors            01/01/70 00:00      
   LJMP opcode            01/01/70 00:00      
   Crossposted in Keil forum            01/01/70 00:00      
   basic information STOP            01/01/70 00:00      

Back to Subject List