MCUXpresso import/compile problem (LPC4088)

So, I’ve got a LPC4088 with a 5" display which I need to program. I’ve found some example projects around here that I can compile, upload, and run (using the online compiler) on there. I planned to take the Hello World project as a base for my program and use MCUXpresso as the IDE. I exported the Hello World project but I noticed that MCUXpresso was not listed in the supported toolchains, so i exported as a ZIP file.

Next I made a project in MCUXpresso in which I imported the ZIP file. Then I found out that the compiler couldn’t find the header files in the project so I had to manually include all the directory’s. However, after that the compiler gives me this error.

Building target: testhelloworld.axf
Invoking: MCU Linker
arm-none-eabi-gcc -mcpu=cortex-m7 -mthumb -o "testhelloworld.axf"  ./lpc4088_displaymodule_hello_world/DMBasicGUI/lpc_swim/lpc_colors.o ./lpc4088_displaymodule_hello_world/DMBasicGUI/lpc_swim/lpc_fonts.o ./lpc4088_displaymodule_hello_world/DMBasicGUI/lpc_swim/lpc_helvr10.o ./lpc4088_displaymodule_hello_world/DMBasicGUI/lpc_swim/lpc_rom8x16.o ./lpc4088_displaymodule_hello_world/DMBasicGUI/lpc_swim/lpc_rom8x8.o ./lpc4088_displaymodule_hello_world/DMBasicGUI/lpc_swim/lpc_swim.o ./lpc4088_displaymodule_hello_world/DMBasicGUI/lpc_swim/lpc_swim_font.o ./lpc4088_displaymodule_hello_world/DMBasicGUI/lpc_swim/lpc_swim_image.o ./lpc4088_displaymodule_hello_world/DMBasicGUI/lpc_swim/lpc_winfreesystem14x16.o ./lpc4088_displaymodule_hello_world/DMBasicGUI/lpc_swim/lpc_x5x7.o ./lpc4088_displaymodule_hello_world/DMBasicGUI/lpc_swim/lpc_x6x13.o   
c:/nxp/mcuxpressoide_10.2.1_795/ide/tools/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/lib/thumb/v7e-m\libc.a(lib_a-exit.o): In function `exit':
exit.c:(.text.exit+0x16): undefined reference to `_exit'
c:/nxp/mcuxpressoide_10.2.1_795/ide/tools/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/lib/thumb/v7e-m/crt0.o: In function `_start':
(.text+0x4a): undefined reference to `main'
make: *** [testhelloworld.axf] Error 1

10:54:11 Build Finished (took 755ms)

It says that the main is undefined. I also tried to make a code error on purpose in the main.cpp but the compiler did not even budge, so I guess the compiler just skips some files? This is probably why it can’t see ‘main’, but I have no idea how to fix this. I guess it is something in the settings of MCUXpresso because the same project works just fine in the online compiler.

I have no idea where to look for the solution. This problem already has me busy for 3 days straight so I hope someone notices the problem.

Hi Roelof,

Here’s what I did to get mbed-os-example-blinky building in MCUXpresso with the LPC4088 board:

  1. Install Mbed CLI: https://os.mbed.com/docs/v5.10/tools/installation-and-setup.html
  2. From your command line, run the following commands:
    • mbed import mbed-os-example-blinky
    • cd mbed-os-example-blinky
    • mbed export -i mcuxpresso -m lpc4088
  3. Then, open MCUXpresso and import the mbed-os-example-blinky folder from File > Import... > General > Projects from Folder or Archive select the mbed-os-example-blinky directory on your computer then select Finish

The project will be imported into the IDE and then you can build the project using the normal MCUXpresso build/debug buttons.

Please let me know how this goes for you!

– Jenny, team Mbed

1 Like