microscheme Workflow
From source code to the Arduino
The basic workflow is as follows:
- Write your program and save it as myprogram.ms
- Compile it using microscheme, resulting in myprogram.s
- Assemble it using avr-gcc, resulting in myprogram.elf
- Convert it to HEX format using avr-objcopy, resulting in myprogram.hex
- Upload it to the arduino using avrdude
However, this process is quite laborious, and the combination of arguments given to each tool can be complicated. Therefore, microscheme comes with a Makefile designed to automate this process. The simplified workflow is:
- Write your program, and save it as myprogram.ms
- Determine the path of the special device file allocated to the Arduino. This will be something like /dev/ttyACM0 or /dev/ttyUSB0.
- Execute
$ make upload MODEL=… DEV=…
Filling in either MEGA or UNO for model, and the DEV path from step 2