Added new menu items by Alexey (@HiddenPilot)

This commit is contained in:
Roger Clark 2014-12-19 08:31:49 +11:00
parent a327d7bd38
commit 98c772079e
7 changed files with 374 additions and 10 deletions

View File

@ -1,5 +1,180 @@
# Maple boards
menu.cpu=Processor
menu.gcc_version=GCC version
menu.debug_menu=Debug mode
menu.cpu_upload_menu=CPU & Upload mode
menu.HS_IO=High speed I/O commands
nano.name= Maple mini generic
nano.upload.tool=upload_router
#nano.upload.tool=maple_upload
nano.build.core=maple
nano.build.variant=maple_mini
nano.upload.use_1200bps_touch=false
nano.upload.file_type=bin
nano.upload.usbID=1EAF:0003
nano.upload.auto_reset=true
nano.build.mcu=cortex-m3
nano.build.f_cpu=72000000L
nano.build.core=maple
nano.build.common_flags=-mthumb -MD -DSTM32_MEDIUM_DENSITY -march=armv7-m -D__STM32F1XX__
#nano.build.extra_flags=-DMCU_STM32F103CB -mthumb -MD -DSTM32_MEDIUM_DENSITY -DBOOTLOADER_maple -march=armv7-m -D__STM32F1XX__
nano.build.variant=maple_mini
nano.build.variant_system_lib=libmaple.a
nano.build.density=STM32_MEDIUM_DENSITY
nano.build.error_led_port=GPIOB
nano.build.error_led_pin=1
############################ MENU ############################
## GCC VER
## gcc ver 4.8.3
## -------------------------
nano.menu.gcc_version.gcc48304q1= gcc-4.8.3
nano.menu.gcc_version.gcc48304q1.build.gcc_ver=gcc-arm-none-eabi-4.8.3-2014q1
## gcc ver 4.9
## -------------------------
nano.menu.gcc_version.gcc4904q1= gcc-4.9
nano.menu.gcc_version.gcc4904q1.build.gcc_ver=gcc-arm-none-eabi-4.9-2014q4
############################ MENU ############################
## GCC VER
## gcc ver 4.8.3
## -------------------------
nano.menu.HS_IO.hs_off= HSIO OFF
nano.menu.HS_IO.hs_off.build.hs_flag=
## gcc ver 4.9
## -------------------------
nano.menu.HS_IO.hs_on= HSIO ON
nano.menu.HS_IO.hs_on.build.hs_flag=-DHS_IO
## ==DEBUG MODE==
## Debug off
## -------------------------
nano.menu.debug_menu.debug_off=DebugOFF
nano.menu.debug_menu.debug_off.build.debuggingMode=0
## Debug on
## -------------------------
nano.menu.debug_menu.debug_on=DebugON
nano.menu.debug_menu.debug_on.build.debuggingMode=1
## ==UPLOAD MODE==
## F103CB USB to Flash upload
## -------------------------
nano.menu.cpu_upload_menu.cbUsbFlash= F103CB(128k) USB->Flash
nano.menu.cpu_upload_menu.cbUsbFlash.build.ldscript=ld/flash.ld
nano.menu.cpu_upload_menu.cbUsbFlash.build.cpu_flags=-DMCU_STM32F103CB -DBOOTLOADER_maple
nano.menu.cpu_upload_menu.cbUsbFlash.build.vect=VECT_TAB_FLASH
nano.menu.cpu_upload_menu.cbUsbFlash.upload.maximum_size=108000
nano.menu.cpu_upload_menu.cbUsbFlash.upload.ram.maximum_size=17000
nano.menu.cpu_upload_menu.cbUsbFlash.upload.flash.maximum_size=108000
nano.menu.cpu_upload_menu.cbUsbFlash.upload.altID=1
nano.menu.cpu_upload_menu.cbUsbFlash.upload.protocol=maple_dfu
## F103CB USB to RAM upload
## -------------------------
nano.menu.cpu_upload_menu.cbUsbRAM=F103CB(128k) USB->RAM
nano.menu.cpu_upload_menu.cbUsbRAM.build.ldscript=ld/ram.ld
nano.menu.cpu_upload_menu.cbUsbRAM.build.cpu_flags=-DMCU_STM32F103CB -DBOOTLOADER_maple
nano.menu.cpu_upload_menu.cbUsbRAM.build.vect=VECT_TAB_RAM
nano.menu.cpu_upload_menu.cbUsbRAM.upload.maximum_size=17000
nano.menu.cpu_upload_menu.cbUsbRAM.upload.ram.maximum_size=17000
nano.menu.cpu_upload_menu.cbUsbRAM.upload.flash.maximum_size=108000
nano.menu.cpu_upload_menu.cbUsbRAM.upload.altID=0
nano.menu.cpu_upload_menu.cbUsbRAM.upload.protocol=maple_dfu
## UPLOAD MODE
## F103CB Serial to Flash upload (keep bootloader)
## -------------------------
nano.menu.cpu_upload_menu.cbSerialFlash=F103CB(128k) Serial->Flash (keep bootloader)
nano.menu.cpu_upload_menu.cbSerialFlash.build.ldscript=ld/flash.ld
nano.menu.cpu_upload_menu.cbSerialFlash.build.cpu_flags=-DMCU_STM32F103CB -DBOOTLOADER_maple
nano.menu.cpu_upload_menu.cbSerialFlash.build.vect=VECT_TAB_FLASH
nano.menu.cpu_upload_menu.cbSerialFlash.upload.maximum_size=108000
nano.menu.cpu_upload_menu.cbSerialFlash.upload.ram.maximum_size=17000
nano.menu.cpu_upload_menu.cbSerialFlash.upload.flash.maximum_size=108000
nano.menu.cpu_upload_menu.cbSerialFlash.upload.altID=1
nano.menu.cpu_upload_menu.cbSerialFlash.upload.protocol=maple_serial
## UPLOAD MODE
## F103CB Serial to Flash upload (lost bootloader)
## -------------------------
nano.menu.cpu_upload_menu.cbSerialJTAG=F103CB(128k) Serial->Flash (lost bootloader!!!)
nano.menu.cpu_upload_menu.cbSerialJTAG.build.ldscript=ld/jtag.ld
nano.menu.cpu_upload_menu.cbSerialJTAG.build.cpu_flags=-DMCU_STM32F103CB
nano.menu.cpu_upload_menu.cbSerialJTAG.build.vect=VECT_TAB_FLASH
nano.menu.cpu_upload_menu.cbSerialJTAG.upload.maximum_size=128000
nano.menu.cpu_upload_menu.cbSerialJTAG.upload.ram.maximum_size=20000
nano.menu.cpu_upload_menu.cbSerialJTAG.upload.flash.maximum_size=128000
nano.menu.cpu_upload_menu.cbSerialJTAG.upload.altID=1
nano.menu.cpu_upload_menu.cbSerialJTAG.upload.protocol=maple_serial
## ==UPLOAD MODE F103C8 ==
## F103C8 USB to Flash upload
## -------------------------
nano.menu.cpu_upload_menu.c8UsbFlash=F103C8(64k) USB->Flash
nano.menu.cpu_upload_menu.c8UsbFlash.build.ldscript=ld/flash_c8.ld
nano.menu.cpu_upload_menu.c8UsbFlash.build.cpu_flags=-DMCU_STM32F103C8 -DBOOTLOADER_maple
nano.menu.cpu_upload_menu.c8UsbFlash.build.vect=VECT_TAB_FLASH
nano.menu.cpu_upload_menu.c8UsbFlash.upload.maximum_size=44000
nano.menu.cpu_upload_menu.c8UsbFlash.upload.ram.maximum_size=17000
nano.menu.cpu_upload_menu.c8UsbFlash.upload.flash.maximum_size=44000
nano.menu.cpu_upload_menu.c8UsbFlash.upload.altID=1
nano.menu.cpu_upload_menu.c8UsbFlash.upload.protocol=maple_dfu
## F103C8 USB to RAM upload
## -------------------------
nano.menu.cpu_upload_menu.c8UsbRAM=F103C8(64k) USB->RAM
nano.menu.cpu_upload_menu.c8UsbRAM.build.ldscript=ld/ram_c8.ld
nano.menu.cpu_upload_menu.c8UsbRAM.build.cpu_flags=-DMCU_STM32F103C8 -DBOOTLOADER_maple
nano.menu.cpu_upload_menu.c8UsbRAM.build.vect=VECT_TAB_RAM
nano.menu.cpu_upload_menu.c8UsbRAM.upload.maximum_size=17000
nano.menu.cpu_upload_menu.c8UsbRAM.upload.ram.maximum_size=17000
nano.menu.cpu_upload_menu.c8UsbRAM.upload.flash.maximum_size=44000
nano.menu.cpu_upload_menu.c8UsbRAM.upload.altID=0
nano.menu.cpu_upload_menu.c8UsbRAM.upload.protocol=maple_dfu
## F103C8 Serial to Flash upload (keep bootloader)
## -------------------------
nano.menu.cpu_upload_menu.c8SerialFlash=F103C8(64k) Serial->Flash (keep bootloader)
nano.menu.cpu_upload_menu.c8SerialFlash.build.ldscript=ld/flash_c8.ld
nano.menu.cpu_upload_menu.c8SerialFlash.build.cpu_flags=-DMCU_STM32F103C8 -DBOOTLOADER_maple
nano.menu.cpu_upload_menu.c8SerialFlash.build.vect=VECT_TAB_FLASH
nano.menu.cpu_upload_menu.c8SerialFlash.upload.maximum_size=44000
nano.menu.cpu_upload_menu.c8SerialFlash.upload.ram.maximum_size=17000
nano.menu.cpu_upload_menu.c8SerialFlash.upload.flash.maximum_size=44000
nano.menu.cpu_upload_menu.c8SerialFlash.upload.altID=1
nano.menu.cpu_upload_menu.c8SerialFlash.upload.protocol=maple_serial
## F103C8 Serial to Flash upload (lost bootloader)
## -------------------------
nano.menu.cpu_upload_menu.c8SerialJTAG=F103C8(64k) Serial->Flash (lost bootloader!!!)
nano.menu.cpu_upload_menu.c8SerialJTAG.build.ldscript=ld/jtag_c8.ld
nano.menu.cpu_upload_menu.c8SerialJTAG.build.cpu_flags=-DMCU_STM32F103C8
nano.menu.cpu_upload_menu.c8SerialJTAG.build.vect=VECT_TAB_FLASH
nano.menu.cpu_upload_menu.c8SerialJTAG.upload.maximum_size=64000
nano.menu.cpu_upload_menu.c8SerialJTAG.upload.ram.maximum_size=20000
nano.menu.cpu_upload_menu.c8SerialJTAG.upload.flash.maximum_size=64000
nano.menu.cpu_upload_menu.c8SerialJTAG.upload.altID=1
nano.menu.cpu_upload_menu.c8SerialJTAG.upload.protocol=maple_serial
##############################################################
maple.name=LeafLabs Maple Rev 3+ to Flash
@ -25,6 +200,7 @@ maple.build.vect=VECT_TAB_FLASH
maple.build.density=STM32_MEDIUM_DENSITY
maple.build.error_led_port=GPIOA
maple.build.error_led_pin=5
maple.build.gcc_ver=gcc-arm-none-eabi-4.8.3-2014q1
##############################################################
mapleRAM.name=LeafLabs Maple Rev 3+ to RAM
@ -51,6 +227,7 @@ mapleRAM.build.vect=VECT_TAB_RAM
mapleRAM.build.density=STM32_MEDIUM_DENSITY
mapleRAM.build.error_led_port=GPIOA
mapleRAM.build.error_led_pin=5
mapleRAM.build.gcc_ver=gcc-arm-none-eabi-4.8.3-2014q1
##############################################################
maple_mini.name=LeafLabs Maple Mini Rev 2 to Flash
@ -78,6 +255,7 @@ maple_mini.build.vect=VECT_TAB_FLASH
maple_mini.build.density=STM32_MEDIUM_DENSITY
maple_mini.build.error_led_port=GPIOB
maple_mini.build.error_led_pin=1
maple_mini.build.gcc_ver=gcc-arm-none-eabi-4.8.3-2014q1
##############################################################
maple_miniRAM.name=LeafLabs Maple Mini Rev 2 to RAM
@ -104,6 +282,7 @@ maple_miniRAM.build.vect=VECT_TAB_RAM
maple_miniRAM.build.density=STM32_MEDIUM_DENSITY
maple_miniRAM.build.error_led_port=GPIOB
maple_miniRAM.build.error_led_pin=1
maple_miniRAM.build.gcc_ver=gcc-arm-none-eabi-4.8.3-2014q1
##############################################################
maple_STM32.name=STM32 to Flash - No bootloader
@ -115,7 +294,7 @@ maple_STM32.upload.use_1200bps_touch=false
maple_STM32.upload.file_type=bin
maple_STM32.upload.ram.maximum_size=17000
maple_STM32.upload.flash.maximum_size=108000
# FIXME ?
maple_STM32.upload.usbID=1EAF:0003
maple_STM32.upload.altID=1
maple_STM32.upload.auto_reset=true
@ -131,5 +310,6 @@ maple_STM32.build.vect=VECT_TAB_FLASH
maple_STM32.build.density=STM32_MEDIUM_DENSITY
maple_STM32.build.error_led_port=GPIOB
maple_STM32.build.error_led_pin=1
maple_STM32.build.gcc_ver=gcc-arm-none-eabi-4.8.3-2014q1
##############################################################

