Skip to content

Latest commit

 

History

History
39 lines (29 loc) · 1005 Bytes

File metadata and controls

39 lines (29 loc) · 1005 Bytes

Arduino example

This example shows how to build cli with Arduino Nano. Another Arduino can also be used, but you will have to tweak configs. Example uses ~16KiB of ROM and ~0.6KiB of static RAM. Most of RAM is taken by derived implementations for help and autocomplete that don't use progmem. In future this should be fixed.

Running

Linux

Run with:

RAVEDUDE_PORT=/dev/ttyUSB0 cargo run --release

After flashing is completed, disconnect and reconnect with more appropriate terminal. For example tio:

tio /dev/ttyUSB0 --map ODELBS

Memory usage

Memory usage might vary depending on compiler version, build environment and library version. You can run memory.sh script to calculate memory usage of this arduino example with different activated features of cli library.

To analyze ROM usage:

cargo bloat --release

To analyze static RAM:

avr-objdump -s -j .data target/avr-atmega328p/release/arduino-cli.elf