Skip to content

Commit db732e3

Browse files
committed
Remove trailing whitespaces
1 parent d19bcaf commit db732e3

18 files changed

+289
-289
lines changed

Makefile

+59-59
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ ST_USB = usb_lib
1818

1919
# Optimization level [0,1,2,3,s]
2020
OPT ?= s
21-
DEBUG =
21+
DEBUG =
2222
#DEBUG = dwarf-2
2323

2424
INCDIRS = ./$(ST_LIB) ./$(ST_USB)
@@ -143,7 +143,7 @@ build_maple-mini: TARGETFLAGS= -DTARGET_MAPLE_MINI
143143
build_maple-mini: LDFLAGS +=-T$(ST_LIB)/c_only_md_high_density.ld
144144

145145
build_maple-mini: elf bin lss sym
146-
copy_maple_mini:
146+
copy_maple_mini:
147147
@echo
148148
@echo "Copying to binaries folder"
149149
@echo
@@ -155,7 +155,7 @@ build_maple-rev3: TARGETFLAGS= -DTARGET_MAPLE_REV3
155155
build_maple-rev3: LDFLAGS +=-T$(ST_LIB)/c_only_md_high_density.ld
156156

157157
build_maple-rev3: elf bin lss sym
158-
copy_maple-rev3:
158+
copy_maple-rev3:
159159
@echo
160160
@echo "Copying to binaries folder"
161161
@echo
@@ -166,196 +166,196 @@ build_maple-rev5: TARGETFLAGS= -DTARGET_MAPLE_REV5
166166
# Set the linker script
167167
build_maple-rev5: LDFLAGS +=-T$(ST_LIB)/c_only_md_high_density.ld
168168
build_maple-rev5: elf bin lss sym
169-
copy_maple-rev5:
169+
copy_maple-rev5:
170170
@echo
171171
@echo "Copying to binaries folder"
172172
@echo
173173
cp $(TARGET).bin bootloader_only_binaries/maple_rev5_boot20.bin
174174
@echo
175-
176-
175+
176+
177177
build_generic-pc13: TARGETFLAGS= -DTARGET_GENERIC_F103_PC13
178178
# Set the linker script
179179
build_generic-pc13: LDFLAGS +=-T$(ST_LIB)/c_only_md_high_density.ld
180180
build_generic-pc13: elf bin lss sym
181-
copy_generic-pc13:
181+
copy_generic-pc13:
182182
@echo
183183
@echo "Copying to binaries folder"
184184
@echo
185185
cp $(TARGET).bin bootloader_only_binaries/generic_boot20_pc13.bin
186-
@echo
187-
186+
@echo
187+
188188
build_generic-pg15: TARGETFLAGS= -DTARGET_GENERIC_F103_PG15
189189
# Set the linker script
190190
build_generic-pg15: LDFLAGS +=-T$(ST_LIB)/c_only_md_high_density.ld
191191
build_generic-pg15: elf bin lss sym
192-
copy_generic-pg15:
192+
copy_generic-pg15:
193193
@echo
194194
@echo "Copying to binaries folder"
195195
@echo
196196
cp $(TARGET).bin bootloader_only_binaries/generic_boot20_pg15.bin
197-
@echo
197+
@echo
198198

199199

200200
build_generic-pd2: TARGETFLAGS= -DTARGET_GENERIC_F103_PD2
201201
# Set the linker script
202202
build_generic-pd2: LDFLAGS +=-T$(ST_LIB)/c_only_md_high_density.ld
203203
build_generic-pd2: elf bin lss sym
204-
copy_generic-pd2:
204+
copy_generic-pd2:
205205
@echo
206206
@echo "Copying to binaries folder"
207207
@echo
208208
cp $(TARGET).bin bootloader_only_binaries/generic_boot20_pd2.bin
209-
@echo
210-
211-
209+
@echo
210+
211+
212212
build_generic-pd1: TARGETFLAGS= -DTARGET_GENERIC_F103_PD1
213213
# Set the linker script
214214
build_generic-pd1: LDFLAGS +=-T$(ST_LIB)/c_only_md_high_density.ld
215215
build_generic-pd1: elf bin lss sym
216-
copy_generic-pd1:
216+
copy_generic-pd1:
217217
@echo
218218
@echo "Copying to binaries folder"
219219
@echo
220220
cp $(TARGET).bin bootloader_only_binaries/generic_boot20_pd1.bin
221-
@echo
222-
221+
@echo
222+
223223
build_generic-pa1: TARGETFLAGS= -DTARGET_GENERIC_F103_PA1
224224
# Set the linker script
225225
build_generic-pa1: LDFLAGS +=-T$(ST_LIB)/c_only_md_high_density.ld
226226
build_generic-pa1: elf bin lss sym
227-
copy_generic-pa1:
227+
copy_generic-pa1:
228228
@echo
229229
@echo "Copying to binaries folder"
230230
@echo
231231
cp $(TARGET).bin bootloader_only_binaries/generic_boot20_pa1.bin
232-
@echo
232+
@echo
233233

