How to download 1 hex file for 2 different codes?

cancel
Showing results for 
Search instead for 
Did you mean: 

How to download 1 hex file for 2 different codes?

903 Views
leekate-b45752
NXP Employee
NXP Employee

Hello Team, 

Is it possible to generate 1 hex file for 2 different address codes?

Or if I generate 2 different hex files, how can I download them according to the different address range for the one device(S32K144)?

Best regards,

Kate Lee

0 Kudos
3 Replies

479 Views
OliverTian
NXP Employee
NXP Employee

Hi, Stan

   I tried 'S32 Design Studio for ARM Version 2018.R1' and 'S32 Design Studio for ARM Version 2.2', elf files could be downloaded successfully as your steps. If changed to Hex or Srec, the console hints that 'it's not a valued execute file'.

   I have to use 'PEmicro ACMP Flash Programmer' to program Hex or Srec.

Regards
Oliver

0 Kudos

498 Views
stanish
NXP Employee
NXP Employee

Hello Kate,

S32DS can generate Intel Hex as a binary output file for the project:

How to convert *.elf to *.hex file 

You can dump the MCU memory block into a binary file in Debug context but currently the intel hex is not supported. 

pastedImage_3.png

If you want to program multiple binary/elf files using P&E/OpenSDA interface you can benefit from "Flash from File" feature:

pastedImage_4.png

or 

pastedImage_7.png

You can create a new Flash configuration from scratch or clone an existing one. Then you can basically add any number of additional files you need to program and browse for any of elf/srec/intel hex.

pastedImage_8.png

You can recognize verification of the multiple address ranges in the GDB Server PEmicro Console.

pastedImage_9.png

Please make sure the binary/elf files do not overlap each other otherwise programming ends up with an error below:

pastedImage_10.png

Hope it helps.

Stan

0 Kudos

498 Views
BlackNight
NXP Employee
NXP Employee

Hi Kate,

>>Is it possible to generate 1 hex file for 2 different address codes?

Intel Hex has address information (see S-Record, Intel Hex and Binary Files | MCU on Eclipse ) included. So you can have multiple address ranges in it with gaps between them. You split up a Hex file any way you want. I using the open source SRecord utility (it supports all kind of formats) do this kind of thing or you can merge/filter any range you want too (see Merging S19 Files | MCU on Eclipse  to get an idea).

I hope this helps,

Erich

0 Kudos