Close

Load firmware from SD card

A project log for Jimmy the mouse bot

I'm building a mouse bot based on the Parallax Propeller microcontroller.

jay-tjay-t 01/11/2015 at 13:420 Comments

I'm using now a nice Tachyon feature, it's the ?AUTOLOAD command. It checks the SD card for an updated FIRMWARE.ROM file. If it finds one then the new firmware is loaded into the EEPROM and it reboots then.

To use this I had to first program the EEPROM with the Tachyon Spin program. The next step ist to prepare the SD card with two files:

FIRMWARE.ROM, with a size of 32 KB (or your EEPROM size), filled with SPACES (ASCII code 32).

WORDS.DCT, with a size of 4 MB (should be enough), filled with SPACES too.

The files must be with filled with SPACES because the EASYFILE functions can't create files. So we have to take care of this. The WORDS.DCT file will store Forth words later. So it can store program parts and make more free RAM possible.

I put the SD card in my module on my Propeller board.

Then I loaded EXTEND.FTH, SDCARD.FTH, EASYFILE.FTH and SDWORDS.FTH over serial connection with a terminal program.

The next step was to run COMPACT, to move Forth words to the WORDS.DCT dictionary file. Then I loaded my firmware files.

The trick is to put the command ?AUTOLOAD as the first command into the word which runs as the AUTOSTART word. Now I can simply create a new firmware ROM file on my Propeller board and copy it to the SD card. And don't have to open Jimmy all the time to get access to the EEPROM.

Discussions