234234
build_generic-pb9: TARGETFLAGS= -DTARGET_GENERIC_F103_PB9
235235
# Set the linker script
236236
build_generic-pb9: LDFLAGS +=-T$(ST_LIB)/c_only_md_high_density.ld
237237
build_generic-pb9: elf bin lss sym
238-
copy_generic-pb9:
238+
copy_generic-pb9:
239239
@echo
240240
@echo "Copying to binaries folder"
241241
@echo
242242
cp $(TARGET).bin bootloader_only_binaries/generic_boot20_pb9.bin
243-
@echo
244-
243+
@echo
244+
245245

246246
build_generic-pe2: TARGETFLAGS= -DTARGET_GENERIC_F103_PE2
247247
# Set the linker script
248248
build_generic-pe2: LDFLAGS +=-T$(ST_LIB)/c_only_md_high_density.ld
249249
build_generic-pe2: elf bin lss sym
250-
copy_generic-pe2:
250+
copy_generic-pe2:
251251
@echo
252252
@echo "Copying to binaries folder"
253253
@echo
254254
cp $(TARGET).bin bootloader_only_binaries/generic_boot20_pe2.bin
255-
@echo
256-
257-
255+
@echo
256+
257+
258258
build_generic-pa9: TARGETFLAGS= -DTARGET_GENERIC_F103_PA9
259259
# Set the linker script
260260
build_generic-pa9: LDFLAGS +=-T$(ST_LIB)/c_only_md_high_density.ld
261261
build_generic-pa9: elf bin lss sym
262-
copy_generic-pa9:
262+
copy_generic-pa9:
263263
@echo
264264
@echo "Copying to binaries folder"
265265
@echo
266266
cp $(TARGET).bin bootloader_only_binaries/generic_boot20_pa9.bin
267-
@echo
267+
@echo
268268

269269

270270
build_generic-pe5: TARGETFLAGS= -DTARGET_GENERIC_F103_PE5
271271
# Set the linker script
272272
build_generic-pe5: LDFLAGS +=-T$(ST_LIB)/c_only_md_high_density.ld
273273
build_generic-pe5: elf bin lss sym
274-
copy_generic-pe5:
274+
copy_generic-pe5:
275275
@echo
276276
@echo "Copying to binaries folder"
277277
@echo
278278
cp $(TARGET).bin bootloader_only_binaries/generic_boot20_pe5.bin
279-
@echo
280-
281-
279+
@echo
280+
281+
282282
build_generic-pe5-button-pa0: TARGETFLAGS= -DTARGET_GENERIC_F103_PE5_BUTTON_PA0
283283
# Set the linker script
284284
build_generic-pe5-button-pa0: LDFLAGS +=-T$(ST_LIB)/c_only_md_high_density.ld
285285
build_generic-pe5-button-pa0: elf bin lss sym
286-
copy_generic-pe5-button-pa0:
286+
copy_generic-pe5-button-pa0:
287287
@echo
288288
@echo "Copying to binaries folder"
289289
@echo
290290
cp $(TARGET).bin bootloader_only_binaries/generic_boot20_pe5_button_pa0.bin
291-
@echo
292-
293-
291+
@echo
292+
293+
294294
build_generic-pb7: TARGETFLAGS= -DTARGET_GENERIC_F103_PB7
295295
# Set the linker script
296296
build_generic-pb7: LDFLAGS +=-T$(ST_LIB)/c_only_md_high_density.ld
297297
build_generic-pb7: elf bin lss sym
298-
copy_generic-pb7:
298+
copy_generic-pb7:
299299
@echo
300300
@echo "Copying to binaries folder"
301301
@echo
302302
cp $(TARGET).bin bootloader_only_binaries/generic_boot20_pb7.bin
303-
@echo
303+
@echo
304304
build_generic-pb0: TARGETFLAGS= -DTARGET_GENERIC_F103_PB0
305305
# Set the linker script
306306
build_generic-pb0: LDFLAGS +=-T$(ST_LIB)/c_only_md_high_density.ld
307307
build_generic-pb0: elf bin lss sym
308-
copy_generic-pb0:
308+
copy_generic-pb0:
309309
@echo
310310
@echo "Copying to binaries folder"
311311
@echo
312312
cp $(TARGET).bin bootloader_only_binaries/generic_boot20_pb0.bin
313-
@echo
314-
315-
313+
@echo
314+
315+
316316
build_stbee: TARGETFLAGS= -DTARGET_STBEE
317317
# Set the linker script
318318
build_stbee: LDFLAGS +=-T$(ST_LIB)/c_only_md_high_density.ld
319319
build_stbee: elf bin lss sym
320-
copy_stbee:
320+
copy_stbee:
321321
@echo
322322
@echo "Copying to binaries folder"
323323
@echo
324324
cp $(TARGET).bin bootloader_only_binaries/stbee_boot20.bin
325-
@echo
325+
@echo
326326

