I am trying to compile an empty sketch from the command line (explanation on why I want to do this at the bottom).
I am on Linux, the installation is a clean arduino IDE 1.8.7, patched by teensyduino 1.44.
The command I run is this:
I am not sure about the fqbn I should use (BTW, where is this documented?).
And my guess is that the problem is likely a wrong or incomplete fqbn.
The error I get is
, because at some point the build system runs this command:
If you look carefully, you'l see a standalone "-D" option in that command.
There's some sort of "empty define", likely something that should have been in the build arguments.
Running that command without the standalone "-D" works.
How do I fix this?
Thanks!
Now the reason why I am doing this.
What I actually plan to do is to use Rust (the programming language) to write the sketch, but reusing (linking) the existing C core library.
To do so I need to run the build on the command line, produce the core library, and see the link command as performed by arduino-builder.
I can modify the link command, then replacing the sketch object file with one I generated with Rust.
I already did this with other arduino platforms and it works
It is a very simple way of using Rust to write my code while keeping the core library to initialize the board and perform low level functions.
I am on Linux, the installation is a clean arduino IDE 1.8.7, patched by teensyduino 1.44.
The command I run is this:
Code:
../arduino-1.8.7/arduino-builder -verbose -build-path /home/massi/teensy/build -build-cache /home/massi/teensy/cache -hardware ~massi/arduino-1.8.7/hardware -tools ~massi/arduino-1.8.7/tools -fqbn=teensy:avr:teensy35:speed=120 empty.ino/empty.ino.ino
And my guess is that the problem is likely a wrong or incomplete fqbn.
The error I get is
Code:
<command-line>:0:1: error: macro names must be identifiers
Code:
/home/massi/arduino-1.8.7/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++ -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -D__MK64FX512__ -DTEENSYDUINO=144 -DARDUINO=10600 -DF_CPU=120000000 -D -DLAYOUT_ -I/home/massi/arduino-1.8.7/hardware/teensy/avr/cores/teensy3 /home/massi/teensy/build/sketch/empty.ino.ino.cpp -o /home/massi/teensy/build/preproc/ctags_target_for_gcc_minus_e.cpp
If you look carefully, you'l see a standalone "-D" option in that command.
There's some sort of "empty define", likely something that should have been in the build arguments.
Running that command without the standalone "-D" works.
How do I fix this?
Thanks!
Now the reason why I am doing this.
What I actually plan to do is to use Rust (the programming language) to write the sketch, but reusing (linking) the existing C core library.
To do so I need to run the build on the command line, produce the core library, and see the link command as performed by arduino-builder.
I can modify the link command, then replacing the sketch object file with one I generated with Rust.
I already did this with other arduino platforms and it works
It is a very simple way of using Rust to write my code while keeping the core library to initialize the board and perform low level functions.