KB: Updating RSL10 Projects from SDK 3.4 to SDK 3.5

With the release of RSL10 SDK 3.5, the ON Semiconductor IDE was updated to version 3.4.0.48 and its Arm GCC Toolchain was updated from version 8 to version 10. The sample code project files in SDK 3.5 were updated to be compatible with Arm GCC Toolchain version 10. If you would like to use sample code from SDK 3.4 (or earlier) with the latest ON Semiconductor IDE, some changes to the sample code project files are required.

To build the RSL10 CMSIS-Pack 3.4 (or earlier) sample projects with the ON Semiconductor IDE 3.4.0.48, follow these steps:

  • IDE - Right click on the project and go to PropertiesC/C++ BuildSettingsTool SettingsCross ARM C LinkerMiscellaneous and check the checkbox Do not use syscalls (–specs=nosys.specs).
  • IDE - Go to PropertiesC/C++ BuildSettingsOptimizationOther Optimization flags, add “-fcommon”, and click Apply and Close.

The steps mentioned above should fix the errors. However, for some samples, you might still see multiple definition errors coming from the Bluetooth Low Energy Stack. In that case, follow this step:

IDE - Right click on the project and go to PropertiesC/C++ BuildSettingsTool SettingsCross ARM C LinkerMiscellaneousOther linker flags, add “-z muldefs”, and click Apply and Close.

NOTE : In RSL10 SDK 3.5, the Bluetooth Low Energy stack and sample code has been refactored to fix the multiple definition errors without using the “-fcommon” or “-z muldefs” flags. In addition, the sections.ld for the audio samples has been refactored to not use the “COMMON” keyword for placing the shared memory buffer in the DSP RAM.

For further information, see the Arm GCC toolchain release notes:

GCC 9 Release Notes: GCC 9 Release Series — Changes, New Features, and Fixes - GNU Project - Free Software Foundation (FSF)

GCC 10 Release Notes: GCC 10 Release Series — Changes, New Features, and Fixes - GNU Project - Free Software Foundation (FSF)

The major change in GCC version 10 that makes the RSL10 CMSIS-Pack 3.4 or lower incompatible with the ON Semiconductor IDE version 3.4.0.48 is as follows:

GCC now defaults to -fno-common. As a result, global variable accesses are more efficient on various targets. In C, global variables with multiple tentative definitions now result in linker errors. With -fcommon such definitions are silently merged during linking .”

Due to this change, multiple definition errors are thrown for some samples, if RSL10 CMSIS-Pack 3.4 or lower is used with ON Semiconductor IDE 3.4.0.48. Also, the functionality of the audio samples like ble_android_asha and remote_mic is affected because in the sections.ld the “COMMON” keyword is used for placing the shared memory buffer in the DSP RAM.

In addition with Arm Toolchain version 10, if you are using -specs=nano.specs in the sample and you might see “libg_nano.a (lib_a-writer.o): in function ‘_write_r’:” or some other libg_nano.a errors. The reason behind this error is as follows:

newlib maps standard C functions to a specific implementation environment through a chain of functions. If the implementation of the function is not provided but the application requires one, the application will fail to link.

The standard solution for newlib is to add –specs=nosys.specs to the gcc linker command line. This links in a separate library with implementations for all required system functions. Most of these return an error; some, like _sbrk(), provide a usable definition.

3 Likes