File tree Expand file tree Collapse file tree 7 files changed +56
-4
lines changed
variants/generic_stm32f103c/ld Expand file tree Collapse file tree 7 files changed +56
-4
lines changed Original file line number Diff line number Diff line change @@ -399,6 +399,12 @@ genericSTM32F103C.menu.upload_method.jlinkMethod.upload.protocol=jlink
399399genericSTM32F103C.menu.upload_method.jlinkMethod.upload.tool=jlink_upload
400400genericSTM32F103C.menu.upload_method.jlinkMethod.build.upload_flags=-DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DSERIAL_USB -DGENERIC_BOOTLOADER
401401
402+ genericSTM32F103C.menu.upload_method.HIDUploadMethod=HID bootloader 2.0
403+ genericSTM32F103C.menu.upload_method.HIDUploadMethod.upload.tool=hid_upload
404+ genericSTM32F103C.menu.upload_method.HIDUploadMethod.build.upload_flags=-DSERIAL_USB -DGENERIC_BOOTLOADER
405+ genericSTM32F103C.menu.upload_method.HIDUploadMethod.build.vect=VECT_TAB_ADDR=0x8001000
406+ genericSTM32F103C.menu.upload_method.HIDUploadMethod.build.ldscript=ld/hid_bootloader.ld
407+
402408#-- CPU Clock frequency
403409genericSTM32F103C.menu.cpu_speed.speed_72mhz=72Mhz (Normal)
404410genericSTM32F103C.menu.cpu_speed.speed_72mhz.build.f_cpu=72000000L
Original file line number Diff line number Diff line change @@ -162,14 +162,14 @@ tools.jlink_upload.upload.params.verbose=-d
162162tools.jlink_upload.upload.params.quiet=n
163163tools.jlink_upload.upload.pattern="{path}/{cmd}" "{build.path}/{build.project_name}.bin"
164164
165- # HID upload
165+ # HID upload 2.0
166166tools.hid_upload.cmd=hid_upload
167- tools.hid_upload.cmd.windows=hid_upload.bat
168- tools.hid_upload.cmd.macosx=hid_upload
167+ tools.hid_upload.cmd.windows=hid-flash.exe
168+ tools.hid_upload.cmd.macosx=hid_flash
169169tools.hid_upload.path={runtime.hardware.path}/tools/win
170170tools.hid_upload.path.macosx={runtime.hardware.path}/tools/macosx
171171tools.hid_upload.path.linux={runtime.hardware.path}/tools/linux
172172tools.hid_upload.path.linux64={runtime.hardware.path}/tools/linux64
173173tools.hid_upload.upload.params.verbose=-d
174174tools.hid_upload.upload.params.quiet=n
175- tools.hid_upload.upload.pattern="{path}/{cmd}" {serial.port.file} {upload.altID} {upload.usbID} "{build.path}/{build.project_name}.bin"
175+ tools.hid_upload.upload.pattern="{path}/{cmd}" "{build.path}/{build.project_name}.bin" {serial.port.file}
Original file line number Diff line number Diff line change 1+ /*
2+ * libmaple linker script for "Flash" builds.
3+ *
4+ * A Flash build puts .text (and .rodata) in Flash, and
5+ * .data/.bss/heap (of course) in SRAM, but offsets the sections by
6+ * enough space to store the Maple bootloader, which lives in low
7+ * Flash and uses low memory.
8+ */
9+
10+ /*
11+ * This pulls in the appropriate MEMORY declaration from the right
12+ * subdirectory of stm32/mem/ (the environment must call ld with the
13+ * right include directory flags to make this happen). Boards can also
14+ * use this file to use any of libmaple's memory-related hooks (like
15+ * where the heap should live).
16+ */
17+ MEMORY
18+ {
19+ ram (rwx) : ORIGIN = 0x20000000 , LENGTH = 20K
20+ rom (rx) : ORIGIN = 0x08001000 , LENGTH = 124K
21+ }
22+
23+ /* Provide memory region aliases for common.inc */
24+ REGION_ALIAS (" REGION_TEXT" , rom);
25+ REGION_ALIAS (" REGION_DATA" , ram);
26+ REGION_ALIAS (" REGION_BSS" , ram);
27+ REGION_ALIAS (" REGION_RODATA" , rom);
28+
29+ /* Let common.inc handle the real work. */
30+ INCLUDE common.inc
Original file line number Diff line number Diff line change @@ -111,6 +111,10 @@ generic_f407v.menu.upload_method.STLinkMethod.upload.tool=stlink_upload
111111generic_f407v.menu.upload_method.STLinkMethod.upload.dfuse_addr=0x08004000
112112generic_f407v.menu.upload_method.STLinkMethod.build.vect_flags=-DVECT_TAB_FLASH -DUSER_ADDR_ROM=(uint32)0x08000000
113113
114+ generic_f407v.menu.upload_method.HIDUploadMethod=HID bootloader 2.0
115+ generic_f407v.menu.upload_method.HIDUploadMethod.upload.tool=hid_upload
116+ generic_f407v.menu.upload_method.HIDUploadMethod.build.vect_flags=-DVECT_TAB_FLASH -DUSER_ADDR_ROM=(uint32)0x08004000 -DVECT_TAB_OFFSET=0x4000
117+ generic_f407v.menu.upload_method.HIDUploadMethod.build.ldscript=ld/bootloader_8004000.ld
114118
115119generic_f407v.menu.upload_method.DFUUploadMethod=STM32duino bootloader
116120generic_f407v.menu.upload_method.DFUUploadMethod.upload.protocol=maple_dfu
Original file line number Diff line number Diff line change @@ -123,3 +123,15 @@ tools.stlink_upload.path.linux64={runtime.hardware.path}/tools/linux64
123123tools.stlink_upload.upload.params.verbose=-d
124124tools.stlink_upload.upload.params.quiet=
125125tools.stlink_upload.upload.pattern="{path}/{cmd}" {serial.port.file} {upload.altID} {upload.usbID} "{build.path}/{build.project_name}.bin"
126+
127+ # HID upload 2.0 (HID bootloader 2.0 This bootloader will cover the STM32F1 and STM32F4 MCUs)
128+ tools.hid_upload.cmd=hid_upload
129+ tools.hid_upload.cmd.windows=hid-flash.exe
130+ tools.hid_upload.cmd.macosx=hid_flash
131+ tools.hid_upload.path={runtime.hardware.path}/tools/win
132+ tools.hid_upload.path.macosx={runtime.hardware.path}/tools/macosx
133+ tools.hid_upload.path.linux={runtime.hardware.path}/tools/linux
134+ tools.hid_upload.path.linux64={runtime.hardware.path}/tools/linux64
135+ tools.hid_upload.upload.params.verbose=-d
136+ tools.hid_upload.upload.params.quiet=n
137+ tools.hid_upload.upload.pattern="{path}/{cmd}" "{build.path}/{build.project_name}.bin" {serial.port.file}
You can’t perform that action at this time.
0 commit comments