Login Register
BLE single connection SDK - feature TEST_EXTENDED_ADVERTISING compilation error
Dec 21, 2023 05:58




I have tried to compile example b85m_feature_test. I want to test extended advertising, so I changed in feature_config.h


No other changes were made to the example code.

After trying to compile this example, I get the following error:

E:TelinkIoTStudioopt c32in c32-elf-ld.exe: section .text loaded at [00004000,0000bdc3] overlaps section .retention_data loaded at [000039e8,00004c3f]
make[1]: *** [b85m_ble_single_connection_sdk.elf] Error 1

make: *** [all] Error 2

"make all" terminated with exit code 2. Build might be incomplete.

I thought that maybe this is because of the size of APP_MAX_LENGTH_ADV_DATA, so I changed it from 1024 to 31.

I get the same error.

I also noticed that advertising data is not greater than 31. Example uses tbl_advData!

blc_ll_setExtAdvData( ADV_HANDLE0, DATA_OPER_COMPLETE, DATA_FRAGM_ALLOWED, sizeof(tbl_advData) , (u8 *)tbl_advData);

How to fix this error?

Note: I tried an example of Extended Advertising that is in Multi Connection SDK and it compiles OK.


The example compiles after I copy from \boot folder into b85m_ble_single_connection_sdk folder and rename it to (replacing original

I haven't tested it yet to see if it works.

Is that the correct solution to this error?

4 replies
TL_Soyo Dec 21, 2023 13:38


  It seems your retention ram is not enough for some ble features ,refer 1.3 Software Bootloader from ble handbook.

wes58 [Author] Dec 21, 2023 14:49

Hi Soyo,

You wrote "my retention ram is not enough". I didn't create this example. It comes from Telink SDK. Did Telink test their examples prior to posting them with SDK?

In BLE handbook in 1.4.3 Feature Demo and driver demo, there is no mention that some features won't compile! And how to fix it. I am just wasting time trying to figure out why they don't work.

There is no mention in the Handbook what to do if you get such error. I know nothing about how the code in file works.

I only tried to replace the file because I had some problems in the past with Multi connection SDK (The error then was ../ undefined symbol `_ramcode_size_div_256_' referenced in expression) and was advised by Telink to do it. At least at that time the error pointed to!

Changing it, worked this time as well. But why? How is the file  structured I have no idea. Is there any information about this file? Can the user change anything in the file.

wes58 [Author] Dec 22, 2023 05:50

Results after testing:

1. BLE Single Connection - Example feature_extend_adv.

After flashing the firmware it doesn t work. Can t see device when scanning with the phone application.

2. BLE Multi Connection - Example feature_ext_adv..


After flashing the firmware it doesn t work. Can t see device when scanning with the phone application.


After flashing the firmware everything works fine. I can see the device when scanning.

What is the problem with Single Connection SDK?

What is the problem with Multi Connection SDK and ADV_SET_MODE  =  SINGLE_ADV_SET?

Another question. When compiling in Single connection SDK I have the following:

c:UsersWieslawAppDataLocalProgramsPythonPython37python.exe: can t open file ../utils/memap/ : [Errno 2] No such file or directory


Section size total:

E:TelinkIoTStudioProject85m_ble_single_connection_sdk/ line 34: bc: command not found

E:TelinkIoTStudioProject85m_ble_single_connection_sdk/ line 35: bc: command not found

: bytes

Line 34 and 35 are:

echo "Section size total:"

SUM_EXPRE=$(tc32-elf-readelf -S $2.elf | awk {print $6} | tr -d [:blank:] | grep "[[:digit:]]" | tr [:lower:] [:upper:] | bc | xargs | sed s/0 // )

SUM=$(echo "${SUM_EXPRE}" | sed s# #+#g | bc)

echo "${SUM_EXPRE} : ${SUM} bytes"


None of example of extended advertising works. I thought that BLE Multi Connection SDK example with ADV_SET_MODE  =  MULTI_ADV_SETS works but it only works because it uses ADV_EVT_PROP_LEGACY_NON_CONNECTABLE_NON_SCANNABLE_UNDIRECTED


Advertising data is only set to standard length!

Can Telink fix this in both Single and Multi Connection SDKs! I wasted 2 days on this now.

wangdk111 May 29, 2024 09:18

Your chip is 8258 or 8251?

If 8258,you should not only copy the boot file,but also set "-DMCU_STARTUP_8258_RET_32K".

And if 8251,you should not only copy the boot file,but also set "-DMCU_STARTUP_8251_RET_32K".