microscheme Workflow

From source code to the Arduino

The basic workflow is as follows:

  1. Write your program and save it as myprogram.ms
  2. Compile it using microscheme, resulting in myprogram.s
  3. Assemble it using avr-gcc, resulting in myprogram.elf
  4. Convert it to HEX format using avr-objcopy, resulting in myprogram.hex
  5. 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:

  1. Write your program, and save it as myprogram.ms
  2. Determine the path of the special device file allocated to the Arduino. This will be something like /dev/ttyACM0 or /dev/ttyUSB0.
  3. Execute   $ make upload MODEL=… DEV=…
    Filling in either MEGA or UNO for model, and the DEV path from step 2