Compiling problem in linux

Download the Smoothie source code
Run ./linux_install ( or whatever is appropriate for your OS )
Run ./BuildShell
In the same shell, download the bootloader's source code
run make

I followed the steps above.
But it met an error.
So what’s going on???

make[1]: Entering directory '/home/neoleaf/Smoothieware/mbed'
Building src
make[2]: Entering directory '/home/neoleaf/Smoothieware/mbed/src'
Deploying cpp/FilePath.h to drop
Deploying cpp/DirHandle.h to drop
Deploying cpp/PortInOut.h to drop
Deploying cpp/Stream.h to drop
Deploying cpp/CAN.h to drop
Deploying cpp/FileSystemLike.h to drop
Deploying cpp/AnalogOut.h to drop
Deploying cpp/DigitalIn.h to drop
Deploying cpp/Ethernet.h to drop
Deploying cpp/SPISlave.h to drop
Deploying cpp/InterruptIn.h to drop
Deploying cpp/FileHandle.h to drop
Deploying cpp/BusInOut.h to drop
Deploying cpp/FileLike.h to drop
Deploying cpp/BusIn.h to drop
Deploying cpp/FileBase.h to drop
Deploying cpp/platform.h to drop
Deploying cpp/LocalFileSystem.h to drop
Deploying cpp/PortIn.h to drop
Deploying cpp/TimerEvent.h to drop
Deploying cpp/SPI.h to drop
Deploying cpp/Timeout.h to drop
Deploying cpp/Ticker.h to drop
Deploying cpp/DigitalOut.h to drop
Deploying cpp/I2C.h to drop
Deploying cpp/Serial.h to drop
Deploying cpp/mbed.h to drop
Deploying cpp/FunctionPointer.h to drop
Deploying cpp/Timer.h to drop
Deploying cpp/PwmOut.h to drop
Deploying cpp/PortOut.h to drop
Deploying cpp/AnalogIn.h to drop
Deploying cpp/DigitalInOut.h to drop
Deploying cpp/I2CSlave.h to drop
Deploying cpp/BusOut.h to drop
Deploying capi/ethernet_api.h to drop
Deploying capi/can_helper.h to drop
Deploying capi/gpio_irq_api.h to drop
Deploying capi/analogin_api.h to drop
Deploying capi/gpio_api.h to drop
Deploying capi/port_api.h to drop
Deploying capi/serial_api.h to drop
Deploying capi/us_ticker_api.h to drop
Deploying capi/mbed_interface.h to drop
Deploying capi/mbed_debug.h to drop
Deploying capi/can_api.h to drop
Deploying capi/spi_api.h to drop
Deploying capi/rtc_api.h to drop
Deploying capi/i2c_api.h to drop
Deploying capi/rtc_time.h to drop
Deploying capi/pwmout_api.h to drop
Deploying capi/pinmap.h to drop
Deploying capi/toolchain.h to drop
Deploying capi/analogout_api.h to drop
Deploying capi/semihost_api.h to drop
Deploying capi/sleep_api.h to drop
Deploying capi/wait_api.h to drop
Deploying capi/error.h to drop
Building mbed-lpc1768.mk
make[3]: Entering directory '/home/neoleaf/Smoothieware/mbed/src'
Compiling vendor/NXP/capi/analogout_api.c
make[3]: arm-none-eabi-gcc: Command not found
arm-common.mk:224: recipe for target 'Release/LPC1768/./vendor/NXP/capi/analogout_api.o' failed
make[3]: *** [Release/LPC1768/./vendor/NXP/capi/analogout_api.o] Error 127
make[3]: Leaving directory '/home/neoleaf/Smoothieware/mbed/src'
Makefile:72: recipe for target 'mbed-lpc1768.mk' failed
make[2]: *** [mbed-lpc1768.mk] Error 2
make[2]: Leaving directory '/home/neoleaf/Smoothieware/mbed/src'
Makefile:11: recipe for target 'src' failed
make[1]: *** [src] Error 2
make[1]: Leaving directory '/home/neoleaf/Smoothieware/mbed'
makefile:7: recipe for target 'all' failed
make: *** [all] Error 2

Imported from wikidot

