Generated Srec file has wrong only 16bit address

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

Generated Srec file has wrong only 16bit address

Jump to solution
6,876 Views
KARTHKSARODE
Contributor III

Hi team 

I was generating Srec file , everytime we build a project (Enabled create flash image checkbox in project settings)

So I was able to generate Srec file , everytime a build is done 

But the problem is it is creating only 16bit address , Srec file (PFA)

Please let me know if I have to modify any items in settings tab

 

Screenshot (40).png

 

Best Regards

Karthik SV

 

 

Best Regards
KARTHIK SV
Tags (1)
0 Kudos
Reply
1 Solution
6,799 Views
RadekS
NXP Employee
NXP Employee

Hello KARTHIK SV,

You may also modify the behavior of objcopy command by the appropriate options.

The "--srec-len=xx" allows configuring the length of S-records.

The "--srec-forceS3" allows selecting 32bit addresses in generated S-records.

Please edit the project properties, go to section Standard S32DS Create Flash Image -> General and add these options into the Other flags field.

For example:

image.png

Note: do not forget to clean the project before the next build.

I hope it helps you.

Best regards

Radek

View solution in original post

0 Kudos
Reply
4 Replies
6,842 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi Karthik,

I just tested it.

The S32DS selects the S-record type based on the linker file.

If it fits within to the 16bit address space, it will create an s-record with 16bit addressing.

 

You can add the following to the linker file, and it should generate a 32bit-address s-record:

danielmartynek_0-1639060130098.png

danielmartynek_1-1639060177109.png

danielmartynek_0-1639393633583.png

 

Regards,

Daniel

 

 

 

 

 

0 Kudos
Reply
6,819 Views
KARTHKSARODE
Contributor III

Hi

Please find the modified linker file & generated srec file 

Let me know if there is any error in linker file 

 

Note : To upload here , I have modified those file as .txt file

 

Regards

KARTHIK SV

Best Regards
KARTHIK SV
0 Kudos
Reply
6,822 Views
KARTHKSARODE
Contributor III

Hi Daniel

I tried doing the same thing , what you have suggested !! 

Once build is done , I can see the MEMORY Section m_dfash created in .map file

But Srec still has 16 bit address , not 32 bit address 

Note : I have modified the S32K1xx_flash.ld linker file

Please let me know , if i have to make changes in linker file 

 

Regards

KARTHIK SV

Best Regards
KARTHIK SV
0 Kudos
Reply
6,800 Views
RadekS
NXP Employee
NXP Employee

Hello KARTHIK SV,

You may also modify the behavior of objcopy command by the appropriate options.

The "--srec-len=xx" allows configuring the length of S-records.

The "--srec-forceS3" allows selecting 32bit addresses in generated S-records.

Please edit the project properties, go to section Standard S32DS Create Flash Image -> General and add these options into the Other flags field.

For example:

image.png

Note: do not forget to clean the project before the next build.

I hope it helps you.

Best regards

Radek

0 Kudos
Reply