|
| 1 | +# ez-clang-arduino |
| 2 | + |
| 3 | +This repository provides an Arduino-based reference implementation of the [ez-clang RPC and runtime interface](https://github.com/echtzeit-dev/ez-clang#documentation). |
| 4 | +The build processes is based on [PlatformIO](https://platformio.org/) and allows for quick adaptation. |
| 5 | +This is a good starting point for developing a compatible firmware for your own development boards. |
| 6 | + |
| 7 | +## Supported host machines |
| 8 | + |
| 9 | +Right now, build instructions are tested only on Intel x86_64 hosts running Ubuntu 20.04. |
| 10 | +If you get it to work on other systems, please document your steps and create a pull request. |
| 11 | + |
| 12 | +## Supported target devices |
| 13 | + |
| 14 | +For the time being, the [Arduino Due](https://docs.arduino.cc/hardware/due) development board acts as the reference hardware for ez-clang. |
| 15 | +It features an Atmel SAM3X8E ARM Cortex-M3 CPU (armv7-m) and has more than enough flash and RAM for typical purposes. |
| 16 | +If you get it to work with other boards, please share your patches. |
| 17 | + |
| 18 | +## Build |
| 19 | + |
| 20 | +Install and run [PlatformIO](https://docs.platformio.org/en/latest/core/installation.html#super-quick-mac-linux): |
| 21 | + |
| 22 | +``` |
| 23 | +➜ python3 -c "$(curl -fsSL https://raw.githubusercontent.com/platformio/platformio/master/scripts/get-platformio.py)" |
| 24 | +➜ export PATH=$PATH:$HOME/.platformio/penv/bin |
| 25 | +➜ git clone https://github.com/echtzeit-dev/ez-clang-arduino |
| 26 | +➜ cd ez-clang-arduino |
| 27 | +➜ platformio run -e due |
| 28 | +... |
| 29 | +Replacing .pio/build/due/firmware.elf |
| 30 | +Relink succeeded |
| 31 | +Building .pio/build/due/firmware.bin |
| 32 | +``` |
| 33 | + |
| 34 | +## Run |
| 35 | + |
| 36 | +Connect your board, upload the `firmware.bin` with [PlatformIO](https://docs.platformio.org/en/stable/core/quickstart.html#process-project) and |
| 37 | +verify the serial output: |
| 38 | +``` |
| 39 | +> platformio run -t upload -t monitor -e due |
| 40 | +... |
| 41 | +Verify successful |
| 42 | +done in 12.890 seconds |
| 43 | +Set boot flash true |
| 44 | +CPU reset. |
| 45 | +... |
| 46 | +--- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H --- |
| 47 | +␁#W��W#␁j␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␅␀␀␀␀␀␀␀0.0.5P5␇ ␀␀␀␀�F␁␀␀␀␀␀␁␀␀␀␀␀␀␀␕␀␀␀␀␀␀␀__ez_clang_rpc_lookup�␀␀␀␀␀ |
| 48 | +``` |
0 commit comments