Questions and discussions about the SDK tools used to program the TD RF modules.
edhowork
 
Posts: 10
Joined: Mon Jan 04, 2016 6:33 am

Code size increased when building within SDK6.0.0

by edhowork Mon Nov 21, 2016 12:53 pm

We have an application running in hardware for some months now. It was initially designed and tested within SDK4.
For a few additional feature the app was imported in a SDK6 environment and build again. The build resulted in a new BIN file which turns out to be not suitable for the TD1204. The flash tool reports a invalid flash address at approx 26% .

Examining the build report we see a increase in code size. We are building a 'debug' configuration with optimisation -Os.

Report of SDK4 build:
Code: Select all
section               size         addr
.text              0x17a48          0x0
.eh_frame              0x4      0x17a48
.ARM.exidx             0x8      0x17a4c
.rodata             0x2d04      0x17a54
.data                0x8e8   0x20000040
.bss                0x1dc0   0x20000930
.debug_aranges      0x1640          0x0
.debug_info        0x2014b          0x0
.debug_abbrev       0x695c          0x0
.debug_line        0x1eed8          0x0
.debug_frame        0x613c          0x0
.debug_str         0x8282b          0x0
.debug_loc          0x4068          0x0
.debug_ranges       0x1370          0x0
.ARM.attributes       0x27          0x0
.debug_macro       0x20d81          0x0
.comment              0x60          0x0
Total             0x112906


Report of SDK6 build:
Code: Select all
section               size         addr
.text              0x31548          0x0
.eh_frame              0x4      0x31548
.ARM.exidx             0x8      0x3154c
.rodata             0x4450      0x31558
.data                0x950   0x20000040
.flash_layout0i    0x20000      0x40000
.flash_layout1i      0x200      0x60000
.flash_layout2i      0x200      0x60200
.flash_layout2       0x200      0x1fc00
.flash_layout1       0x200      0x1fe00
.flash_layout0     0x20000      0x20000
.bss                0x20f0   0x20000990
.stack               0x800   0x20002a80
.debug_aranges      0x2910          0x0
.debug_info        0x33f99          0x0
.debug_abbrev       0x7a0f          0x0
.debug_line        0x24fe7          0x0
.debug_frame        0x9358          0x0
.debug_str         0x872c5          0x0
.debug_loc         0x1003c          0x0
.debug_ranges       0x2628          0x0
.ARM.attributes       0x27          0x0
.debug_macro       0x225da          0x0
.comment              0x60          0x0
Total             0x1a1965


Does anyone have a clue? I do not even know if the error message is related to code size.

We need to make changes to the app and prefers not to release using a old SDK.

Thanks in advance.
User avatar
mstempin
 
Posts: 168
Joined: Thu May 07, 2015 9:24 am

Re: Code size increased when building within SDK6.0.0

by mstempin Mon Nov 28, 2016 4:03 pm

Despite the "-Os" optimization, Building in "Debug" mode also adds a ton of debug information taking a lot of space in Flash, and compiling the whole firmware this way will result in Flash overflow very quickly.

Please compile in "Release" mode, most of the projects will not fit as new functionalities are added into the libraries.
edhowork
 
Posts: 10
Joined: Mon Jan 04, 2016 6:33 am

Re: Code size increased when building within SDK6.0.0

by edhowork Tue Nov 29, 2016 6:42 am

That is of course true. However I am surprised by the difference between the DSK4 and SDK6 results .
The last has twice the code size.

The reason for building in debug mode is that we need the uart for in system communication. This turned out not to be working in release mode.
User avatar
mstempin
 
Posts: 168
Joined: Thu May 07, 2015 9:24 am

Re: Code size increased when building within SDK6.0.0

by mstempin Tue Nov 29, 2016 3:01 pm

The UART is working in both Debug and Release mode: it is used in both modes by the AT command parser itself.
Return to Tools

Who is online

Users browsing this forum: No registered users and 16 guests