S12Z Copy and modify flash when burning

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S12Z Copy and modify flash when burning

1,262 Views
manishsangram
Contributor IV

We are using the S12ZVMC128 MCU.

We want to understand the process of batch burning flash for production, with the following key concerns.

1. We want to set up a bare bone PC to burn the flash to S12Z. 

2. We should not need to use the CW for this. Only a burner utility. Which would this be? 

3. We do not want any debug information or symbols on that PC. We therefore do not want to use the ELF file. We want to understand what would be the most secure file format to use ?

4. After burning, we want to over write some flash address with the date and time from the PC to note when it was flashed along with some batch id etc.

5. We want to write to the WORM section of the device some batch id values

6. We want to COPY contents of some part of flash area to another part of flash area. 

We assume all this can be done using the burner and some scripting may be? but we need serious help on each of the steps mentioned above.

 

We have tried to read lot of documents and the forum but have not come across any proper answer for any of the above points.

Thanks

Manish

0 Kudos
Reply
5 Replies

880 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello Manish,

We don’t support third-party products.
We can help you with questions on the S12Z device itself or CW.
For example, here is a document that describes writing an ID to S12Z using a scritp:
How to get device ID and write program once field without programming application to the S12Z device... 


But if you want to use a third-party product, you can refer to their documentation and contact their support.
You can consider using PEMicro Cyclone that supports scripting and can be used stand-alone 
http://www.pemicro.com/products/product_viewDetails.cfm?product_id=15320165&productTab=2

Regards,
Daniel

0 Kudos
Reply

880 Views
manishsangram
Contributor IV

Hello Daniel,

We are not asking about third party tools. This question is specific to S12Z and CodeWarrior only.

You have tried to answer question 5 but that answer is already known to us as it was also given in response to an earlier query. 

This is VERY important set of questions and someone needs to answer them very carefully. 

 

We want to set up a bare bone PC to burn the flash to S12Z. 

2. We should not need to use the CW for this. Only a burner utility. Which would this be? [EXAMPLE : The burner utility which comes with CW)]

3. We do not want any debug information or symbols on that PC. We therefore do not want to use the ELF file. We want to understand what would be the most secure file format to use ? [EXAMPLE : Whch of the formats supported by the burner utility would be best]

4. After burning, we want to over write some flash address with the date and time from the PC to note when it was flashed along with some batch id etc. [We want to do this from the command line and NOT CW debug shell]

5. We want to write to the WORM section of the device some batch id values [We want to do this from the command line and NOT CW debug shell]

6. We want to COPY contents of some part of flash area to another part of flash area. [Please give and example of how this can be done. ALSO if we do this we would have to make the Chip SECURE after this copy. So how to do that?]

Hope you see that this is not a third party tool question. This is a very important set of questions and EACH one of them needs careful consideration and reply.

Thanks

pachamatej, RadekS, iggi

0 Kudos
Reply

880 Views
RadekS
NXP Employee
NXP Employee

Hi Manish,

Daniel’s answer was based on the misunderstanding. We thought that you don’t want us to CW (burner.exe is part of CW). You probably meant that you don’t want to use CW graphical user interface. Correct?

 

Ad2)

Please look at build utilities documentation in CW. Default path: "c:\Freescale\CW MCU v11.0\MCU\Help\PDF\MCU_Build_Tools_Utilities.pdf"

 

Important for you will be also CodeWarrior Common Features Guide with Flash burner documentation. Default path: "c:\Freescale\CW MCU v11.0\MCU\Help\PDF\CodeWarrior Common Features Guide.pdf"

 

BTW: burner.exe utility just generates files for flashing. It does not program MCU itself. The burner.exe is also not used in standard build toolchain – it is an optional utility.

 

Ad3)

The optimal format for a flash image is S-record file (*.sx or *.s19). It contains only Flash content in the readable format (lines with address and data + checksum).

You may enable generating this file in Linker option (it will generate *.sx file).

 

Ad4, 5, 6)

I am not aware of this functionality in CW10. If it exists, I never use it. Please check the documentation mentioned above. The CW10 contains Flash Programmer plug-in which may help you with such tasks, but I am not sure whether there is also a command-line alternative.

 

I would like note, that CW is not primary designed for programming automatization and command line features are rather limited. The customers typically use Third-party commercial tools for these tasks.


I hope it helps you

Have a great day,
Radek

0 Kudos
Reply

880 Views
manishsangram
Contributor IV

Hello Radek and Daniel,

Yes you got it right, we didn't want to use the Code warrior GUI we were thinking of using command line shell utilities and batch files to program.

Does it make sense to use OSBDM? Do you think it make sense to write our custom application which uses OSBDM libraries to program the S12Z using OSBDM hardwre or PEMicro Multilink for example? 

0 Kudos
Reply

880 Views
RadekS
NXP Employee
NXP Employee

Hi Manish,

The old CW for HC(S)12(X) was built on using utilities over command line and own GUI on top of that. Part of this functionality propagates also into CW 10 with Eclipse IDE, but not all of them.

 

The OSBDM is the right choice for an embedded debugger on board. However, I am not sure whether it is the right choice for serial production.

The time is money. So, the more expensive and faster debugger may be worth for series production. Additionally, you will get a warranty.

For small series, the programmers like PEmicro Cyclone (formerly CyclonePro) should be a better option – just connect MCU a press single button on Cyclone for execution of the predefined procedure.

For bigger series, more Cyclones may be connected in a parallel way. The libraries for programming automated system are also available.

 

The decision is on your side, but, from my point of view, the bending CW10 for automated production may be a quite risky way. However, I am not a deep expert on CodeWarrior. Maybe you will get better answers in CodeWarrior Development Tools space.


I hope it helps you

Have a great day,
Radek

0 Kudos
Reply