Skip to content

Commit 167320f

Browse files
Added variants to Generic STM32F103Z and tidied up unused files in the stm32f103zxx variants folder
1 parent 14b5915 commit 167320f

9 files changed

Lines changed: 117 additions & 109 deletions

File tree

STM32F1/boards.txt

Lines changed: 34 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
menu.cpu=Processor
44
menu.cpu_upload_menu=CPU & Upload mode
5+
menu.device_variant=Variant
56

67
menu.upload_method=Upload method
78

@@ -377,24 +378,45 @@ GenericSTM32F103C.menu.cpu_upload_menu.c8SerialJTAG.upload.protocol=maple_serial
377378

378379
##############################################################
379380
genericSTM32F103Z.name=Generic STM32F103Z
380-
genericSTM32F103Z.upload.maximum_size=492000
381-
genericSTM32F103Z.upload.ram.maximum_size=61000
382-
genericSTM32F103Z.upload.flash.maximum_size=492000
383-
genericSTM32F103Z.build.error_led_port=GPIOA
384-
genericSTM32F103Z.build.error_led_pin=5
381+
382+
#genericSTM32F103Z.upload.maximum_size=492000
383+
#genericSTM32F103Z.upload.ram.maximum_size=61000
384+
#genericSTM32F103Z.upload.flash.maximum_size=492000
385+
386+
genericSTM32F103Z.build.error_led_port=GPIOG
387+
genericSTM32F103Z.build.error_led_pin=15
385388
genericSTM32F103Z.build.variant=generic_stm32f103zxx
386-
genericSTM32F103Z.build.extra_flags=-DMCU_STM32F103ZE -mthumb -march=armv7-m -D__STM32F1__
387-
genericSTM32F103Z.build.ldscript=ld/jtag.ld
389+
390+
#genericSTM32F103Z.build.extra_flags=-DMCU_STM32F103ZE -mthumb -march=armv7-m -D__STM32F1__
391+
#genericSTM32F103Z.build.ldscript=ld/jtag.ld
388392

389393
genericSTM32F103Z.upload.tool=serial_upload
390-
genericSTM32F103Z.upload.protocol=maple_dfu
394+
genericSTM32F103Z.upload.protocol=
391395
genericSTM32F103Z.upload.use_1200bps_touch=false
392396
genericSTM32F103Z.upload.file_type=bin
393-
#genericSTM32F103Z.upload.usbID=1EAF:0003
394-
#genericSTM32F103Z.upload.altID=1
395-
#genericSTM32F103Z.upload.auto_reset=true
396397
genericSTM32F103Z.build.mcu=cortex-m3
397398
genericSTM32F103Z.build.f_cpu=72000000L
398399
genericSTM32F103Z.build.board=GENERIC_STM32F103Z
399400
genericSTM32F103Z.build.core=maple
400-
genericSTM32F103Z.build.vect=VECT_TAB_FLASH
401+
genericSTM32F103Z.build.vect=VECT_TAB_FLASH
402+
403+
genericSTM32F103Z.menu.device_variant.STM32F103ZC=STM32F103ZC
404+
genericSTM32F103Z.menu.device_variant.STM32F103ZC.build.extra_flags=-DMCU_STM32F103ZC -mthumb -march=armv7-m -D__STM32F1__
405+
genericSTM32F103Z.menu.device_variant.STM32F103ZC.upload.maximum_size=262144
406+
genericSTM32F103Z.menu.device_variant.STM32F103ZC.upload.ram.maximum_size=492152
407+
genericSTM32F103Z.menu.device_variant.STM32F103ZC.upload.flash.maximum_size=492000
408+
genericSTM32F103Z.menu.device_variant.STM32F103ZC.build.ldscript=ld/stm32f103zc.ld
409+
410+
genericSTM32F103Z.menu.device_variant.STM32F103ZD=STM32F103ZD
411+
genericSTM32F103Z.menu.device_variant.STM32F103ZD.build.extra_flags=-DMCU_STM32F103ZD -mthumb -march=armv7-m -D__STM32F1__
412+
genericSTM32F103Z.menu.device_variant.STM32F103ZD.upload.maximum_size=393216
413+
genericSTM32F103Z.menu.device_variant.STM32F103ZD.upload.ram.maximum_size=65536
414+
genericSTM32F103Z.menu.device_variant.STM32F103ZD.upload.flash.maximum_size=492000
415+
genericSTM32F103Z.menu.device_variant.STM32F103ZD.build.ldscript=ld/stm32f103zd.ld
416+
417+
genericSTM32F103Z.menu.device_variant.STM32F103ZE=STM32F103ZE
418+
genericSTM32F103Z.menu.device_variant.STM32F103ZE.build.extra_flags=-DMCU_STM32F103ZE -mthumb -march=armv7-m -D__STM32F1__
419+
genericSTM32F103Z.menu.device_variant.STM32F103ZE.upload.maximum_size=524288
420+
genericSTM32F103Z.menu.device_variant.STM32F103ZE.upload.ram.maximum_size=65536
421+
genericSTM32F103Z.menu.device_variant.STM32F103ZE.upload.flash.maximum_size=492000
422+
genericSTM32F103Z.menu.device_variant.STM32F103ZE.build.ldscript=ld/stm32f103ze.ld

STM32F1/variants/generic_stm32f103zxx/ld/flash.ld

Lines changed: 0 additions & 26 deletions
This file was deleted.

STM32F1/variants/generic_stm32f103zxx/ld/mem-flash.inc

Lines changed: 0 additions & 5 deletions
This file was deleted.

