We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi,
I use a C164 chip (similar to C166). For my project, I'll have a bootloader (witch will be located in 0xC0'0000) and an applicative software (located in 0xC1'0000).
Is it possible to have the following flow chart ?
Start 0xC0'0000 if (A_FLAG_IN_FLASH == VALID_APPLI) Call Applicative_Startup else Call Boot_Startup endif
Boot_Startup and Applicative_Startup are the START_V2.A66 file for each project. They will be for sure different.
I don't find the way to do that in keil s options (move ICODE section to 0xC1'0000 didn't success with the linker, ...)
If you have some tips or application note, it will be great.
thks, Nick.
Thanks for your reply.
I will only use flash boot (no bootstrap via CAN or SSC).
I find this http://www.keil.com/support/docs/2389.htm witch can help me.
For me, execute flash programming functions in RAM is forbidden : I need to be able to run event if a power supply occurs during SW update.
I will investigate with linker options (L166_Locate & L166_Misc tabs) to have the possibility to have 2 startup files into my micro.
Hi np,
your bootloader project looks like similar to my project. I write a C-program that loads an hexfile from the Office-PC to the XC167 via serial-interface. After calculating the Cheksum of the hexfile it will be written to the on-chip flash beginning at address 0xC02000. To run the hexcode from the on-chip flash i had to jump to the main routine, which i located at address 0xC02800. In my project i use the same startup-file for the bootloader and the downloaded application. So I'm not confronted with the problem of to startup files. Problems occurs when i modify the vector segment register and jump to the application-main routine:
PSW_IEN = 0 ; VECSEG=0x00C1; ((void (far *) (void)) 0xC02800) ();
At the address 0xC02800 first the interrupts are activated and an endless loop waits for data from the serial interface. This works good but any other interrupts like timer or IIC don't work.
Please post me when you made similar eperience. Mayb we can compare some notes about this kind of application.
Greetings