cancel
Showing results for 
Search instead for 
Did you mean: 

Release mode have problem

np1
Associate II
Posted on January 22, 2014 at 07:50

Hi all,

I am using IAR v6.6, but I can not config project on release mode, when I select release mode, I still can dubug the code, but it must remove debug code on mode release.

Maybe I wrong config, please help me

Thanks and best regards

Thinh
6 REPLIES 6
chen
Associate II
Posted on January 22, 2014 at 10:17

Hi

''when I select release mode, I still can dubug the code,''

That is normal.

''but it must remove debug code on mode release.''

Have you checked/measured the binary size?

There should only be a small difference.

np1
Associate II
Posted on January 22, 2014 at 11:17

Thanks you too much,

I know that at release mode, binary sizw will smaller. I just do not understand why on Release mode, we can debug. I used v6.4 before, when option release, it just support programming, we can not make a breakpoint, debug.....

is it nomal?

chen
Associate II
Posted on January 22, 2014 at 11:30

Hi

The difference between release and debug is that extra memory are inserted to allow debugging (ie watching variables). With the debug compiler directive removed, these debug memory variables are not inserted.

The symbols and link to source code is done in the .elf file. If the release build generates this file - then you should still be able o debug. Lookup the .elf file in wikipedia.

Try comparing the map file between the 2 builds.

I think you will find that in release mode - watching variables will not work some of the time.

''I used v6.4 before, when option release, it just support programming, we can not make a breakpoint, debug.....''

Maybe they changed it - I do not know.

Check in the project properties that the debug compiler/linker switch is removed for the release build.

np1
Associate II
Posted on January 22, 2014 at 11:39

Thanks,

It will help me alot. I will research about that.

Because I download the firmware on ST site, but it just have debug mode. I want to create Release mode - that will remove debug code inside. but I can not. I alway support debug

chen
Associate II
Posted on January 22, 2014 at 11:56

Hi

I advocate issuing what is tested the most. Since most testing is done with the debug mode - I suggest issuing the code in debug mode.

If you change to release mode - you should really re-test it all again!

The tiny difference in binary size makes no difference to the end user!

np1
Associate II
Posted on January 23, 2014 at 03:59

thank you,

Maybe I will do that.