STM32F1/variants/generic_stm32f103zxx/ld/mem-jtag.inc

Lines changed: 0 additions & 5 deletions
This file was deleted.

STM32F1/variants/generic_stm32f103zxx/ld/mem-ram.inc

Lines changed: 0 additions & 5 deletions
This file was deleted.

STM32F1/variants/generic_stm32f103zxx/ld/ram.ld

Lines changed: 0 additions & 25 deletions
This file was deleted.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*
2+
* libmaple linker script
3+
*
4+
* This build puts .text (and .rodata) in Flash, and
5+
* .data/.bss/heap (of course) in SRAM, but links starting at the
6+
* Flash and SRAM starting addresses (0x08000000 and 0x20000000
7+
* respectively). This will wipe out a Maple bootloader if there's one
8+
* on the board, so only use this if you know what you're doing.
9+
*
10+
* This build is perfectly usable for upload over SWD,
11+
* the system memory bootloader, etc. The name is just a historical
12+
* artifact.
13+
*/
14+
MEMORY
15+
{
16+
ram (rwx) : ORIGIN = 0x20000000, LENGTH = 48K
17+
rom (rx) : ORIGIN = 0x08000000, LENGTH = 512K
18+
}
19+
20+
/* Provide memory region aliases for common.inc */
21+
REGION_ALIAS("REGION_TEXT", rom);
22+
REGION_ALIAS("REGION_DATA", ram);
23+
REGION_ALIAS("REGION_BSS", ram);
24+
REGION_ALIAS("REGION_RODATA", rom);
25+
26+
/* Let common.inc handle the real work. */
27+
INCLUDE common.inc
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*
2+
* libmaple linker script
3+
*
4+
* This build puts .text (and .rodata) in Flash, and
5+
* .data/.bss/heap (of course) in SRAM, but links starting at the
6+
* Flash and SRAM starting addresses (0x08000000 and 0x20000000
7+
* respectively). This will wipe out a Maple bootloader if there's one
8+
* on the board, so only use this if you know what you're doing.
9+
*
10+
* This build is perfectly usable for upload over SWD,
11+
* the system memory bootloader, etc. The name is just a historical
12+
* artifact.
13+
*/
14+
MEMORY
15+
{
16+
ram (rwx) : ORIGIN = 0x20000000, LENGTH = 64K
17+
rom (rx) : ORIGIN = 0x08000000, LENGTH = 512K
18+
}
19+
20+
/* Provide memory region aliases for common.inc */
21+
REGION_ALIAS("REGION_TEXT", rom);
22+
REGION_ALIAS("REGION_DATA", ram);
23+
REGION_ALIAS("REGION_BSS", ram);
24+
REGION_ALIAS("REGION_RODATA", rom);
25+
26+
/* Let common.inc handle the real work. */
27+
INCLUDE common.inc
Lines changed: 29 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,29 @@
1-
/*
2-
* libmaple linker script for "JTAG" builds.
3-
*
4-
* A "JTAG" build puts .text (and .rodata) in Flash, and
5-
* .data/.bss/heap (of course) in SRAM, but links starting at the
6-
* Flash and SRAM starting addresses (0x08000000 and 0x20000000
7-
* respectively). This will wipe out a Maple bootloader if there's one
8-
* on the board, so only use this if you know what you're doing.
9-
*
10-
* Of course, a "JTAG" build is perfectly usable for upload over SWD,
11-
* the system memory bootloader, etc. The name is just a historical
12-
* artifact.
13-
*/
14-
15-
/*
16-
* This pulls in the appropriate MEMORY declaration from the right
17-
* subdirectory of stm32/mem/ (the environment must call ld with the
18-
* right include directory flags to make this happen). Boards can also
19-
* use this file to use any of libmaple's memory-related hooks (like
20-
* where the heap should live).
21-
*/
22-
INCLUDE mem-jtag.inc
23-
24-
/* Provide memory region aliases for common.inc */
25-
REGION_ALIAS("REGION_TEXT", rom);
26-
REGION_ALIAS("REGION_DATA", ram);
27-
REGION_ALIAS("REGION_BSS", ram);
28-
REGION_ALIAS("REGION_RODATA", rom);
29-
30-
/* Let common.inc handle the real work. */
31-
INCLUDE common.inc
1+
/*
2+
* libmaple linker script
3+
*
4+
* This build puts .text (and .rodata) in Flash, and
5+
* .data/.bss/heap (of course) in SRAM, but links starting at the
6+
* Flash and SRAM starting addresses (0x08000000 and 0x20000000
7+
* respectively). This will wipe out a Maple bootloader if there's one
8+
* on the board, so only use this if you know what you're doing.
9+
*
10+
* This build is perfectly usable for upload over SWD,
11+
* the system memory bootloader, etc. The name is just a historical
12+
* artifact.
13+
*/
14+
15+
16+
MEMORY
17+
{
18+
ram (rwx) : ORIGIN = 0x20000000, LENGTH = 64K
19+
rom (rx) : ORIGIN = 0x08000000, LENGTH = 512K
20+
}
21+
22+
/* Provide memory region aliases for common.inc */
23+
REGION_ALIAS("REGION_TEXT", rom);
24+
REGION_ALIAS("REGION_DATA", ram);
25+
REGION_ALIAS("REGION_BSS", ram);
26+
REGION_ALIAS("REGION_RODATA", rom);
27+
28+
/* Let common.inc handle the real work. */
29+
INCLUDE common.inc

0 commit comments

Comments
 (0)