FAQ: Linker errors ("multiple definition") when building AXM0F343 examples with Onsemi IDE 3.4.0

The following FAQ applies only for the AXM0F343 CMSIS Pack versions 1.3.0 or earlier.


With the release of the latest ON Semiconductor IDE version, the ARM GCC Toolchain was updated from version 8 to version 10.

If you would like to use sample code from AXM0F343-1.3.0 CMSIS Pack (or earlier) with the latest ON Semiconductor IDE, some changes to the sample code project files are required. The required changes are the same as described in KB: Updating RSL10 Projects from SDK 3.4 to SDK 3.5


When building example projects from the ONSemiconductor.AXM0F343.1.3.0 pack using the latest ON Semiconductor IDE V., linker errors like the one below appear:

c:/program files (x86)/on semiconductor/ide_v3.4.0.48/arm_tools/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld.exe: ./COMMON/misc.o:C:/Users/zbh/ON_Semiconductor/PACK\ONSemiconductor\AXM0F343\1.3.0/drivers/scheduler/include/drv_scheduler.h:103: multiple definition of 'wtimer_pending'; ./COMMON/easyax5043.o:C:/Users/zbh/ON_Semiconductor/PACK\ONSemiconductor\AXM0F343\1.3.0/drivers/scheduler/include/drv_scheduler.h:103: first defined here


The fastest fix is to revert your Onsemi IDE to the last working version V. You can download it at Software: AXM0F343 (onsemi.com)

Another option is to follow these steps:

  • Right click on the project and go to PropertiesC/C++ BuildSettingsTool SettingsCross ARM C LinkerMiscellaneous and uncheck the checkboxes Use newlib -nano (–specs=nano.specs) and Do not use syscalls (–specs=nosys.specs) .

  • In the same PropertiesC/C++ BuildSettingsTool SettingsCross ARM C LinkerMiscellaneousOther linker flags , add “-z muldefs --specs=nosys.specs”

  • Go to PropertiesC/C++ BuildSettingsOptimizationOther Optimization flags , add “-fcommon”, and click Apply and Close .

After rebuilding the index and cleaning the project, you will be able to compile and flash with to more errors.

1 Like