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.
I'm working on a project where I need to upload the firmware from CAN BUS line ( automotive application ) . I must do it using the BOOTOLOADER started in "CAN Mode" . My problem is how to say to uVision to compile the code and link it for PRAM destination , and say to uVision to upload it on PRAM other than intenal FLASH . Do anyone already worked on similar project ?
Thanks
I am not sure how to make the ULINK recognized that you want the VECSEG to be initialized to 0xE0. Additionally you are not allowed to debug (JTAG) while one of the bootloader modes is active (Chip restriction).
So I assume you want to debug your CAN BSL code?
If so, I would recommend that you make an addition but very short program in the internal Flash that sets the VECSEG to 0xE00000 and simply jumps there. This just makes sure that the hardware is in the proper state for your code that is running in the PRAM. Make sure you set NOVECTAB in the linker control.
Here is an example of the jump program.
$MODV2 $SEGMENTED NAME ?C_STARTUP PUBLIC ?C_STARTUP Model LIT 'NEAR' ?C_MAINREGISTERS REGDEF R0 - R15 ?C_STARTUP_CODE SECTION CODE 'ICODE' VECSEG DEFR 0FF12H ?C_RESET PROC TASK C_STARTUP INTNO RESET = 0 ?C_STARTUP: LABEL Model DISWDT ; Disable watchdog timer MOV VECSEG,#0E0h ; change reset vector after a reset JMPS #0E0h,#0000h ; jump to pram ?C_RESET ENDP ?C_STARTUP_CODE ENDS END
For the program (another project) that you want to run in the PRAM simply uncheck the use ONCHIP ROM and define a ROM memory at 0xE00000 with size of 0x800. Then add to the linker control VECSEC(0xE00000). In the "debug" options under "settings" change the startup to load the application into RAM. You don't load any flash driver.
Hope this helps. -Chris
Thank You . Your suggestion is very fine .
The idea to write a little program on FLASH that JUMP to my application on PSRAM is simple and work well .
Your help , save me a lot of time . I hope to give You suggestion like this to You too in the future .
Thank again