Problems when building with Eclipse and GNU embedded toolchain

Hi.

I didn’t find a specific category for this kind of problem, so I posted it here.

I wanted to use Eclipse and GNU embedded toolchain to build and debug my code.

So, I imported the mbed-os-example-blinky to the online compiler, and then exported as Eclipse-ARM-GCC for a Nucleo-F401RE target.

Then I installed Eclipse, its Embedded GCC extension, the embedded toolchain and the make utility for windows. I imported the project as “Makefile project from existing sources”, and i tried to build it.

But the make command generates this strange error:

make all 
make[1]: *** [D:/Embedded/demos/mbed-os-example-blinky/Makefile:1938: mbed-os-example-blinky.elf] Error -1073741819
make: *** [Makefile:26: all] Error 2
"make all" terminated with exit code 2. Build might be incomplete.

And gives no more information. I did some research on Google about the error, but with no result.

Below there are some other details, that maybe can be helpful for problem resolution

OS: Windows 11
Eclipse version: 2021-09
Target board: STM32 Nucleo-F401RE
GNU Embedded toolchain version: 10.3 2021-10

You’re better off using Mbed Studio which is based on Theia which is based on Eclipse and that will work right out of the box.

I don’t use Eclipse anymore but as I remember there was a bug in the exporter. Open the Makefile for editing and proceed to the line 1938. Most likely you will find there an invalid (garbage) path to a source file which should be easy to fix manually.

VS Code instructions are also broken.

I was able to install Mbed Studio, and build the blinky baremetal example, and run it on the MAX32620FTHR (using the MAX32625PICO board to load it). The Mbed OS version appears to be 6.something, but I’m not really sure how to find the minor rev. I was even able to able to make some minor mods in the main.cpp file and successfully run them.

Now, I would like to migrate the whole project over to Eclipse 2022-09.

That appears to be about 2 orders of magnitude harder than I thought it would be. There does not appear to be any way to export the project from Mbed Studio to Eclipse. Or, for that matter, to VS Code. But I need to go with Eclipse, because it has some things that I want to use in the final project – AND, we will be using a custom board, not the MAX32620FTHR, so I need a bit more information on how the project should be constructed.

I’m using MacOS Monterey (not my choice, but programmers rarely get to choose that sort of thing).

Where can I go to get the information I need to build the blinky baremetal project (with mbed os 6) in Eclipse? I’d settle for VS Code, but prefer Eclipse.

We use macOS and VSCode.

I cannot help you regarding Eclipse.

Have you been able to build and run a “Blinky” example using VSCode on MacOS? If so, I would definitely be interested in learning how to do that.

Mbed OS Community Edition has native VS Code (and CLion) support, including automatic generation of debug configurations! See here for a guide on how to create a project and get started.

1 Like

I second @MultipleMonomials answer, I think it’s best to start using MbedCE and read their documentation.

We have a specific (complicated?) setup using mbed-cli 1 and also CMake.

The main project is here: GitHub - leka/LekaOS: LekaOS is Leka's firmware based on Mbed OS
Documentation on installation is here: LekaOS/INSTALL.md at develop · leka/LekaOS · GitHub

I have a template project setup but I haven’t used it or updated it in a while: GitHub - ladislas/mbed-cmake-template

As said before, I think you’re better off using MbedCE directly.

It’s on my todo list to move our project to MbedCE but haven’t had the time with our product launch :slight_smile: