How to force code aligned

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

How to force code aligned

512 Views
jihaohu
Contributor II

hi,

my BootLoader basis on AN4258SW,but i don't want to SRecCvt-GUI, i want to convert s19 record by myself.

realize this function,for example:

from:

S1077F78C2A9C25183
S1057FAAC4A865
S1057FD6C4CC15
S1057FF8C2FEC3

to:

S2247F7F60FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC2A9C251FFFFFFFF1B
S2247F7FA0FFFFFFFFFFFFFFFFFFFFC4A8FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEF
S2247F7FC0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC4CCFFFFFFFFFFFFFFFFAB
S2247F7FE0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC2FEFFFFFFFFFFFF5B

 

I know how to convert the logical/local address to global address,but i don't know how to aligned.

 

thanks a lot for any replie.

best wishes

Labels (1)
0 Kudos
3 Replies

417 Views
BlackNight
NXP Employee
NXP Employee

Hi Jihao,

I recommend you have a look at the open source SRecord utility (see Aligning S19 Records to 64-bit Boundaries). It can be used for all kind of S-Record manipulation. There is a 'pack' option used in the previous article, plus there is a 'fill' option which I used here: CRC Checksum Generation with ‘SRecord’ Tools for GNU and Eclipse.

Here is what I think you can use:

-Output_Block_Size to have a certain length of the lines

-Output_Block_Packing to combine lines

-fill 0xff <start> <end> to fill the gaps with a fill patern

I hope this helps,

Erich

0 Kudos

417 Views
jihaohu
Contributor II

hi Erich,

thanks a lot for your replie,if i want to use the option 1:add special code in the bootloader to deal with this issue,i don't want to use other tool.

how to do this?

Regards,

Jihao

0 Kudos

417 Views
BlackNight
NXP Employee
NXP Employee

Hi Jihao,

then you need to go over a binary file (.bin) and then convert it to an S19 file. The S19 files not contain the unused/filled bytes. I recommend that you use the SRecord tool for what you want to accomplish.

I hope this helps,

Erichh

0 Kudos