Building mbed-lpc1768.mk
make[3]: Entering directory '/home/neoleaf/Smoothieware/mbed/src'
Compiling vendor/NXP/capi/analogout_api.c
make[3]: arm-none-eabi-gcc: Command not found
arm-common.mk:224: recipe for target 'Release/LPC1768/./vendor/NXP/capi/analogout_api.o' failed
make[3]: *** [Release/LPC1768/./vendor/NXP/capi/analogout_api.o] Error 127
make[3]: Leaving directory '/home/neoleaf/Smoothieware/mbed/src'
Makefile:72: recipe for target 'mbed-lpc1768.mk' failed
make[2]: *** [mbed-lpc1768.mk] Error 2
make[2]: Leaving directory '/home/neoleaf/Smoothieware/mbed/src'
Makefile:11: recipe for target 'src' failed
make[1]: *** [src] Error 2
make[1]: Leaving directory '/home/neoleaf/Smoothieware/mbed'
makefile:7: recipe for target 'all' failed
make: *** [all] Error 2

the error is “command not found”
but I really have “arm-none-eabi-gcc” in there
can anybody help?

Hi, I met your same error and I tried to configure the project more and more times but I can’t go on.
When I click on clean in Eclipse the procedure finishes correctly. If I use the “BuildShell” script and “make clear all” command all it’s ok but if I try to compile by Eclipse all fails in the same your point:

make all upload ENABLE_DEBUG_MONITOR=1 
make[1]: Entering directory 'C:/EclipseWorkspace/Smoothie/mbed'
Building src
make[2]: Entering directory 'C:/EclipseWorkspace/Smoothie/mbed/src'
Deploying cpp/BusInOut.h to drop
Deploying cpp/I2CSlave.h to drop
Deploying cpp/DigitalInOut.h to drop
Deploying cpp/FileSystemLike.h to drop
Deploying cpp/PortOut.h to drop
Deploying cpp/FileHandle.h to drop
Deploying cpp/I2C.h to drop
Deploying cpp/TimerEvent.h to drop
Deploying cpp/FileBase.h to drop
Deploying cpp/FunctionPointer.h to drop
Deploying cpp/mbed.h to drop
Deploying cpp/BusOut.h to drop
Deploying cpp/Timeout.h to drop
Deploying cpp/DirHandle.h to drop
Deploying cpp/FilePath.h to drop
Deploying cpp/PortInOut.h to drop
Deploying cpp/Timer.h to drop
Deploying cpp/AnalogIn.h to drop
Deploying cpp/LocalFileSystem.h to drop
Deploying cpp/platform.h to drop
Deploying cpp/FileLike.h to drop
Deploying cpp/BusIn.h to drop
Deploying cpp/InterruptIn.h to drop
Deploying cpp/SPI.h to drop
Deploying cpp/Ethernet.h to drop
Deploying cpp/PortIn.h to drop
Deploying cpp/DigitalIn.h to drop
Deploying cpp/PwmOut.h to drop
Deploying cpp/CAN.h to drop
Deploying cpp/Stream.h to drop
Deploying cpp/AnalogOut.h to drop
Deploying cpp/DigitalOut.h to drop
Deploying cpp/Ticker.h to drop
Deploying cpp/SPISlave.h to drop
Deploying cpp/Serial.h to drop
Deploying capi/error.h to drop
Deploying capi/wait_api.h to drop
Deploying capi/sleep_api.h to drop
Deploying capi/semihost_api.h to drop
Deploying capi/analogout_api.h to drop
Deploying capi/port_api.h to drop
Deploying capi/toolchain.h to drop
Deploying capi/pinmap.h to drop
Deploying capi/pwmout_api.h to drop
Deploying capi/rtc_time.h to drop
Deploying capi/i2c_api.h to drop
Deploying capi/rtc_api.h to drop
Deploying capi/spi_api.h to drop
Deploying capi/can_api.h to drop
Deploying capi/mbed_interface.h to drop
Deploying capi/us_ticker_api.h to drop
Deploying capi/serial_api.h to drop
Deploying capi/analogin_api.h to drop
Deploying capi/gpio_api.h to drop
Deploying capi/mbed_debug.h to drop
Deploying capi/gpio_irq_api.h to drop
Deploying capi/can_helper.h to drop
Deploying capi/ethernet_api.h to drop
Building mbed-lpc1768.mk
make[3]: Entering directory 'C:/EclipseWorkspace/Smoothie/mbed/src'
Compiling vendor/NXP/capi/serial_api.c
arm-common.mk:224: recipe for target 'Release/LPC1768/./vendor/NXP/capi/serial_api.o' failed
make[3]: Leaving directory 'C:/EclipseWorkspace/Smoothie/mbed/src'
process_begin: CreateProcess(NULL, arm-none-eabi-gcc -g3 -mcpu=cortex-m3 -mthumb -mthumb-interwork -ffunction-sections -fdata-sections -fno-exceptions -fno-delete-null-pointer-checks -Wall -Wextra -Wno-unused-parameter -Wcast-align -Wpointer-arith -Wredundant-decls -Wcast-qual -Wcast-align -I./capi -I./vendor/NXP/capi/LPC1768 -I./vendor/NXP/cmsis/LPC1768 -DTARGET_LPC1768 -DTOOLCHAIN_GCC_ARM -MMD -MP -std=c99 -O2 -DNDEBUG -c vendor/NXP/capi/serial_api.c -o Release/LPC1768/./vendor/NXP/capi/serial_api.o, ...) failed.
make (e=2): Impossibile trovare il file specificato.

