[vc_row][vc_column][vc_single_image image=”3246″ img_link_target=”_self”][vc_column_text]These instructions target Windows XP SP3-based distribution.[/vc_column_text][vc_tour][vc_tab title=”Install Tools” tab_id=”1393290012-1-21″][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.
Download and Install:
- python-2.7.1
- http://www.linkspritecndirect.com/pub/Spruce/Tools/python-2.7.1.zip
- pyserial-2.5.win32
- http://www.linkspritecndirect.com/pub/Spruce/Tools/pyserial-2.5.win32.exe
- stm32loader.py
- http://www.linkspritecndirect/pub/Spruce/Tools/stm32loader.py
- maple_boot.bin (Bootloader binary)
- http://www.linkspritecndirect.com/pub/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 want to 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 Spruce 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=”1393290012-2-0″][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![/vc_column_text][/vc_tab][vc_tab title=”Test Procedure ” tab_id=”1393348171869-2-7″][vc_column_text]
- 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;
- 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:
[/vc_column_text][/vc_tab][/vc_tour][/vc_column][/vc_row][vc_row][vc_column width=”1/1″][/vc_column][/vc_row][vc_row][vc_column width=”1/1″][/vc_column][/vc_row]
Leave a Reply
You must be logged in to post a comment.