6 years, 2 months ago.

Trouble exporting project to MCUXpresso

Hello,

I am trying to export the MBED OS Blinky example to MCUXpresso. I am using a K64F as my platform. I am able to successfully deploy the application using the online and MBED-CLI compilers. However, I get compilation errors within MCUXpresso when I export to MCUXpresso from either the online compiler or from MBED-CLI. For example, when using the online export option, the MCUXpresso compiler errors saying it could not find "nsconfig.h."

I also don't understand why two projects are being exported.

Any help is appreciated.

Regards,

Tom

1 Answer

6 years, 2 months ago.

Hi Tom,

I'll try to address your comment in order:

<<quote>>For example, when using the online export option, the MCUXpresso compiler errors saying it could not find "nsconfig.h."<</quote>>

the file you reference, "nsconfig.h", is part of the feature "Nanostack". You may be able to work around this problem by turning on the nanostack feature before export. This indicates that the website or exporter may have a bug. Does the offline export exhibit the same symptoms? (this will help me narrow down if it affects the exporter or the website)

<<quote>>I also don't understand why two projects are being exported. <</quote>>

Eclipse CDT (C Develompment Toolkit?) projects have a normal .project file for general eclipse project settings and a .cproject file for CDT specific settings.

I hope that helps, Jimmy

Edit: Those quotes look bugged.

Jimmy,

Thanks for the reply! First, all works correctly with the online, mbed-cli, and MCUXpresso compilers when I build the project using mbed OS 2. With mbed OS 5 the online and mbed-cli work correctly. However, when I export the blinky project using mbed OS 5 to MCUXpresso I get errors when I compile. The first error listed is as follows:

../mbed-os/features/nanostack/FEATURE_NANOSTACK/sal-stack-nanostack/source/libNET/src/multicast_api.c:18:22: fatal error: nsconfig.h: No such file or directory

The previous issue with two project being created has disappeared. This may be related to the fact that I updated the mbed OS 5 from version 5.7.1 to 5.7.2.

I am also going to test this matter using the EA LPC 4088DM.

Regards,

Tom

posted by Tom Doyle 13 Jan 2018

Hi Tom,

It sounds like you're exporting online. You can also export offline, with Mbed CLI. Could you try that? Until I track down what's going wrong, that may be a workaround for you.

Quote:

mbed export -i mcuxpresso -m LPC4088

The above command should export for the exporter you want to use.

posted by the other jimmy 14 Jan 2018

Jimmy,

I tried your suggestion and exported via mbed-cli. Below is a portion of the output showing the error:

13:53:15 Build of configuration Debug for project mbed-os-example-blinky make -r -j8 linker-script-debug.ld all C:\Program Files (x86)\GNU Tools ARM Embedded\6 2017-q2-update\bin\arm-none-eabi-cpp -E -P -DMBED_DEBUG -DMBED_TRAP_ERRORS_ENABLED=1 -Wl,-n -Wl,start-group -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys -Wl,end-group ../mbed-os/targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_MCU_K64F/device/TOOLCHAIN_GCC_ARM/MK64FN1M0xxx12.ld -o linker-script-debug.ld /bin/sh: -c: line 1: syntax error near unexpected token `(x' /bin/sh: -c: line 1: `C:\Program Files (x86)\GNU Tools ARM Embedded\6 2017-q2-update\bin\arm-none-eabi-cpp -E -P -DMBED_DEBUG -DMBED_TRAP_ERRORS_ENABLED=1 -Wl,-n -Wl,start-group -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys -Wl,end-group ../mbed-os/targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_MCU_K64F/device/TOOLCHAIN_GCC_ARM/MK64FN1M0xxx12.ld -o linker-script-debug.ld' make: * [linker-script-debug.ld] Error 2 make: * Waiting for unfinished jobs.... Building file: ../mbed-os/targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/api/analogin_api.c Invoking: MCU C Compiler

Regards,

Tom

posted by Tom Doyle 14 Jan 2018