how to use the build target--Release for S32DS for ARM project

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

how to use the build target--Release for S32DS for ARM project

Jump to solution
3,268 Views
enwei
NXP Employee
NXP Employee

Hi,

 

there are at least two build target--Debug and Release will be created by default for KEA project in S32DS for ARM (V1.2) , I compared the two different build target and found their compile result have very big difference with different complier configuration:

for Debug target:

174041_174041.jpgS32DS_Debug_Op1.jpg

174042_174042.jpgS32DS_Debug_Op2.jpg

for Release target:

174043_174043.jpgS32DS_Release_Op1.jpg

174044_174044.jpgS32DS_Release_Op2.jpg

Generally, we consider the Debug target for use in SW development period with rich debug information, while Release target for mass product use with no/less debug information.

 

the "Debugging"-->Debug Level configuration should have nothing to do with the compile result of S19 file and project function implements, only affect the debug feature, but the "Optimization" -->Optimization Level configuration have big influnce on the compile result, which may cause the C functions behaves wrong with code size various.

 

So  I'd like to know, how should we use/suggest our customer to use these two different build target, are there some detailed documents for S32DS for ARM C compiler Optimization configuration?

 

Enwei Hu

Labels (2)
1 Solution
2,581 Views
martin_kovar
NXP Employee
NXP Employee

Hi,

you are correct that Debug and Release build target are different. Default debug build target is suitable in project development phase, when you do not want to deal with assembler, compiler and linker settings. 

Your notice about optimization is little bit worrying. If you set highest optimization level, C code should be executed without any errors.

Release build target is primary determined for project, which will not be debugged and will be loaded to final product. But from my point of view, if you are working on the project, you should edit compiler and linker settings on your own, because every project need own settings. This is the reason, why there is not any documentation or recommendation how to use build targets, because the ones, which are available are let's say "examples", how it could look like.

About optimization, I recommend you to read GCC documentation.

Using the GNU Compiler Collection (GCC) 

If you have any other questions, please feel free to write me back.

Regards,

Martin

View solution in original post

4 Replies
2,581 Views
stanish
NXP Employee
NXP Employee

Hi Enwei,

The project wizard indeed generates multiple build configurations and it's up to the user if they use it or not. They can even delete the configs that are not be used.

Someone may prefer to use just one configuration for development and release (see Erich Styger blog: Debug vs. Release? | MCU on Eclipse )

The intention is indeed to split non-optimized and highly optimized (usually harder to debug) configurations.

Stan

2,581 Views
enwei
NXP Employee
NXP Employee

It's useful, thank you, Stan!

Enwei.

0 Kudos
Reply
2,582 Views
martin_kovar
NXP Employee
NXP Employee

Hi,

you are correct that Debug and Release build target are different. Default debug build target is suitable in project development phase, when you do not want to deal with assembler, compiler and linker settings. 

Your notice about optimization is little bit worrying. If you set highest optimization level, C code should be executed without any errors.

Release build target is primary determined for project, which will not be debugged and will be loaded to final product. But from my point of view, if you are working on the project, you should edit compiler and linker settings on your own, because every project need own settings. This is the reason, why there is not any documentation or recommendation how to use build targets, because the ones, which are available are let's say "examples", how it could look like.

About optimization, I recommend you to read GCC documentation.

Using the GNU Compiler Collection (GCC) 

If you have any other questions, please feel free to write me back.

Regards,

Martin

2,581 Views
enwei
NXP Employee
NXP Employee

OK, I understood. thank you~!

Enwei.

0 Kudos
Reply