Hello Everyone,
I'm building an app with MPC5602P and I need to store some information into dataFlash (Addr : 0x00800000) when programming device.
I've create a new section in .LCF file and putting my data into this section
after compilation data is correctly set in the S-RECCORD file :
But when I'm trying to debug App the same segment seem to be not programming in Codewarrior debug view :
It look like debugger doesn't program DataFlash, Is anybody have an idea about this problem?
Solved! Go to Solution.
Hi Clement,
Debug button programs just the code flash by default.
Anyway you can create a Flash script (called Target Task) and execute it each time your debug session starts:
1) Open Target Task view
2) Add a new Target Task and name it e.g. "MPC5602_dflash"; select "Active Debug Context" as a Run Config.; select Task Type " Flash Programmer for Power Architecture"
3) Add a device - MPC5602P_DATA_FLASH
4) Adjust Base Address to 0x00800000, Target RAM address = 0x40000000; Size = 0x3000; add Program/Verify Action
5) Select generated .elf file from your workspace project, enable "Erase sectors before program" and enter "Restrict to Address in this Range" Start = 0x00800000, End 0x0080FFFF
6) Check that flash action is present in the list of actions
7) Now Enter Debug Configuration and add a task to execute:
8) Select Target Task - the one you just created (MPC5602P_dflash)
9) the task should appear in the list of tasks to execute when code is downloaded into target:
10) press apply and debug - this time your Data flash should be programmed
Similarly you can program e.g. shadow flash.
Hope it helps.
Stan
Hello Stanislav,
Sorry i'm late to answer but your solution work well!!
Thanks a lot
Hi Clement,
Debug button programs just the code flash by default.
Anyway you can create a Flash script (called Target Task) and execute it each time your debug session starts:
1) Open Target Task view
2) Add a new Target Task and name it e.g. "MPC5602_dflash"; select "Active Debug Context" as a Run Config.; select Task Type " Flash Programmer for Power Architecture"
3) Add a device - MPC5602P_DATA_FLASH
4) Adjust Base Address to 0x00800000, Target RAM address = 0x40000000; Size = 0x3000; add Program/Verify Action
5) Select generated .elf file from your workspace project, enable "Erase sectors before program" and enter "Restrict to Address in this Range" Start = 0x00800000, End 0x0080FFFF
6) Check that flash action is present in the list of actions
7) Now Enter Debug Configuration and add a task to execute:
8) Select Target Task - the one you just created (MPC5602P_dflash)
9) the task should appear in the list of tasks to execute when code is downloaded into target:
10) press apply and debug - this time your Data flash should be programmed
Similarly you can program e.g. shadow flash.
Hope it helps.
Stan