mirror of
https://github.com/g4klx/MMDVM.git
synced 2026-01-04 15:49:58 +01:00
Created Building the Arduino MMDVM in console (markdown)
parent
e566fbe332
commit
6256ac7062
50
Building-the-Arduino-MMDVM-in-console.md
Normal file
50
Building-the-Arduino-MMDVM-in-console.md
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
If you have a remote repeater with a headless controller (console only, e.g. RPi without GUI but SSH), you can not use the standard Arduino IDE to compile the Arduino Due MMDVM binary remotely.
|
||||
|
||||
Usually you will compile MMDVM locally on a different machine with Arduino IDE installed, upload the binary to the headless controller and use `bossac` cmd line flash utility to flash the image into the Arduino board.
|
||||
|
||||
Another option is to compile MMDVM remotely on the headless controller with a CLI tool:
|
||||
There is a Arduino CLI compiler available at Github, [Arduino-CLI](https://github.com/arduino/arduino-cli)
|
||||
|
||||
Install it according to the [instructions](https://arduino.github.io/arduino-cli/latest/installation/) from your remote home directory with
|
||||
|
||||
`curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh`
|
||||
|
||||
The arduino-cli will be installed to ~/bin which is included in $PATH on most distributions.
|
||||
|
||||
To add the SAM Due core files to arduino-cli, do a
|
||||
|
||||
`arduino-cli core install arduino:sam`
|
||||
|
||||
This installs all compiler, linker and supplementary stuff to compile sources for the Arduino Due's SAM3X uC.
|
||||
You can check if arduino-cli now knows about Arduino Due when:
|
||||
|
||||
`bert@db0rof-dmr:~/Src/MMDVM$ arduino-cli core list`
|
||||
|
||||
shows
|
||||
|
||||
`arduino:sam 1.6.12 1.6.12 Arduino SAM Boards (32-bits ARM Cortex-M3)`
|
||||
|
||||
Now clone the MMDVM repository to the headless machine and change into its directory:
|
||||
|
||||
`git clone https://github.com/g4klx/MMDVM; cd MMDVM`
|
||||
|
||||
Read the BUILD.txt and add the required lib references to platform.txt with your favorite editor, e.g.
|
||||
|
||||
`nano ~/.arduino15/packages/arduino/hardware/sam/1.6.12/platform.txt`
|
||||
|
||||
(Replace version string with you current one)
|
||||
|
||||
Check the `Config.h` as usual for the required settings.
|
||||
Now you are ready to compile the MMDVM on your headless:
|
||||
|
||||
`arduino-cli compile --fqbn arduino:sam:arduino_due_x_dbg MMDVM`
|
||||
|
||||
If everything went fine, you will find a new folder `build/arduino:sam:arduino_due_x_dbg` which holds the finished MMDVM binary.
|
||||
|
||||
To flash it to the attached Arduino Due, stop any running MMDVMHost instance and upload the binary with
|
||||
|
||||
`arduino-cli upload -p /dev/ttyACM0 --fqbn arduino:sam:arduino_due_x_dbg MMDVM`
|
||||
|
||||
(replace port value to match your scenario)
|
||||
|
||||
Finally restart MMDVMHost and check the log output if the correct version and compile date of the Arduino firmware is shown.
|
||||
Loading…
Reference in a new issue