@@ -120,9 +120,6 @@ brew install openocd
120
120
```
121
121
122
122
## Build
123
-
124
- Build and flash the [ bootloader] ( https://github.com/vedderb/bldc-bootloader ) first
125
-
126
123
Clone and build the firmware
127
124
128
125
``` bash
@@ -131,11 +128,46 @@ cd vesc_firmware
131
128
make
132
129
```
133
130
134
- Flash it using an STLink SWD debugger
131
+
132
+ ## Upload to VESC
133
+ ### Method 1 - Flash it using an STLink SWD debugger
134
+
135
+ Build and flash the [ bootloader] ( https://github.com/vedderb/bldc-bootloader ) first
135
136
136
137
``` bash
137
138
make upload
138
139
```
140
+ ### Method 2 - Upload Firmware via VESC tool through USB
141
+
142
+ 1 . Clone and build the firmware in ** .bin** format
143
+
144
+ Reminder : Remember to select your board in [ ** conf_general.h** ]
145
+
146
+ ``` bash
147
+ git clone https://github.com/vedderb/bldc.git vesc_firmware
148
+ cd vesc_firmware
149
+ # make build/your_firmware_name_here.bin
150
+ make build/VESC_fw.bin
151
+ ```
152
+ In VESC tool
153
+
154
+ 2 . Connect to the VESC
155
+ 3 . Navigate to the Firmware tab on the left side menu
156
+ 4 . Click on Custom file tab
157
+ 5 . Click on the folder icon to select the built firmware in .bin format (e.g. VESC_fw.bin)
158
+
159
+ ##### [ Reminder : It is normal to see VESC disconnects during the firmware upload process ]
160
+ ##### ** [ Warning : DO NOT DISCONNECT POWER/USB to VESC during the upload process, or you will risk bricking your VESC ] **
161
+ ##### ** [ Warning : ONLY DISCONNECT your VESC 10s after the upload loading bar completed and "FW Upload DONE" ] **
162
+
163
+ 6 . Press the upload firmware button (downward arrow) on the bottom right to start upload the selected firmware.
164
+ 7 . Wait for ** 10s** after the loading bar completed (Warning: unplug sooner will risk bricking your VESC)
165
+ 8 . The VESC will disconnect itself after new firmware is uploaded.
166
+
167
+ ## In case you bricked your VESC
168
+ you will need to upload a new working firmware to the VESC.
169
+ However, to upload a firmware to a bricked VESC, you have to use a SWD Debugger.
170
+
139
171
140
172
## Contribute
141
173
0 commit comments