Topic

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

/

A

/A

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

#define FEATURE_TEST_MODE       TEST_EXTENDED_ADVERTISING

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.


Edit:

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

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


Is that the correct solution to this error?


3 replies
TL_Soyo Dec 21, 2023 13:38
0
/A

Hi,

  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
0
/A

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 boot.link file works.


I only tried to replace the boot.link file because I had some problems in the past with Multi connection SDK (The error then was ../boot.link:123: 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 boot.link!

Changing it, worked this time as well. But why? How is the file boot.link  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
0
/A

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..

ADV_SET_MODE    SINGLE_ADV_SET


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


ADV_SET_MODE    MULTI_ADV_SETS

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/memap.py : [Errno 2] No such file or directory

and:

Section size total:

E:TelinkIoTStudioProject85m_ble_single_connection_sdk/tl_check_fw.sh: line 34: bc: command not found

E:TelinkIoTStudioProject85m_ble_single_connection_sdk/tl_check_fw.sh: 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"


Correction:

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

not ADV_EVT_PROP_EXTENDED_NON_CONNECTABLE_NON_SCANNABLE_DIRECTED in blc_ll_setExtAdvParam

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.