make[3]: *** [Release/LPC1768/./vendor/NXP/capi/serial_api.o] Error 2
makefile:72: recipe for target ‘mbed-lpc1768.mk’ failed
make[2]: Leaving directory ‘C:/EclipseWorkspace/Smoothie/mbed/src’
make[2]: *** [mbed-lpc1768.mk] Error 2
makefile:11: recipe for target ‘src’ failed
make[1]: *** [src] Error 2
make[1]: Leaving directory ‘C:/EclipseWorkspace/Smoothie/mbed’
makefile:7: recipe for target ‘all’ failed
make: *** [all] Error 2


I use windows 7 64bit.
Can someone help me?
Thanks

I saw this same error when I downloaded and tried to use the latest version of the GCC ARM toolchain.

I would suggest deleting your gcc-arm-none-eabi directory rerunning linux_install.sh. This should get the version that works with the patches that are applied for the Smoothieboard.

Cheers

ok. On rereading the error I see is specific to Eclipse. I also struggled to get Eclipse to work. The documentation the Wiki must be for an older version than current as it certainly did not match what I have.

In the end I gave up and just use the command line to build and Eclipse to edit. If you find a solution please post it here.

Cheers

I know a month is a lot of time and you maybe have solved your problems, but I’d like to share my Experiences with some eclipse and smoothie specific errors/issues.

I have encountered the same issues but I could more or less solve it.

I used Eclipse Mars and on Linux I had almost no problems at all. Nevertheless there are some Windows specific issues. If you use the BuildShell.cmd “make” uses typical windows “cmd.exe” commands like copy instead of cp, which leads to copying errors (the (Project)_lastupload won’t work at all). This could be solved by somehow adding a busybox to the build folder, but I suppose that the makefile must know where the busybox is and how it should be used.

Usually make upload would use “dfu-util”, but this doesn’t work at all on windows. I experimented with some libUSB drivers for windows like: libUSB-win32, libusbK and WinUSB, which are provided by the tool “zadig”. However, I could just get a proper answer with “dfu-util -l” and uploading the firmware.bin to the smoothieboard wasn’t successful. So I would for now recommend to edit the makefile in src and remove the upload ability since this is what the make errors generates. Also it sometimes prevents to build the project.

ifeq "$(OS)" "Windows_NT"

SMOOTHIE_DIRECTORY=
SMOOTHIE_SERIAL_PORT=COMx
CONSOLE?=SMOOTHIE_SERIAL_PORT
# Here Windows Stuff basically the same, but delete the dfu-util line:

debug: ..\LPC1768\$(PROJECT)_lastupload.elf
arm-none-eabi-gdb $< -ex  "set target-charset ASCII" -ex "set remotelogfile mri.log" -ex "target remote $(CONSOLE)"
# "$(CONSOLE)" should be your serial com port at UART0

else
# The originally provided .PHONYs

endif


Maybe it is possible to use Flash Magic to upload the *.bin, but I haven’t read the manual so it’s just a shot in the dark.
It has to be something, which can upload the firmware while smoothie is in “ENABLE_DEBUG_MONITOR=1” position (halt at main()). A normal copy from src/LPC1768 to the sd card won’t work.

Eclipse has it’s own problems which are based on Eclipse itself and some other issues with the manual how to setup Eclipse for smoothieware.
The manual is great but it is written for POSIX systems…
For Windows you have to download the Windows Build Tools for GNU ARM Eclipse: gnuarmeclipse . github. io/ windows-build-tools/ install/
This grants you a busybox etc. which is needed for a correct project build (otherwise you can get errors like: echo not found or something like that.
Please check in this step, if your Path to the toolchain folder is correct, this could also explain why the builder is returning some errors.

Besides the inconvenience that I have to manually upload the firmware, everything works like a charm including the MRI (it’s sometimes quite slow, but it’s maybe just a coincidence).
If I have some time to spare in October or November I’ll try to provide a proper solution for this issues, but now I have something more urgent on my agenda.

cheers

edit: Oh and I forgot. If you are using linux and receiving these make errors after everything build properly this seems to be mostly because of 2 reasons: 1. dfu-util isn’t installed 2. dfu isn’t enabled in the smoothie config file…