Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multiple definition of `__aeabi_atexit' with nxp platform in mbed #13

Open
dromer opened this issue Jun 18, 2018 · 2 comments
Open

multiple definition of `__aeabi_atexit' with nxp platform in mbed #13

dromer opened this issue Jun 18, 2018 · 2 comments
Assignees
Labels

Comments

@dromer
Copy link

dromer commented Jun 18, 2018

Configuration

Operating system: linux

PlatformIO Version (platformio --version): 3.5.3

Description of problem

Compiling 'helllo world' mbed example:

Generating LD script .pioenvs/mbedtest/LPC11U68.ld.link_script.ld
Linking .pioenvs/mbedtest/firmware.elf
.pioenvs/mbedtest/FrameworkMbedCore/targets/TARGET_NXP/TARGET_LPC11U6X/device/TOOLCHAIN_GCC_ARM/TARGET_LPC11U68/startup_LPC11U68.o: In function `__aeabi_atexit':
/home/dreamer/.platformio/packages/framework-mbed/targets/TARGET_NXP/TARGET_LPC11U6X/device/TOOLCHAIN_GCC_ARM/TARGET_LPC11U68/startup_LPC11U68.cpp:172: multiple definition of `__aeabi_atexit'
.pioenvs/mbedtest/FrameworkMbedCore/platform/mbed_retarget.o:/home/dreamer/.platformio/packages/framework-mbed/platform/mbed_retarget.cpp:1161: first defined here
collect2: error: ld returned 1 exit status
*** [.pioenvs/mbedtest/firmware.elf] Error 1

If problems with PlatformIO Build System:

The content of platformio.ini:

[env:mbedtest]
platform = nxplpc
framework = mbed
board = lpc11u68

Source file to reproduce issue:

#include "mbed.h"
 
DigitalOut myled(LED1);
 
int main() {
    while(1) {
        myled = 1;
        wait(0.2);
        myled = 0;
        wait(0.2);
    }
}
@ivankravets ivankravets added the bug label Aug 8, 2018
@ivankravets
Copy link
Member

Does it work with their mbed online compiler? http://os.mbed.com/compiler

@izaa
Copy link

izaa commented Aug 29, 2018

Same problem here. Works in online compiler.