327327
build_naze32: TARGETFLAGS= -DTARGET_NAZE32
328328
# Set the linker script
329329
build_naze32: LDFLAGS +=-T$(ST_LIB)/c_only_md_high_density.ld
330330
build_naze32: elf bin lss sym
331-
copy_naze32:
331+
copy_naze32:
332332
@echo
333333
@echo "Copying to binaries folder"
334334
@echo
335335
cp $(TARGET).bin bootloader_only_binaries/naze32_boot20.bin
336-
@echo
337-
336+
@echo
337+
338338
build_generic-pb12: TARGETFLAGS= -DTARGET_GENERIC_F103_PB12
339339
# Set the linker script
340340
build_generic-pb12: LDFLAGS +=-T$(ST_LIB)/c_only_md_high_density.ld
341341
build_generic-pb12: elf bin lss sym
342-
copy_generic-pb12:
342+
copy_generic-pb12:
343343
@echo
344344
@echo "Copying to binaries folder"
345345
@echo
346346
cp $(TARGET).bin bootloader_only_binaries/generic_boot20_pb12.bin
347-
@echo
348-
347+
@echo
348+
349349
build_hytiny-stm32f103t: TARGETFLAGS= -DTARGET_HYTINY_STM32F103T
350350
# Set the linker script
351351
build_hytiny-stm32f103t: LDFLAGS +=-T$(ST_LIB)/c_only_md_high_density.ld
352352
build_hytiny-stm32f103t: elf bin lss sym
353-
copy_hytiny-stm32f103t:
353+
copy_hytiny-stm32f103t:
354354
@echo
355355
@echo "Copying to binaries folder"
356356
@echo
357357
cp $(TARGET).bin bootloader_only_binaries/generic_boot20_hytiny.bin
358-
@echo
358+
@echo
359359

360360
build_dso138: TARGETFLAGS= -DTARGET_DSO138
361361
# Set the linker script
@@ -367,7 +367,7 @@ copy_dso138:
367367
@echo
368368
cp $(TARGET).bin bootloader_only_binaries/dso138_boot20.bin
369369
@echo
370-
370+
371371
build_gd32f1-generic-pc13: TARGETFLAGS= -DTARGET_GD32F1_GENERIC_F103_PC13
372372
# Set the linker script
373373
build_gd32f1-generic-pc13: LDFLAGS +=-T$(ST_LIB)/c_only_md_high_density.ld
@@ -377,8 +377,8 @@ copy_gd32f1-generic-pc13:
377377
@echo "Copying to binaries folder"
378378
@echo
379379
cp $(TARGET).bin bootloader_only_binaries/gd32f1_generic_boot20_pc13.bin
380-
@echo
381-
380+
@echo
381+
382382
build_gd32f1-frankenmaple: TARGETFLAGS= -DTARGET_GD32F1_FRANKENMAPLE
383383
# Set the linker script
384384
build_gd32f1-frankenmaple: LDFLAGS +=-T$(ST_LIB)/c_only_md_high_density.ld
@@ -388,9 +388,9 @@ copy_gd32f1-frankenmaple:
388388
@echo "Copying to binaries folder"
389389
@echo
390390
cp $(TARGET).bin bootloader_only_binaries/gd32f1_frankenmaple.bin
391-
@echo
392-
393-
391+
@echo
392+
393+
394394
bin: $(TARGET).bin
395395
elf: $(TARGET).elf
396396
lss: $(TARGET).lss

README