View File

@ -8,8 +8,8 @@ version=0.1.0
# compiler variables
# ----------------------
compiler.path={runtime.ide.path}/hardware/tools/gcc-arm-none-eabi-4.8.3-2014q1/bin/
build.gcc_ver=gcc-arm-none-eabi-4.8.3-2014q1
compiler.path={runtime.ide.path}/hardware/tools/{build.gcc_ver}/bin/
compiler.c.cmd=arm-none-eabi-gcc
compiler.c.flags=-c -g -Os -w -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -DBOARD_{build.variant} -D{build.vect} -DERROR_LED_PORT={build.error_led_port} -DERROR_LED_PIN={build.error_led_pin}
compiler.c.elf.cmd=arm-none-eabi-g++
@ -26,15 +26,18 @@ compiler.elf2hex.flags=-O binary
compiler.elf2hex.cmd=arm-none-eabi-objcopy
compiler.ldflags=
compiler.size.cmd=arm-none-eabi-size
compiler.define=-DARDUINO=
compiler.define=-DARDUINO=
# this can be overriden in boards.txt
build.extra_flags=
build.cpu_flags=
build.hs_flag=
build.common_flags=
build.extra_flags= {build.cpu_flags} {build.hs_flag} {build.common_flags}
# These can be overridden in platform.local.txt
compiler.c.extra_flags=
compiler.c.elf.extra_flags="-L{build.variant.path}/ld"
compiler.cpp.extra_flags=
compiler.cpp.extra_flags=
compiler.S.extra_flags=
compiler.ar.extra_flags=
compiler.elf2hex.extra_flags=
@ -64,10 +67,10 @@ compiler.libs.c.flags="-I{build.system.path}/libmaple" "-I{build.system.path}/li
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -mcpu={build.mcu} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {compiler.libs.c.flags} {includes} "{source_file}" -o "{object_file}"
## Compile c++ files
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -mcpu={build.mcu} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {compiler.libs.c.flags} {includes} "{source_file}" -o "{object_file}"
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -mcpu={build.mcu} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {build.cpu_flags} {build.hs_flag} {build.common_flags} {compiler.libs.c.flags} {includes} "{source_file}" -o "{object_file}"
## Compile S files
recipe.S.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.S.flags} -mcpu={build.mcu} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {compiler.libs.c.flags} {includes} "{source_file}" -o "{object_file}"
recipe.S.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.S.flags} -mcpu={build.mcu} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.cpu_flags} {build.hs_flag} {build.common_flags} {compiler.libs.c.flags} {includes} "{source_file}" -o "{object_file}"
#recipe.S.o.pattern="{compiler.path}{compiler.c.cmd}" "{source_file}" -o "{object_file}"
## Create archives
@ -87,8 +90,9 @@ recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf
## Compute size
recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf"
recipe.size.regex=\.text\s+([0-9]+).*
#recipe.size.regex=\.text\s+([0-9]+).*
recipe.size.regex=^(?:\.text|\.rodata|\.ARM.exidx)\s+([0-9]+).*
recipe.size.regex.data=^(?:\.data|\.bss|\.noinit)\s+([0-9]+).*
# Uploader tools
# -------------------
@ -115,4 +119,13 @@ tools.serial_upload.upload.params.quiet=
tools.serial_upload.upload.pattern="{path}/{cmd}" {serial.port.file} {upload.altID} {upload.usbID} "{build.path}/{build.project_name}.bin"
tools.upload_router.cmd=upload_router
tools.upload_router.cmd.windows=upload_router.bat
#tools.upload_router.cmd.linux=
tools.upload_router.path={runtime.hardware.path}/tools/win
tools.upload_router.upload.params.verbose=-d
tools.upload_router.upload.params.quiet=
tools.upload_router.upload.pattern="{path}/{cmd}" {serial.port.file} {upload.altID} {upload.usbID} "{build.path}/{build.project_name}" {upload.protocol} {build.debuggingMode} "{runtime.ide.path}/hardware/tools/{build.gcc_ver}/bin/"

