Login Register
[Useful Tip] - BLE Single Connection SDK - file
Dec 28, 2023 08:27




I hope this tip will be useful for somebody.

Recently when I compiled one of the examples from BLE Single Connection SDK I had this 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

This required, according to BLE Handbook, to copy correct link file from \boot folder, rename it to and place it in the root folder of the project

This is a note from BLE Handbook section 1.3

According to the previous introduction, the hardware of 8251, 8253 and 8258 in B85m series is the same, and the hardware of 8271 and 8278 is the same, but the Sram size is different, so users need to modify the file in the root directory of SDK after choosing different software bootloader files (according to the correspondence in the following table, replace the contents of the link file in the SDK root directory according to the following table), the software bootloader and of different ICs are shown in the following table.

The problem with this solution is - for me - that if I work on different project configurations and/or use different type of the device which requires different file, I have to check what file I am currently using and the replace it with correct file. I don't like this idea.

It would be good to replace the file automatically when compiling the project.

I noticed the solution to this issue in the BLE ZigBee concurrent SDK.

To implement this in the BLE Single Connection SDK (and BLE Multi Connection SDK) you have  to do this:

1. Create a file in root folder of the Project (or copy this file from BLE ZigBee concurrent SDK from \Tools folder)

2. If you create a file, add this text to the content of the file:

echo "*****************************************************"
echo "this is post build!! current configure is :$1"
rm -rf $2
cp -f $1 $2
echo "**************** end of post build ******************"

3. In the Project properties for current configuration add to "Pre-build Steps" the following Command:

"../" "../boot/" "${workspace_loc:/${ProjName}}/"

Specify the correct file that you want to use from /boot folder!

See the picture below

The file will be replaced with the file from the /boot folder every time you change the configuration and compile the project

No reply yet