arm-none-eabi-g++ -mcpu=cortex-m0 -mthumb -O0 -fmessage-length=0 -ffunction-sections -fdata-sections -fno-builtin -funsigned-char -fno-delete-null-pointer-checks -fomit-frame-pointer -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers  -g3 -T "C:/Users/user/Documents/MCUXpressoIDE_10.2.1_795/workspace/mbed_blinky123/Debug/linker-script-debug.ld" -Xlinker --gc-sections -L"C:/Users/user/Documents/MCUXpressoIDE_10.2.1_795/workspace/mbed_blinky123/mbed/TARGET_LPC11U68/TOOLCHAIN_GCC_ARM" -Xlinker --wrap=main -Xlinker --wrap=_malloc_r -Xlinker --wrap=_free_r -Xlinker --wrap=_realloc_r -Xlinker --wrap=_memalign_r -Xlinker --wrap=_calloc_r -Xlinker --wrap=exit -Xlinker --wrap=atexit -Wl,-Map,"mbed_blinky123.map" -DMBED_DEBUG -DMBED_TRAP_ERRORS_ENABLED=1 -DMBED_RTOS_SINGLE_THREAD -Wl,-n --specs=nano.specs -Wl,--start-group -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys -Wl,--end-group -o "mbed_blinky123.elf"  ./main.o  C:/Users/user/Documents/MCUXpressoIDE_10.2.1_795/workspace/mbed_blinky123/mbed/TARGET_LPC11U68/TOOLCHAIN_GCC_ARM/analogin_api.o C:/Users/user/Documents/MCUXpressoIDE_10.2.1_795/workspace/mbed_blinky123/mbed/TARGET_LPC11U68/TOOLCHAIN_GCC_ARM/gpio_irq_api.o C:/Users/user/Documents/MCUXpressoIDE_10.2.1_795/workspace/mbed_blinky123/mbed/TARGET_LPC11U68/TOOLCHAIN_GCC_ARM/gpio_api.o C:/Users/user/Documents/MCUXpressoIDE_10.2.1_795/workspace/mbed_blinky123/mbed/TARGET_LPC11U68/TOOLCHAIN_GCC_ARM/mbed_board.o C:/Users/user/Documents/MCUXpressoIDE_10.2.1_795/workspace/mbed_blinky123/mbed/TARGET_LPC11U68/TOOLCHAIN_GCC_ARM/i2c_api.o C:/Users/user/Documents/MCUXpressoIDE_10.2.1_795/workspace/mbed_blinky123/mbed/TARGET_LPC11U68/TOOLCHAIN_GCC_ARM/mbed_retarget.o C:/Users/user/Documents/MCUXpressoIDE_10.2.1_795/workspace/mbed_blinky123/mbed/TARGET_LPC11U68/TOOLCHAIN_GCC_ARM/mbed_sdk_boot.o C:/Users/user/Documents/MCUXpressoIDE_10.2.1_795/workspace/mbed_blinky123/mbed/TARGET_LPC11U68/TOOLCHAIN_GCC_ARM/mbed_tz_context.o C:/Users/user/Documents/MCUXpressoIDE_10.2.1_795/workspace/mbed_blinky123/mbed/TARGET_LPC11U68/TOOLCHAIN_GCC_ARM/pinmap.o C:/Users/user/Documents/MCUXpressoIDE_10.2.1_795/workspace/mbed_blinky123/mbed/TARGET_LPC11U68/TOOLCHAIN_GCC_ARM/pwmout_api.o C:/Users/user/Documents/MCUXpressoIDE_10.2.1_795/workspace/mbed_blinky123/mbed/TARGET_LPC11U68/TOOLCHAIN_GCC_ARM/rtc_api.o C:/Users/user/Documents/MCUXpressoIDE_10.2.1_795/workspace/mbed_blinky123/mbed/TARGET_LPC11U68/TOOLCHAIN_GCC_ARM/serial_api.o C:/Users/user/Documents/MCUXpressoIDE_10.2.1_795/workspace/mbed_blinky123/mbed/TARGET_LPC11U68/TOOLCHAIN_GCC_ARM/sleep.o C:/Users/user/Documents/MCUXpressoIDE_10.2.1_795/workspace/mbed_blinky123/mbed/TARGET_LPC11U68/TOOLCHAIN_GCC_ARM/spi_api.o C:/Users/user/Documents/MCUXpressoIDE_10.2.1_795/workspace/mbed_blinky123/mbed/TARGET_LPC11U68/TOOLCHAIN_GCC_ARM/startup_LPC11U68.o C:/Users/user/Documents/MCUXpressoIDE_10.2.1_795/workspace/mbed_blinky123/mbed/TARGET_LPC11U68/TOOLCHAIN_GCC_ARM/system_LPC11U6x.o C:/Users/user/Documents/MCUXpressoIDE_10.2.1_795/workspace/mbed_blinky123/mbed/TARGET_LPC11U68/TOOLCHAIN_GCC_ARM/us_ticker.o -lmbed -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys
C:/Users/user/Documents/MCUXpressoIDE_10.2.1_795/workspace/mbed_blinky123/mbed/TARGET_LPC11U68/TOOLCHAIN_GCC_ARM/startup_LPC11U68.o: In function `__aeabi_atexit':


/home/jenkins/build_node_4_1/workspace/bm_wrap/1701/mbed-os/targets/TARGET_NXP/TARGET_LPC11U6X/device/TOOLCHAIN_GCC_ARM/TARGET_LPC11U68/startup_LPC11U68.cpp:172: multiple definition of `__aeabi_atexit'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants