Excluding from functions from ROM, e.g. __EXCLUDE_ROM...

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.xmece.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
4 posts / 0 new
Last post
mbwjr12
Offline
Last seen:2 months 3 days ago
Joined:2015-11-05 18:33
Excluding from functions from ROM, e.g. __EXCLUDE_ROM...

Are there any examples showing how to exclude ROM code properly?

I'd like to exclude __EXCLUDE_ROM_CUSTS1__ and __EXCLUDE_ROM_ATTM_DB_128__ as I seem to be hitting a breakpoint inside attm_sv_create_db_128() after a connect, disconnect, and then reconnect that I can't debug easily.

Device:
PM_Dialog
Offline
Last seen:15 hours 30 min ago
Staff
Joined:2018-02-08 11:03
Please follow the steps below

Hi mbwjr12,

Please follow the steps below:

1. Navigate to \sdk\common_project_files\misc SDS path and open da14531_symbols.txt in a text editor.

2.寻找__EXCLUDE_ROM_CUSTS1__ __EXCLUDE_ROM_ATTM_DB_128__

3. Comment all the related functions with cust1 and attm 128 datadase.

;attm_db_128.c (controlled by __EXCLUDE_ROM_ATTM_DB_128__) ;0x07f22c19 T attm_svc_create_db_128 ;custs1.c (controlled by __EXCLUDE_ROM_CUSTS1__) ;0x07f22621 T custs1_prf_itf_get ;custs1_task.c (controlled by __EXCLUDE_ROM_CUSTS1__) ;0x07f226d3 T custs1_init_ccc_values ;0x07f2270b T custs1_set_ccc_value

4. Save and close the da14531_symbols.txt file.

5. Open the “Options for Target” in the Keil IDE.

6. Navigate to “C/C++” tab. Here you can define the preprocessor symbols.

7. Define the preprocessor symbols as below:

_DA14531_ _EXCLUDE_ROM_CUSTS1_ _EXCLUDE_ROM_ATTM_DB_128_

8. Rebuilt you project.

9. Try to modify custs1.c custs1_task.c from your firmware to run them from sysRAM instead of ROM.

Please let me know if the steps above are working! Your feedback would be more than welcome!

Thanks, PM_Dialog

mbwjr12
Offline
Last seen:2 months 3 days ago
Joined:2015-11-05 18:33
Hello,

Hello,

This appears to be working for me in Keil. Are the steps the same for Eclipse?

It appears the breakpoint I am hitting is in other ROM code between those functions, but I will ask a separate question about that.

Thanks,

Mike

PM_Dialog
Offline
Last seen:15 hours 30 min ago
Staff
Joined:2018-02-08 11:03
Hi mbwjr12,

Hi mbwjr12,

Glad that the steps are working in Keil IDE and many thanks for your feedback. If you found the procedure described useful, please mark it as “accepted” for the other forum user who are interested in excluding the custs1.

Just saw the follow up tickets that you raised. Let me check it and I will get back to you in your new forum thread (links is provided below).

https://support.dialog-semiconductor.com/forums/post/dialog-smartbond-bluetooth-low-energy-%E2%80%93-software/excluding-functions-rom-eg-excluderom

Thanks, PM_Dialog