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.