How to reduce the binary size in S32Z2

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

How to reduce the binary size in S32Z2

Jump to solution
1,270 Views
karthik_nikil
Contributor III

Hello Team,

I am using the NXP S32Z2 Development Board with S32 Design Studio (S32DS). I successfully built the project and generated the .bin file for the Boot Core R52.

However, while creating the Flash Image file, I noticed that the generated .bin file size is very large, and I am facing issues during flash image creation.

Could you please guide me on, Is there any specific linker setting, memory configuration, or optimization option required for S32Z2 Boot Core R52?

 

Screenshot 2026-05-07 092147.png

 

Screenshot 2026-05-07 092216.png

Please help me solve this issue.

Thank you.

Karthik

Tags (2)
0 Kudos
Reply
1 Solution
1,218 Views
Joey_z
NXP Employee
NXP Employee

Hi,karthik_nikil

Thank you for your detail information and reply.

For the demo linker file, it will be padding for no using size from 0x317C0000(DRAM) to 0x321FFFFF(CRAM). Please refer to the patch files for the modification of linker/startup file.

BR

Joey

 

View solution in original post

0 Kudos
Reply
5 Replies
1,200 Views
karthik_nikil
Contributor III

Hi Joey,

Thank you for your support and the patch files.

I modified the linker/startup file as suggested, and now the issue is resolved. It is working correctly.

Thanks again for your help.

BR,
Karthik

0 Kudos
Reply
1,197 Views
Joey_z
NXP Employee
NXP Employee

Hi,karthik_nikil

I am glad to support you.

You can contact us at any time if you have any other question.

BR

Joey

0 Kudos
Reply
1,258 Views
Joey_z
NXP Employee
NXP Employee

Hi,karthik_nikil

Thank you for contacting us.

I have received your question and will help you to check it.

BR

Joey

0 Kudos
Reply
1,246 Views
karthik_nikil
Contributor III
Hi Joey_z,

Thank you for your response.

I would like to provide some additional information regarding the issue.

When I build the example project using the M33 core, the generated output binary size is small (around 800 KB), and I am able to create the Flash Image successfully.

However, when I build the same type of project using the R52 core, the generated binary size becomes very large, and the issue occurs during Flash Image creation.

It seems that the problem happens only with the R52 core build configuration.

Could you please help me identify the reason for this behavior and suggest how to reduce the R52 binary size or properly generate the Flash Image?

Thank you.
Karthik
0 Kudos
Reply
1,219 Views
Joey_z
NXP Employee
NXP Employee

Hi,karthik_nikil

Thank you for your detail information and reply.

For the demo linker file, it will be padding for no using size from 0x317C0000(DRAM) to 0x321FFFFF(CRAM). Please refer to the patch files for the modification of linker/startup file.

BR

Joey

 

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2361543%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EHow%20to%20reduce%20the%20binary%20size%20in%20S32Z2%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2361543%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%20class%3D%22%22%3E%3CSPAN%3EHello%20Team%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%20class%3D%22%22%3E%3CSPAN%3EI%20am%20using%20the%20NXP%20S32Z2%20Development%20Board%20with%20S32%20Design%20Studio%20(S32DS).%20I%20successfully%20built%20the%20project%20and%20generated%20the%20.bin%20file%20for%20the%20Boot%20Core%20R52.%3C%2FSPAN%3E%3C%2FP%3E%3CP%20class%3D%22%22%3E%3CSPAN%3EHowever%2C%20while%20creating%20the%20Flash%20Image%20file%2C%20I%20noticed%20that%20the%20generated%20.bin%20file%20size%20is%20very%20large%2C%20and%20I%20am%20facing%20issues%20during%20flash%20image%20creation.%3C%2FSPAN%3E%3C%2FP%3E%3CP%20class%3D%22%22%3E%3CSPAN%3ECould%20you%20please%20guide%20me%20on%2C%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3EIs%20there%20any%20specific%20linker%20setting%2C%20memory%20configuration%2C%20or%20optimization%20option%20required%20for%20S32Z2%20Boot%20Core%20R52%3F%3C%2FSPAN%3E%3C%2FP%3E%3CP%20class%3D%22%22%3E%26nbsp%3B%3C%2FP%3E%3CP%20class%3D%22%22%3E%3CSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screenshot%202026-05-07%20092147.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Screenshot%202026-05-07%20092147.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F384586i48044E75815EFDCE%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Screenshot%202026-05-07%20092147.png%22%20alt%3D%22Screenshot%202026-05-07%20092147.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20class%3D%22%22%3E%26nbsp%3B%3C%2FP%3E%3CP%20class%3D%22%22%3E%3CSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screenshot%202026-05-07%20092216.png%22%20style%3D%22width%3A%20646px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Screenshot%202026-05-07%20092216.png%22%20style%3D%22width%3A%20646px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F384587iDEE94C9F2EB468BF%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Screenshot%202026-05-07%20092216.png%22%20alt%3D%22Screenshot%202026-05-07%20092216.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20class%3D%22%22%3E%3CSPAN%3EPlease%20help%20me%20solve%20this%20issue.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EThank%20you.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EKarthik%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2362391%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20How%20to%20reduce%20the%20binary%20size%20in%20S32Z2%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2362391%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3CSPAN%3Ekarthik_nikil%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EI%20am%20glad%20to%20support%20you.%3C%2FP%3E%0A%3CP%3EYou%20can%20contact%20us%20at%20any%20time%20if%20you%20have%20any%20other%20question.%3C%2FP%3E%0A%3CP%3EBR%3C%2FP%3E%0A%3CP%3EJoey%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2362379%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20How%20to%20reduce%20the%20binary%20size%20in%20S32Z2%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2362379%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%20class%3D%22%22%3E%3CSPAN%3EHi%20Joey%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%20class%3D%22%22%3E%3CSPAN%3EThank%20you%20for%20your%20support%20and%20the%20patch%20files.%3C%2FSPAN%3E%3C%2FP%3E%3CP%20class%3D%22%22%3E%3CSPAN%3EI%20modified%20the%20linker%2Fstartup%20file%20as%20suggested%2C%20and%20now%20the%20issue%20is%20resolved.%20It%20is%20working%20correctly.%3C%2FSPAN%3E%3C%2FP%3E%3CP%20class%3D%22%22%3E%3CSPAN%3EThanks%20again%20for%20your%20help.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EBR%2C%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3EKarthik%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2362184%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20How%20to%20reduce%20the%20binary%20size%20in%20S32Z2%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2362184%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3CSPAN%3Ekarthik_nikil%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EThank%20you%20for%20your%20detail%20information%20and%20reply.%3C%2FP%3E%0A%3CP%3EFor%20the%20demo%20linker%20file%2C%20it%20will%20be%20padding%20for%20no%20using%20size%20from%26nbsp%3B%3CSPAN%3E0x317C0000(DRAM)%20to%26nbsp%3B0x321FFFFF(CRAM).%20Please%20refer%20to%20the%20patch%20files%20for%20the%20modification%20of%20linker%2Fstartup%20file.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EBR%3C%2FP%3E%0A%3CP%3EJoey%3C%2FP%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2361704%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20How%20to%20reduce%20the%20binary%20size%20in%20S32Z2%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2361704%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EHi%20Joey_z%2C%3CBR%20%2F%3E%3CBR%20%2F%3EThank%20you%20for%20your%20response.%3CBR%20%2F%3E%3CBR%20%2F%3EI%20would%20like%20to%20provide%20some%20additional%20information%20regarding%20the%20issue.%3CBR%20%2F%3E%3CBR%20%2F%3EWhen%20I%20build%20the%20example%20project%20using%20the%20M33%20core%2C%20the%20generated%20output%20binary%20size%20is%20small%20(around%20800%20KB)%2C%20and%20I%20am%20able%20to%20create%20the%20Flash%20Image%20successfully.%3CBR%20%2F%3E%3CBR%20%2F%3EHowever%2C%20when%20I%20build%20the%20same%20type%20of%20project%20using%20the%20R52%20core%2C%20the%20generated%20binary%20size%20becomes%20very%20large%2C%20and%20the%20issue%20occurs%20during%20Flash%20Image%20creation.%3CBR%20%2F%3E%3CBR%20%2F%3EIt%20seems%20that%20the%20problem%20happens%20only%20with%20the%20R52%20core%20build%20configuration.%3CBR%20%2F%3E%3CBR%20%2F%3ECould%20you%20please%20help%20me%20identify%20the%20reason%20for%20this%20behavior%20and%20suggest%20how%20to%20reduce%20the%20R52%20binary%20size%20or%20properly%20generate%20the%20Flash%20Image%3F%3CBR%20%2F%3E%3CBR%20%2F%3EThank%20you.%3CBR%20%2F%3EKarthik%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2361585%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20How%20to%20reduce%20the%20binary%20size%20in%20S32Z2%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2361585%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%EF%BC%8Ckarthik_nikil%3C%2FP%3E%0A%3CP%3EThank%20you%20for%20contacting%20us.%3C%2FP%3E%0A%3CP%3EI%20have%20received%20your%20question%20and%20will%20help%20you%20to%20check%20it.%3C%2FP%3E%0A%3CP%3EBR%3C%2FP%3E%0A%3CP%3EJoey%3C%2FP%3E%3C%2FLINGO-BODY%3E