View File

@ -0,0 +1,33 @@
/*
* libmaple linker script for "Flash" builds.
*
* A Flash build puts .text (and .rodata) in Flash, and
* .data/.bss/heap (of course) in SRAM, but offsets the sections by
* enough space to store the Maple bootloader, which lives in low
* Flash and uses low memory.
*/
/*
* This pulls in the appropriate MEMORY declaration from the right
* subdirectory of stm32/mem/ (the environment must call ld with the
* right include directory flags to make this happen). Boards can also
* use this file to use any of libmaple's memory-related hooks (like
* where the heap should live).
*/
/*INCLUDE mem-flash.inc*/
MEMORY
{
ram (rwx) : ORIGIN = 0x20000C00, LENGTH = 17K
rom (rx) : ORIGIN = 0x08005000, LENGTH = 44K
}
/* Provide memory region aliases for common.inc */
REGION_ALIAS("REGION_TEXT", rom);
REGION_ALIAS("REGION_DATA", ram);
REGION_ALIAS("REGION_BSS", ram);
REGION_ALIAS("REGION_RODATA", rom);
/* Let common.inc handle the real work. */
INCLUDE common.inc

View File

@ -0,0 +1,37 @@
/*
* libmaple linker script for "JTAG" builds.
*
* A "JTAG" build puts .text (and .rodata) in Flash, and
* .data/.bss/heap (of course) in SRAM, but links starting at the
* Flash and SRAM starting addresses (0x08000000 and 0x20000000
* respectively). This will wipe out a Maple bootloader if there's one
* on the board, so only use this if you know what you're doing.
*
* Of course, a "JTAG" build is perfectly usable for upload over SWD,
* the system memory bootloader, etc. The name is just a historical
* artifact.
*/
/*
* This pulls in the appropriate MEMORY declaration from the right
* subdirectory of stm32/mem/ (the environment must call ld with the
* right include directory flags to make this happen). Boards can also
* use this file to use any of libmaple's memory-related hooks (like
* where the heap should live).
*/
/*INCLUDE mem-jtag.inc*/
MEMORY
{
ram (rwx) : ORIGIN = 0x20000C00, LENGTH = 20K
rom (rx) : ORIGIN = 0x08005000, LENGTH = 64K
}
/* Provide memory region aliases for common.inc */
REGION_ALIAS("REGION_TEXT", rom);
REGION_ALIAS("REGION_DATA", ram);
REGION_ALIAS("REGION_BSS", ram);
REGION_ALIAS("REGION_RODATA", rom);
/* Let common.inc handle the real work. */
INCLUDE common.inc

