Fysetc AIO II / Cheetah STM32F1 (#14407)

This commit is contained in:
Eric Ptak
2019-06-26 07:40:29 +02:00
committed by Scott Lahteine
parent 8e23e9b16c
commit 8934b32f1b
26 changed files with 14513 additions and 34 deletions

View File

@ -0,0 +1,18 @@
/*
* Linker script for Generic STM32F103RC boards, using the generic bootloader (which takes the lower 8k of memory)
*/
MEMORY
{
ram (rwx) : ORIGIN = 0x20000000, LENGTH = 48K
rom (rx) : ORIGIN = 0x08010000, LENGTH = 256K-40K
}
/* 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,40 @@
from os.path import join
Import("env", "projenv")
# Relocate firmware from 0x08000000 to 0x08002000
#env['CPPDEFINES'].remove(("VECT_TAB_ADDR", 134217728))
#env['CPPDEFINES'].append(("VECT_TAB_ADDR", "0x08010000"))
#env.Replace(LDSCRIPT_PATH="buildroot/share/PlatformIO/ldscripts/fysetc_aio_ii.ld")
# Custom HEX from ELF
env.AddPostAction(
"$BUILD_DIR/${PROGNAME}.elf",
env.VerboseAction(" ".join([
"$OBJCOPY",
"-O",
"ihex",
"$BUILD_DIR/${PROGNAME}.elf",
"$BUILD_DIR/${PROGNAME}.hex"
]), "Building $TARGET"))
# please keep $SOURCE variable, it will be replaced with a path to firmware
# Generic
#env.Replace(
# UPLOADER="serial_upload.bat"
# UPLOADCMD="$UPLOADER stm32loader.py $SOURCE"
#)
# In-line command with arguments
#env.Replace(
# UPLOADCMD="executable -arg1 -arg2 $SOURCE"
#)
# Python callback
#def on_upload(source, target, env):
# print source, target
# firmware_path = str(source[0])
# # do something
# env.Execute(".\serial_upload.bat")
#env.Replace(UPLOADCMD=on_upload)