Hi,
I am trying to add 3 characteristics to the service CUST1 in the project ble_app_profile. I success to add one characteristic when I did like written in the file Training_02_custom_profile_example_v1.0 attached, but when I did exactly the same procedure to add more characteristic (and the project compiled fine) the project break in the function wrap_platform_reset. why does that happen? there is any limitation in the number of characteristics per service?
Regards,
Keywords:
Device:
Hi Oz,
The most obvious reason that the wrap_platform_reset() is occurred is due to memory allocation failure, which means that there is a memory leakage in your software, you allocate data somewhere and you never release them (you can verify that in the parameter error of the function, which should be RESET_MEM_ALLOC_FAIL). Selecting the optimal heap for your application, you should experiment with via changing the sizes of the heaps in the da1458x_config_advanced.h file.
Thanks, PM_Dialog
Hi PM_Dialog,
Thank for your reply, I am not using any sleep mode so it seems that the following lines are defined:
#define REINIT_DESCRIPT_BUF 1//0 //0: keep in RetRAM, 1: re-init is required (set to 0 when Extended Sleep is used)
#define USE_MEMORY_MAP EXT_SLEEP_SETUP
and the heaps can be defined only for CFG_MEM_MAP_DEEP_SLEEP mode.
here is what written in the commit in da1458x_config_advanced.h file:
If CFG_MEM_MAP_EXT_SLEEP or no sleep mode is selected the heap memory sizes are automatically configured
Do you have any suggestion to solve this issue?
in your reply, you mentioned that I can verify that in the parameter error of the function, which should be RESET_MEM_ALLOC_FAIL.
which function did you mean?
Regards,
Oz
Hi Oz,
没有任何限制的添加更多的生产eristics in one service, for example there isn’t any problem if you add 10 characteristics. Adding any Services/Chars, the memory is allocated from DB_HEAP_SZ. So, the reason why the wrap_platform_reset hits is due to memory allocation, as I mentioned in my previous post. Try to define and increase the DB_HEAP_SZ from the da1458x_config_advanced, for example you can place a value of 2048. Regarding the RESET_MEM_ALLOC_FAIL, please check the comments of wrap_platform_reset() function in arch.h header file.
Thanks, PM_Dialog
Hi PM_Dialog,
I did like you said and it works, but my next step is to create third service, so I did like written onhttps://support.dialog-semiconductor.com/forums/post/dialog-smartbond-bl...
I added the second service like write in this guide, but when I did it with the third service I got the following message error.
I suspect that it happens from the same reason, because when I put the next lines in a comment:
{ TASK_CUSTS1,
custs1_att_db,
CUST1_IDX_NB,
#if (BLE_APP_PRESENT)
app_custs1_create_db, app_custs1_enable,
#else
NULL, NULL,
#endif
custs1_init, NULL
},
in the cust_prf_funcs array it look that I can compile the code.
Can you please help me to figure out this issue or you have a better suggestion?
Regards,
Oz
The mantioned error:
.\..\..\..\..\..\sdk\common_project_files\da1458x_scatter_config.h: Error: L6406E: No space in execution regions with .ANY selector matching custs1.o(.constdata).
.\..\..\..\..\..\sdk\common_project_files\da1458x_scatter_config.h: Error: L6406E: No space in execution regions with .ANY selector matching custs2.o(.constdata).
.\..\..\..\..\..\sdk\common_project_files\da1458x_scatter_config.h: Error: L6406E: No space in execution regions with .ANY selector matching app_diss_task.o(.constdata).
.\..\..\..\..\..\sdk\common_project_files\da1458x_scatter_config.h: Error: L6406E: No space in execution regions with .ANY selector matching custs3.o(.constdata).
.\..\..\..\..\..\sdk\common_project_files\da1458x_scatter_config.h: Error: L6406E: No space in execution regions with .ANY selector matching user_profile.o(.constdata).
.\..\..\..\..\..\sdk\common_project_files\da1458x_scatter_config.h: Error: L6406E: No space in execution regions with .ANY selector matching atts_task.obj(.constdata).
.\..\..\..\..\..\sdk\common_project_files\da1458x_scatter_config.h: Error: L6406E: No space in execution regions with .ANY selector matching llc.obj(.constdata).
.\..\..\..\..\..\sdk\common_project_files\da1458x_scatter_config.h: Error: L6406E: No space in execution regions with .ANY selector matching gapc_task.obj(.constdata).
.\..\..\..\..\..\sdk\common_project_files\da1458x_scatter_config.h: Error: L6406E: No space in execution regions with .ANY selector matching gpio.o(.constdata).
.\..\..\..\..\..\sdk\common_project_files\da1458x_scatter_config.h: Error: L6406E: No space in execution regions with .ANY selector matching usercusts3_def.o(.conststring).
.\..\..\..\..\..\sdk\common_project_files\da1458x_scatter_config.h: Error: L6406E: No space in execution regions with .ANY selector matching mvars.o(.data).
.\..\..\..\..\..\sdk\common_project_files\da1458x_scatter_config.h: Error: L6406E: No space in execution regions with .ANY selector matching mvars.o(.data).
.\..\..\..\..\..\sdk\common_project_files\da1458x_scatter_config.h: Error: L6406E: No space in execution regions with .ANY selector matching jump_table.o(.text).
.\..\..\..\..\..\sdk\common_project_files\da1458x_scatter_config.h: Error: L6406E: No space in execution regions with .ANY selector matching command_def.o(.constdata).
.\..\..\..\..\..\sdk\common_project_files\da1458x_scatter_config.h: Error: L6407E: Sections of aggregate size 0x84 bytes could not fit into .ANY selector(s).
Not enough information to produce a SYMDEFs file.
Not enough information to produce a FEEDBACK file.
Not enough information to list image symbols.
Not enough information to list load addresses in the image map.
Finished: 4 information, 0 warning and 15 error messages.
".\out_580\ble_app_profile_580.axf" - 15 Error(s), 1 Warning(s).
Hi Oz,
It seems that the space allocated from the scatterfile is not enough. A possible solution to your issue would be to rearrange the scatterfile in order to be able to execute a larger application. I would highly suggest you to read a past forum post in which you could find the appropriate steps in order to rearrange the scatterfile. Please follow the link below:
https://support.dialog-semiconductor.com/how-build-program-code-larger-32kb
As it mentioned in this post, you could find more information regarding the scatterfile in the UM-B-011 document from our support portal. You are able to download this document from the links below:
https://support.dialog-semiconductor.com/resource/um-b-011-da14580-memory-map-and-scatter-file
https://support.dialog-semiconductor.com/resource/um-b-011-da14580-memory-map-excel-tool
I would recommend to try that, and get back to me if you have any other issue or if your issue has not been fixed yet.
Thanks, PM_Dialog
Hi PM_Dialog,
Thank you for your reply, I changed the optimization level to 3 and now it seems that it working properly. is that a problem to work in so high optimization level?
Regards,
Oz
Hi Oz,
优化级别高,例如O0,分辨ase the size of the application, so the space allocated from the scatterfile might be enough. Glad that you figured your issue out. I would like to let you know that If you found any of the above answers useful please mark one of them as accepted.
Thanks, PM_Dialog