View File

@ -0,0 +1,31 @@
/*
* libmaple linker script for RAM builds.
*
* A Flash build puts .text, .rodata, and .data/.bss/heap (of course)
* in SRAM, but offsets the sections by enough space to store the
* Maple bootloader, which uses low memory.
*/
/*
* This pulls in the appropriate MEMORY declaration from the right
* subdirectory of stm32/mem/ (the environment must call ld with the
* right include directory flags to make this happen). Boards can also
* use this file to use any of libmaple's memory-related hooks (like
* where the heap should live).
*/
/*INCLUDE mem-ram.inc*/
MEMORY
{
ram (rwx) : ORIGIN = 0x20000C00, LENGTH = 17K
rom (rx) : ORIGIN = 0x08005000, LENGTH = 0
}
/* Provide memory region aliases for common.inc */
REGION_ALIAS("REGION_TEXT", ram);
REGION_ALIAS("REGION_DATA", ram);
REGION_ALIAS("REGION_BSS", ram);
REGION_ALIAS("REGION_RODATA", ram);
/* Let common.inc handle the real work. */
INCLUDE common.inc

21
tools/win/debugging.bat Normal file
View File

@ -0,0 +1,21 @@
@Echo off
set fileName=%~n2
set BaseDir=C:\Debugging
set OutputDir=%BaseDir%\%fileName%
IF NOT EXIST %BaseDir%\*.* (echo Need to create directory %BaseDir%)
IF NOT EXIST %OutputDir%\*.* (md %OutputDir%)
set sizeFile=%fileName%.size.txt
set nmFile=%fileName%.nm.txt
set dasmFile=%fileName%.dasm.txt
set pcompFile=%fileName%.pcomp.txt
cd %1
arm-none-eabi-objdump.exe -d -S -l %2.elf > %OutputDir%\%dasmFile%
arm-none-eabi-nm.exe --format="sysv" -C -l %2.elf > %OutputDir%\%nmFile%
arm-none-eabi-size.exe -t -A %2.elf > %OutputDir%\%sizeFile%
arm-none-eabi-size.exe -t -A -x %2.elf >> %OutputDir%\%sizeFile%
start %OutputDir%
echo Done!

