Hello,
First off, the tools I'm using:
SYS/BIOS 6.32.2.39
XDCtools 3.22.1.21
CCS 4.2.4.00033
Using a Stellaris LM3S9D92 part on a custom board
I've been working on a custom "boot" application that will always run on board power-up. The basic idea is as follows:
After power-up it will check some address in flash among other things (checksum of code, etc.) and make a decision on whether or not it should run the "main" application. If the main code does not run then the "boot" code will continue execution and should allow main code to be programmed over ethernet. The "main" application will be a different bin file linked to a seperate section of flash than the bootloader). Both the "boot" and "main" applications will use SYS/BIOS. Side note, I would like to program this logic in c. I have two questions about this:
1. In order to "jump" to the main application from boot should I just call a function (using a function pointer) to the location of the main code's reset handler? Or is there some other clean-up that needs to be done first? For example: (*((void (*)(void))(*(unsigned long *)0x00020004)))();
2. I noticed that the generated linker cmd file for SYS/BIOS apps is always placing the ".resetVecs" section to location 0x0 in flash. Is it possible to override this and set it to some other known address so that both my boot and main code vector tables can coexist in flash?
Thanks,
Mike