FlashForth Installation: Arduino UNO on Linux and Mac
May 26 2017
FlashForth runs on bare metal Arduino. It does not use the Arduino bootloader that comes with most Arduino boards. You will not be able to install it using the Arduino IDE. Once you have an Arduino Uno (SEE: Amazon), There are two options to get a chip that runs FlashForth.
Option 1: Buy a Chip from the Author
The author of FlashForth sells AVR chips that already have FlashForth installed. If you don’t have an AVR programmer, or want to support opensource authors, this is a great option. Details are available on the official support page.
Option 2: Burn a Chip Yourself
Because FlashForth does not use the standard Arduino bootloader, you must buy an AVR Programmer and install AVR dude.
Download the Firmware
Once you are finished with the install, download
ff_uno.hex from the official source code repository. This is the image that you will burn onto the chip using AVRDude.
Burn the Image
Attach the programmer to the Arduino as shown:
Then run the code shown below.
The instructions assume you are using a Pocket AVR Programmer (USBTiny).
NOTE: If you aren’t using a Pocket AVR Programmer change the
-c usbtiny flag below to something more appropriate. Running
avrdude -c ? will print a list of all programmer types available. Find yours in the list and change the flag accordingly.
You should see something like the message below. If you do not see the message, please leave a comment so that I may keep an ongoing list of common installation errors.
Start Using FORTH Over Serial
You now have FlashForth installed! You will need a terminal client to start writing code. The simplest solution is to type
screen /dev/ttyUSB0 9600 or, for some brands,
screen /dev/ttyACM0 9600.
You should now see a FlashForth interpreter, such as the one below:
To verify installation, try typing enter a few times or inputting the command
words as I have done in the screenshot above.
PROBLEM: It Doesn’t See My Board (Linux)
Some Linux users (in my case, Linux Mint) will hit the following issue when burning an image:
avrdude: Error: Could not find USBtiny device (0x1781/0xc9f)
To fix the problem, create a configuration file as root:
and paste in this snippet:
Save the file and restart
Then try re-running AVRDude.