+9-9
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,23 @@ FILES -------------------------------------------------------------------------
44
stm32lib/*
55
- all the (possibly consolidated) stm32 lib and usb example code
66

7-
usb.c
8-
- USB-specific hardware setup. Interrupts, clocks, etc. handling USB when
9-
not "Attached". some low-level callbacks (low power mode, init, reset,
7+
usb.c
8+
- USB-specific hardware setup. Interrupts, clocks, etc. handling USB when
9+
not "Attached". some low-level callbacks (low power mode, init, reset,
1010
resume, etc).
1111

12-
usb_callbacks.c
13-
- aka endpoints: handling data transfer when "Configured". calls out to
12+
usb_callbacks.c
13+
- aka endpoints: handling data transfer when "Configured". calls out to
1414
application specific callbacks (i.e. DFU).
1515

16-
usb_descriptor.c
16+
usb_descriptor.c
1717
- aka application descriptor; big static struct and callbacks for sending
18-
the descriptor.
18+
the descriptor.
1919

2020
main.c
21-
- main loop and calling any hardware init stuff. timing hacks for EEPROM
21+
- main loop and calling any hardware init stuff. timing hacks for EEPROM
2222
writes not to block usb interrupts. logic to handle 2 second timeout then
23-
jump to user code.
23+
jump to user code.
2424

2525
hardware.c
2626
- init routines to setup clocks, interrupts, also destructor functions.

README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ This repo is a derivation of https://github.com/jonatanolofsson/maple-bootloade
1111

1212
The bootloader has been reworked so that all versions are contained in the Master branch, rather than 1 branch per version / board.
1313

14-
Note.
14+
Note.
1515
The upload to RAM option has effectively been removed, as it was useless and caused problems.
1616
The bootloader still has a DFU - AltID for RAM uploads, however this returns an error the host attempts to uplaod to this AltID. The AltID was kept, to allow backwards compatibility with anyone still using the old Maple IDE which has a upload to RAM option.
1717

@@ -20,8 +20,8 @@ The makefile now has multple build targets including "maple-mini" (roughly equiv
2020
Additionally the bootloader now works with "generic" STM32F103 boards, which do not have the additional USB reset hardware which all Maple, and Maple mini boards have.
2121

2222
On "generic" boards, the USB reset (to force re-enumeration by the host), is triggered by reconfiguring USB line D+ (PA12) into GPIO mode, and driving PA12 low for a short period, before setting the pin back to its USB operational mode.
23-
This system to reset the USB was written by @Victor_pv.
24-
Note. It is not guaranteed to work on all "generic" STM32 boards, and relies on PA12 having a pull-up resistor of around 1.5k - however most "generic" boards seem to have this.
23+
This system to reset the USB was written by @Victor_pv.
24+
Note. It is not guaranteed to work on all "generic" STM32 boards, and relies on PA12 having a pull-up resistor of around 1.5k - however most "generic" boards seem to have this.
2525
Its unclear if this method to reset the USB bus conforms precisely to the USB standard, but it seems to work fine on all PC's and Mac's (and Linux boxes) on which its been tested - and seems usable for hobby / non commericial / non-critical systems.
2626

2727

@@ -36,7 +36,7 @@ generic-pd1
3636
generic-pa1
3737
generic-pb9
3838

39-
In addition to the LED, the difference in the build targets is
39+
In addition to the LED, the difference in the build targets is
4040
(a) whether the device has maple USB reset hardware.
4141
(b) Which pin the "button" is attached to.
4242

@@ -45,7 +45,7 @@ Note. Most "generic" STM32F103 boards only have a reset button, and not a user /
4545
IMPORTANT.
4646
If you have a board where you have external hardware attached to pin PC12 which will pull this pin HIGH, you will need to make a new build target for you board which uses a different pin for the Button, or completely modify the code so that the Button is ignored.
4747

48-
The configuration for each build target / board is defined in config.h
48+
The configuration for each build target / board is defined in config.h
4949

5050
The Makefile sets the board name as a #define e.g. #define TARGET_GENERIC_F103_PD2, and config.h contains a block of config defines for each board.
5151

@@ -55,7 +55,7 @@ e.g.
5555
#define HAS_MAPLE_HARDWARE 1
5656
#define LED_BANK GPIOB
5757
#define LED_PIN 1
58-
#define LED_ON_STATE 1
58+
#define LED_ON_STATE 1
5959
/* On the Mini, BUT is PB8 */
6060
#define BUTTON_BANK GPIOB
6161
#define BUTTON 8
@@ -90,7 +90,7 @@ Note the code directly links flash page size to DFU block size. It would probabl
9090
#####Other improvements on the original Maple bootloader
9191

9292
1. Smaller footprint - now only 8k (This became possible due to code changes by @jonatanolofsson which allowed the GCC optimisation for size flag to be used
93-
2. Additional DFU AltID upload type was added, which allows the sketch to be loaded at 0x8002000 instead of 0x8005000 (due to reduce size of the bootloader is self),
93+
2. Additional DFU AltID upload type was added, which allows the sketch to be loaded at 0x8002000 instead of 0x8005000 (due to reduce size of the bootloader is self),
9494
Note. upload to 0x8005000 was retained for backwards compatibility.
9595

9696

0 commit comments

Comments
 (0)