-
Notifications
You must be signed in to change notification settings - Fork 229
USB Bootloader
Caution! This page is under construction! and it's windows specific at the moment
To have your board fully USB functional, a few steps must be completed. The initial steps (to be done ONCE only) are:
- Flashing the board with USB Bootloader
- Installing bootloader drivers
- Installing virtual com port drivers
After that you will be able to flash firmware with a simple single command.
DO NOT CONNECT LIPO, or you will damage your board! Download the BIN file in the bootloader directory and flash it to your evvgc board via UART1. Do not connect IMU nor USB yet.
The Bootloader is located in the /bootloader directory of this git repo, it's called maple_boot.bin
. You flash it the same way you flash any other code - via UART1 and the st flash tool... Make sure you check global erase when you do this.
Once you flash the bootloader and restart your board, the main led should blink at a constant rate (about 10 times per second). If it doesn't it means your board isn't properly flashed repeat the bootloader flash. If successful remove your usb/serial adapter from UART1 hopefully you won't need it any more :)
The easiest method for Windows users is:
- Go to http://zadig.akeo.ie/ and download Zadig
- Run it
- Make sure your evvgc board is powered off and everything is unplugged, then plug in USB cable and connect it to your PC
- For evvgc 1.2 board only - connect external 3.3v power supply so the board can power up
- Under Zadig, you should see a new device listed. Make sure it is selected and click on "Install driver" button. This should install the WinUSB driver from Zadig.
- After installation is complete close Zadig, unplug your board from USB, unplug external 3.3v power (1.2 board only)
- Plug USB cable again (and external 3.3v power for v1.2 boards)
- Make sure Windows Device Manager detected the device properly - it should be listed under "Universal Serial Bus Devices" with the device name "Maple 003". If it's not, repeat the procedure.
With your controller not connected to your PC, Go to http://www.st.com/web/en/catalog/tools/FM147/CL1794/SC961/SS1533/PF257938?s_searchtype=keyword, download and install the driver
For now I would stay with RULE #1 don't have lipo connected when you flash, this rule may be removed in the future because in theory we don't do anything to the UART1 lines with a usb flash, but I'd rather you be safe than sorry!
Open a command window (dos box) and move to the main EvvGC project directory, issue the following command:
make
(or cs-make
whichever you use) - this will build the latest version of the sources... Please make sure you have a make tool as referenced in either of the installation instruction files in the Documentation directory
Once you have a valid STM32Gimbal.USB.bin file in the out directory (produced from the above command) type the following also from the EvvGC project directory. Make sure your EvvGC controller is plugged into usb and powered if a 1.2 version board.
flashDFUSe.bat
You should see some status information on your screen as the flashing process occurs. Included in this is a hash bar display of the blocks being written while the processor is being flashed.
Get the latest STM32Gimbal.USB.bin file from the built-versions directory and copy it to the out directory, if the out directory doesn't exist, just make one under the EvvGC project directory. Then from the EvvGC project directory you can type flashDFUSe.bat
and that should flash your board.