[vc_row][vc_column][vc_column_text]These instructions are oriented towards Windows users using a contemporary Windows XP SP3-based distribution.[/vc_column_text][vc_tour][vc_tab title=”Collect and Install Tools” tab_id=”1402370160-1-43″][vc_column_text]First, you’ll need some tools:
In order to follow these instructions, you will need:
- A binary of the bootloader you want to upload
- RS232 cable for communicating between the Spruce and your computer over serial. The bootloader is downloaded over the RS232 port, while the Arduino program is downloaded over the USB port.
- Python version 2.5 or higher, with the PySerial library installed.
[/vc_column_text][/vc_tab][vc_tab title=”Download and Install” tab_id=”1402370160-2-21″][vc_column_text]
- python-2.7.1
http://www.cutedigi.com/pub/Arduino/Spruce/Tools/python-2.7.1.zip
- pyserial-2.5.win32
http://www.cutedigi.com/pub/Arduino/Spruce/Tools/pyserial-2.5.win32.exe
- stm32loader.py
http://www.cutedigi.com/pub/Arduino/Spruce/Tools/stm32loader.py
- maple_boot.bin (Bootloader binary)
http://www.cutedigi.com/pub/Arduino/Spruce/Tools/maple_boot.bin
Step 1: Obtain a bootloader binary.
The first thing you’ll need to do is to compile your bootloader binary. Note that an ASCII representation of the binary, such as the Intel .hex format, won’t work. If you just wantto flash the default Spruce bootloader (the one that was installed on your Spruce when it arrived), we host apre-compiled copy, which works on all Spruce Revs.
Step 2: Connect Spruce Serial 1 to your computer.
Serial 1 is J4 connector. At this point, you’re ready to plug the RS232 connector into your computer (via DB-9 cable).
Step 3: Put your Solid-STM32-Arduino into serial bootloader mode.
Do this by pressing the RESET button, then while RESET is held down, Remove the J2 jumpers (J2,open is ISP mode). Next, making sure to keep J2 open, release the RESET button and wait for a few seconds before shorting J2.
Step 4: Get stm32loader.py.[/vc_column_text][/vc_tab][vc_tab title=”Flashing the new Bootloader ” tab_id=”1402370267154-2-2″][vc_column_text]We’ll use maple_boot.bin as the path to the bootloader binary from Step 1,
and ser-port as the Spruce’s serial port device file or COM port.
On Linux, ser-port will probably be something like /dev/ttyUSB0, although
the exact number could be different (it could be /dev/ttyUSB1,
/dev/ttyUSB2, etc.).
On OS X, ser-port will probably look like /dev/tty.usbserialXXXX, where
XXXX is some random string of characters.
On Windows, ser-port will be something like COM1, COM2, etc.
To upload a bootloader binary, run this command from the Unix shell:
$python stm32loader.py -p ser-port -evw maple_boot.bin
Or this command from the Windows command prompt:
python.exe stm32loader.py -p ser-port -evw maple_boot.bin
You can also run the following to get usage information:
# Unix:
python stm32loader.py -h
# Windows:
python.exe stm32loader.py -h
If all goes well, you’ll see a bunch of output, then “Verification OK”. If
something goes wrong, you can always contact us directly!
One Stop Example: Flashing the Spruce Bootloader base on Windows XP
SP3
Install Tools: python-2.7.1 and pyserial-2.5.win32; All default installation; Download stm32loader.py and maple_boot.bin ; Create a folder under the C drive, and this folder name is ‘spruce’. Copy stm32loader.py and maple_boot.bin to ‘spruce’ folder;[/vc_column_text][/vc_tab][vc_tab title=”Command” tab_id=”1402370267892-3-2″][vc_column_text]Run Windows command prompt and Enter this command;
cd
cd spruce
Enter this command:
C:Python27python.exe stm32loader.py -p COM1 -ewv maple_boot.bin
If display the information below, Congratulations, successful:
Leave a Reply
You must be logged in to post a comment.