This rework of ArdDude is made to work with arduino-cli software (https://blog.arduino.cc/2018/08/24/announcing-the-arduino-command-line-interface-cli/) available at https://github.com/arduino/arduino-cli It only needs arduino-cli to be installed; arduino IDE is no more used at all.
This project contains 2 parts :
This tool is an enhanced serial console, with :
- meta command to connect or change serial port or baudrate
- ability to scan changes in a file and to upload it automatically (no need to disconnect, launch upload, reopen serial monitor)
- display incomming data as raw, ascii or hex dump
- send data from input in hex or raw
run etc/console.sh or etc\console.bat with --help option for more information TODO : update these files
This makefile is a generic one to compile, upload, launch console. It can be used from any arduino project to compile it and collaborate with ArdDude
Let say your instaled this project in /home/me/ArdDude and an arduino project in /home/me/Arduino/myProject. Your main program should be /home/me/Arduino/myProject/myProject.ino
Thus, this command will compile your project : make -f /home/me/ArdDude/etc/Makefile -C /home/me/Arduino/myProject BOARD=arduino:avr:uno
The result will be a hex file in /home/me/Arduino/myProject/build/myProject.ino.hex
"build" subdir is generated by compilation steps, and contains a lot of temporary file.
To send this hex file to your arduino board, you have to launch : make -f /home/me/ArdDude/etc/Makefile -C /home/me/Arduino/myProject BOARD=arduino:avr:uno PORT=/dev/ttyUSB0 upload
To avoid specifying BOARD and PORT variables on each command line, you can create a file makefile.def in your project directory with this content : BOARD := arduino:avr:uno PORT := /dev/ttyUSB0
Other variables may be predefined here, and will be included by make command, but may be overloaded by command line assignments.
If your project contains several .ino files, you can specify which one to compile by following assignment MAIN_SOURCE=myOtherSource.ino Path must be relative to project directory.
You can also :
-
clean up build directory by make -f /home/me/ArdDude/etc/Makefile -C /home/me/Arduino/myProject clean
-
launch ardude console by make -f /home/me/ArdDude/etc/Makefile -C /home/me/Arduino/myProject console
This Makefile contains also some targets to use with Eclipse, see Eclipse.howto.md for details
About serial console :
- auto-completion in ArdConsole ?
- deep testing
- test console from dos, cygwin, MacOS ... -> see https://github.com/mintty/mintty https://github.com/git-for-windows/git/blob/master/compat/winansi.c (isatty) and mintty/mintty#56
- test with arduino variants (ATtiny, Yun) or other platforms (ESP)
- inline help is out to date
- shell and bat helper are out to date
- blank lines are displayed after each serial input