Hi,
I have many version of elf file. How to verify those code with MCU?
And, how to security MCU flash (unable to read)?
Best Regards,
Aaron
Solved! Go to Solution.
Hi Aaron,
If I understood correctly, you want to process how to load elf file into MCU without original project.
Correct?
The simplest way will be creating new project for target MCU derivative.
After that, please open “Target Task” window by menu-Window-Show view-Other-Debug-Target Tasks
Now, you may create new Target Task
Please enter name and select configuration (The configuration was created with our new project). As Task type, select Flash Programmer for S12Z.
Please add Flash Device – separately for Flash and EEPROM (if necessary)
Add Action – Erase/Blank check
I would like to recommend erase whole block. If you program also EEPROM, erase also EEPROM block
Add Action – Program/Verify
Select your elf file and check Restrict to Addresses in this Range if you program Flash and EEPROM separately
You may add also verify commands or enable/disable commends by check buttons on left side.
The Task may be run by special Run Task button.
Optionally you may configure Project Debug Configuration, uncheck Perform Standard Download and add your Task into the list. In this case, the you may start debug session the same was as for standard Project.
Note: The CW10 have also Flash programmer button (blue lightning, Alt+B,F) in Commander window, which will run wizard for configure new Target Task.
The FSEC byte at address 0xFFFE0F should be programmed for secure an MCU. The last two bits SEC[1:0] should differ from 0b10 for enable security feature (recommended is 0b01).
Since S12Z flash contains ECC feature, the additional securing is not trivial task – we have to read last Flash sector, erase them, modify SEC[1:0] bits and program whole sector back.
Some more details about Security feature:
https://community.nxp.com/docs/DOC-93803
If FSEC configuration is not part of original elf file data, the managing security will be probably quite annoying.
In such case, I would like to recommend working with S-record files (contains only NVM data in readable format) and manually edit these files (See attached tool).
The S-record files may be generated by linker directly during building or converted from elf file by burner.exe tool.
I hope it helps you.
Have a great day,
Radek
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Aaron,
If I understood correctly, you want to process how to load elf file into MCU without original project.
Correct?
The simplest way will be creating new project for target MCU derivative.
After that, please open “Target Task” window by menu-Window-Show view-Other-Debug-Target Tasks
Now, you may create new Target Task
Please enter name and select configuration (The configuration was created with our new project). As Task type, select Flash Programmer for S12Z.
Please add Flash Device – separately for Flash and EEPROM (if necessary)
Add Action – Erase/Blank check
I would like to recommend erase whole block. If you program also EEPROM, erase also EEPROM block
Add Action – Program/Verify
Select your elf file and check Restrict to Addresses in this Range if you program Flash and EEPROM separately
You may add also verify commands or enable/disable commends by check buttons on left side.
The Task may be run by special Run Task button.
Optionally you may configure Project Debug Configuration, uncheck Perform Standard Download and add your Task into the list. In this case, the you may start debug session the same was as for standard Project.
Note: The CW10 have also Flash programmer button (blue lightning, Alt+B,F) in Commander window, which will run wizard for configure new Target Task.
The FSEC byte at address 0xFFFE0F should be programmed for secure an MCU. The last two bits SEC[1:0] should differ from 0b10 for enable security feature (recommended is 0b01).
Since S12Z flash contains ECC feature, the additional securing is not trivial task – we have to read last Flash sector, erase them, modify SEC[1:0] bits and program whole sector back.
Some more details about Security feature:
https://community.nxp.com/docs/DOC-93803
If FSEC configuration is not part of original elf file data, the managing security will be probably quite annoying.
In such case, I would like to recommend working with S-record files (contains only NVM data in readable format) and manually edit these files (See attached tool).
The S-record files may be generated by linker directly during building or converted from elf file by burner.exe tool.
I hope it helps you.
Have a great day,
Radek
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Radek,
It's helpful. Thank you very much.
Best Regards,
Aaron