cancel
Showing results for 
Search instead for 
Did you mean: 

BootLoader_Configuration

baskar
Associate II
Posted on July 08, 2016 at 07:12

application

(10K) is working  in the first part of memory 

sector-0

 as follows.

1. sector-0 ( 0x00000000–0x00007FFF)

2. sector-1 ( 0x00008000–0x0000BFFF)

3. sector-2 ( 0x0000C000–0x0000FFFF)

4. sector-3 (0x00010000–0x00017FFF)

We want to load new code in the 

sector-2

 (0x0000C000–0x0000FFFF) and run the application after restart.

So, how to 

configure 

the 

boo

t sector

 to run the new application from sector -2.
This discussion has been locked for participation. If you have a question, please start a new topic in order to ask your question
4 REPLIES 4
procolo
Senior
Posted on July 08, 2016 at 10:33

Hi,

For SPC560B50 please go to Platform Component -->Runtime Setting  and select 0x0000C000 as Load Address.

Plese, consider that:

  • Due to a bug, when programming to 0x0000C000 it will fill with  0x00 all memory location from 0x00000000 to 0x0000C000. to overcome this issue (that will be solved in the next release scheduled by the end of this month) you can first program the application to 0x0000C000 and the the other to 0x00000000
  • If there are both application to 0x00000000 and 0x0000C000, at startup the code executed will be the one stored in 0x00000000

Regards,

Procolo

baskar
Associate II
Posted on July 08, 2016 at 11:20

Hi Procolo,

Thank for you suggestion,

Currently the application code is running in sector-0.

We are loading the new application code into sector-2 using flash programmer library function.

So, we want to 

configure 

the 

boo

t sector

 to run the new application in sector -2

procolo
Senior
Posted on July 08, 2016 at 11:44

Hi,

First of all my suggestion is to read carefully the Reference manual for RCHW (chapter 6) and the way the MCU is starting.

A possible solution could be to add to application in sector2 a way erase sector 0. 

Actually, you should need only to erase RCHW data structure in sector0. 

Control flow could be then:

1. start in secto 0

2. program sector 2

3. jump to sector 2, right where erasing of sector 0 is.

4. erase sector 0, while executing form sector 2

Then, after a POR, you should start from sector 2 since sector 0 has been erased.

Regards,

Procolo

baskar
Associate II
Posted on July 22, 2016 at 11:10

Thank very much suggestion,

we are implemented and it is working.

We are in completing stage of the project and our application size is  122K.

We want to load new application in different sector 5 or 6,so how to generate the code using spc5 studio.