Target : Debug / Debug RAM / Release

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

Target : Debug / Debug RAM / Release

Jump to solution
1,409 Views
chicheportichen
Contributor II

First, sorry for asking a question two days in a row.

When creating a new projet in Design Studio, three configurations are created : 'Debug', 'Debug RAM' and 'Release'.

I haven't found any documentation related to those configurations, and I'm not skilled enough to analyse the makefile.

Here comes my problem : 

I have an application which works fine when using Debug or Debug RAM.

But if I try to flash the 'release' (which I assumed so far is purposed to be flashed), it don't work anymore.

I've arranged my application to a simple one, which deals with the same issue.

I've attached it.

What it does :

LPITO regularly check is a button is pushed.

If it is, it changes the value of a global variable.

In the main, an infinite loop looks at this variable value. Depending on its value, it executes a task. Here, toggling a LED.

Note: I'm still working on the S32K144EVB.

Thanks.

Nicolas

0 Kudos
1 Solution
1,279 Views
dianabatrlova
NXP TechSupport
NXP TechSupport

Hello Nicolas,

The Release option doesn't include debug information, you cannot debug the code but you can download the release version into the chip. So, if you Run the Release option the code is loaded into MCU. In your case, the issue can be because the optimization is enabled in Release option and your code is optimized.

If you want to know more about differences between build options I would like to recommend you to look at the community threads below:

Debug options to select in S32 Design Studio  

how could I use release with s32ds 

What is the difference between Debug RAM and Debug Flash? 

Also, more details can be found here:

Debug vs. Release? | MCU on Eclipse 

I hope it helps.

Best regards,

Diana

View solution in original post

0 Kudos
3 Replies
1,280 Views
dianabatrlova
NXP TechSupport
NXP TechSupport

Hello Nicolas,

The Release option doesn't include debug information, you cannot debug the code but you can download the release version into the chip. So, if you Run the Release option the code is loaded into MCU. In your case, the issue can be because the optimization is enabled in Release option and your code is optimized.

If you want to know more about differences between build options I would like to recommend you to look at the community threads below:

Debug options to select in S32 Design Studio  

how could I use release with s32ds 

What is the difference between Debug RAM and Debug Flash? 

Also, more details can be found here:

Debug vs. Release? | MCU on Eclipse 

I hope it helps.

Best regards,

Diana

0 Kudos
1,279 Views
chicheportichen
Contributor II

Hello Diana

Thank you very much for your answer and the several links you've shared.

It seems that you were right : I have changed  the optimization level to -O0  , i.e same as default Debug. And it works now.

The reason why ain't clear to me : my code is already optimized ?

I'm thinking of trying the opposite : use for both to -O3 and see what it result of it. Maybe it could prove some mistakes in my code.

Thanks again.

Sincerely,

Nicolas Chicheportiche.

0 Kudos
1,279 Views
dianabatrlova
NXP TechSupport
NXP TechSupport

Hello Nicolas,

Your approach is right. If you enable optimization level in Debug option you can compare the differences.

Best regards,

Diana

0 Kudos