View File

@ -0,0 +1,49 @@
@echo off
rem: Note %~dp0 get path of this batch file
rem: Need to change drive if My Documents is on a drive other than C:
set driverLetter=%~dp0
set driverLetter=%driverLetter:~0,2%
%driverLetter%
cd %~dp0
rem: the two line below are needed to fix path issues with incorrect slashes before the bin file name
set str1=%4
set str1=%str1:/=\%
set str1=%str1: =%
set str=%str1%.bin
set elf=%str1%
set str1=%7
set str1=%str1:/=\%
set gcc=%str1: =%
if %6 == 1 (goto debug) else (if %5 == maple_serial (goto Serial) else (goto maple_loader))
:debug
debugging.bat %gcc% %elf%
exit
:maple_loader
rem:java -jar maple_loader.jar %1 %2 %3 %4 %5 %6 %7 %8 %9
echo %1
echo %2
echo %3
java -jar maple_loader.jar %1 %2 %3 %str%
exit
:Serial
stm32flash -g 0x8000000 -b 230400 -w %str% %1
rem: C:\Python27\python.exe stm32loader.py -e -w -p %1 -g -b 115200 %str%
rem: ------------- use STM's own uploader
rem: ---- Need to remove the COM bit from the comm port as the STM prog just wants the number
set commport=%1
set commportnum=%commport:COM=%
rem: --- The maple board may nee the -i setting to be -i STM32_Med-density_128K or STM32_Med-density_64K
rem: ---- 64 bit version
rem: "%ProgramFiles(x86)%\STMicroelectronics\Software\Flash Loader Demonstrator\STMFlashLoader.exe" -c --pn %commportnum% --br 230400 -i STM32_High-density_256K -e --all -d --fn %str% --a 0x8000000 -r --a 0x8000000
rem: -- 32 bit version
rem: "%ProgramFiles%\STMicroelectronics\Software\Flash Loader Demonstrator\STMFlashLoader.exe" -c --pn %commportnum% --br 230400 -i STM32_Med-density_64K -e --all -d --fn %str% --a 0x8000000 -r --a 0x8000000