Dear Dialog,
I wanted to compile the CODELESS project without modification. Keil linker gives code size error as the size exceeds32768bytes. I tried all 3 possible target settings:
- codeless_531_datadump: results code size linker error:32804bytes;
- codeless_531_standalone: results code size linker error:32900bytes;
- codeless_531_set_two_standalone: results code size linker error:37068bytes;
So, all of them are bigger than Keil-linker allows max.32768bytes, without extra license.
I wanted to remove for exampleSUOTA(to bring down size) and if I comment outCFG_PRF_SUOTARinuser_profiles_config.h, the linker reports35300bytes; far bigger than withSUOTAleft inside. How can this be that I remove something and the code becomes bigger than before when I included it?
The same with removing some AT commands fromuser_at_commands.h; For example, commenting outAT_GAP_CONNECTandAT_SLEEPresults in code-size36780bytes, if they are in, the code size is32804.
The C/C++ option I choose Level-3, the highest code size optimization.
I followed the instructions inUM-B-057to setup Keil-environment
This is the linker error message:
linking...
.\out_531\codeless_531_datapump.axf: error: L6050U: The code size of this image (32804 bytes) exceeds the maximum allowed for this version of the linker.
Not enough information to produce a SYMDEFs file.
Finished: 1 information, 0 warning, 0 error and 1 fatal error messages.
".\out_531\codeless_531_datapump.axf" - 1 Error(s), 0 Warning(s).
I had a 30-day license from Keil which expired on2nd of January. During that 30 daysI could compile the above project very well.
I do not needSUOTAand only need the following3commands ofCODELESS:
AT+ADVSTOP, AT+CENTRAL, AT+GAPSCAN.I only want to read out telemetry beacons which advertise temperature, humidity, pressure and battery data.
Please advise me what to do to reduce code size that I can build the project.
Thank you very much in advance.
Hi janosN,
Thanks for your question.
To reduce the CodeLess image size, you could un-define the AT command that will not be used in your application from the user_at_commands.h header file. Additionally, in the user_modules_config.h you could exclude or include the profiles you need.
Keep in mind that there are pre-compiled binaries that can be used and can be found in DA145xx_CODELESS\6.380.12.6\binaries path.
Since you are using the TINY module, the Flash Programmer tool provides pre-compiled binaries too!
Thanks, PM_Dialog
Dear Dialog,
Thanks for your answer.
The image-size reduction was possible by disabling two#define行user_at_commands: (the rest of the defines had no significant size reduction effect)
//#define USE_AT_CONPARand//#define USE_AT_BND是有效的和之后的“g, the code-size reported is:27812(for codeless_531_datapump). So, I can compile the project now without extra Keil license.
To rebuild the project was necessary for me because the originalAT+GAPSCANcommand had severe problem scanning peripheral devices (like beacons advertising telemetry data). Originally it was only scanning other Dialog-peripheral devices and only addresses were listed without the advertised raw-data, so I had to modify the function:void user_on_adv_report_ind(struct gapm_adv_report_ind const* param)inuser_codeless.cfile. But it works now.
Thank you very much for your support.
-Janos-
Dear Dialog,
Thanks for your answer.
The image-size reduction was possible by disabling two#define行user_at_commands: (the rest of the defines had no significant size reduction effect)
//#define USE_AT_CONPARand//#define USE_AT_BND是有效的和之后的“g, the code-size reported is:27812(for codeless_531_datapump). So, I can compile the project now without extra Keil license.
To rebuild the project was necessary for me because the originalAT+GAPSCANcommand had severe problem scanning peripheral devices (like beacons advertising telemetry data). Originally it was only scanning other Dialog-peripheral devices and only addresses were listed without the advertised raw-data, so I had to modify the function:void user_on_adv_report_ind(struct gapm_adv_report_ind const* param)inuser_codeless.cfile. But it works now.
Thank you very much for your support.
-Janos-
嗨janosM,
Glad that you reduced the code size and thanks for sharing it.
Thanks, PM_Dialog