arduino-makefile-cli

Migrate from


https://playground.arduino.cc/Learning/CommandLine
https://www.nongnu.org/avr-libc/

install
– avr-gcc (whose package is usually called gcc-avr),
– avr-libc
– avrdude

*GCC: CNU Compiler Collection
*
avr-libc: provide a high quality C library for use with GCC on Atmel AVR microcontrollers
**avrdude: utility to download/upload/manipulate the ROM and EEPROM contents of AVR microcontrollers using the in-system programming technique (ISP)

sudo apt-get install gcc-avr avr-libc avrdude
avr-libc avrdude binutils-avr gcc-avr libftdi1 libusb-0.1-4

Look at the Makefile

** Makefile: Makefile是幫助compile的工具,透過Makefile,可以簡化build的流程。特別是當程式愈寫愈大,source file愈來愈多時,更要用Makefile來管理

Makefiles:

$@:目前的目標項目名稱。
$ about the =, :=

linux teminal
sudo usbview
“dmesg | grep tty” to get which port you are using

seems fail to use make in CLI