cancel
Showing results for 
Search instead for 
Did you mean: 

bootloader jump to application not working

prashanth.mohan22
Associate III

Hi,

Kindly Refer the attachments.

Can you figure am I doing something wrong on jump to application program? (refer main.c)

Here, the code is flashed in address 0x00008000 as expected, but jump to application is not done. The flash area of the actual PIT program as well, starts from 0x00008000, so I presume, there shouldn't be a problem. (refer flash.png

But the program counter points to 0x400003B0, which is a RAM area. (refer PC.png)

Could you please help me in,

  1. Performing Jump to Application program
  2. Relocating vector table to point the interrupts to the application program

Best Regards,

Prashanth Mohan

This discussion has been locked for participation. If you have a question, please start a new topic in order to ask your question
1 REPLY 1
zambrano.luigi
Senior III

Hi,

checking your main, I guess you know SPC5Studio tool. In attachment you can find a project designed for Bolero B Discovery that shows you how to download a binary application (simple PIT test application that blinks 2 leds) in the flash memory at the address 0x00010000 and then jumps to it, starting the execution. When you want to jump to a test application, you have to consider that:

  1. The first bytes of a test application are the Boot Sector Structure (please, refer to the Reference Manual for more details). For Bolero the fields of the Boot Sector Structure are
    1. Boot ID (0x015A0000)
    2. Reset Address (the address of the first location containing the application code). In your example, this field is equal to 0x00008008. This means that you have to jump directly to this address to find the first instruction of the PIT test application.
  2. Before the jump, the core must be moved in DRUN mode (this because the clock initialization containing in the PIT test application will re-initialize the core starting from the default configuration) and all active peripherals must be stopped.

NOTE: for more details of the test application, please refer to the readme.txt file included in the project.

Best Regards,

Luigi