Skip to content

Commit

Permalink
Merge branch 'release/v14.0.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
valeros committed Jun 29, 2021
2 parents 3b7dfe1 + 7340c3e commit 645729a
Show file tree
Hide file tree
Showing 10 changed files with 40 additions and 27 deletions.
2 changes: 1 addition & 1 deletion boards/disco_l475vg_iot01a.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
],
"name": "ST B-L475E-IOT01A Discovery kit",
"upload": {
"maximum_ram_size": 131072,
"maximum_ram_size": 98304,
"maximum_size": 1048576,
"protocol": "stlink",
"protocols": [
Expand Down
4 changes: 2 additions & 2 deletions boards/nucleo_l452re.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
],
"name": "ST Nucleo L452RE",
"upload": {
"maximum_ram_size": 65536,
"maximum_size": 262144,
"maximum_ram_size": 163840,
"maximum_size": 524288,
"protocol": "stlink",
"protocols": [
"jlink",
Expand Down
2 changes: 1 addition & 1 deletion boards/nucleo_l476rg.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
],
"name": "ST Nucleo L476RG",
"upload": {
"maximum_ram_size": 131072,
"maximum_ram_size": 98304,
"maximum_size": 1048576,
"protocol": "stlink",
"protocols": [
Expand Down
2 changes: 1 addition & 1 deletion boards/nucleo_l496zg.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
],
"name": "ST Nucleo L496ZG",
"upload": {
"maximum_ram_size": 131072,
"maximum_ram_size": 327680,
"maximum_size": 1048576,
"protocol": "stlink",
"protocols": [
Expand Down
2 changes: 1 addition & 1 deletion boards/vccgnd_f407zg_mini.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"debug": {
"jlink_device": "STM32F407ZG",
"openocd_target": "stm32f1x",
"openocd_target": "stm32f4x",
"svd_path": "STM32F407xx.svd"
},
"frameworks": [
Expand Down
2 changes: 1 addition & 1 deletion builder/frameworks/libopencm3
Submodule libopencm3 updated 1 files
+2 −2 libopencm3.py
10 changes: 7 additions & 3 deletions builder/frameworks/spl.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,17 @@ def get_linker_script(mcu):
with open(template_file) as fp:
data = Template(fp.read())
content = data.substitute(
stack=hex(0x20000000 + ram), # 0x20000000 - start address for RAM
ram=str(int(ram/1024)) + "K",
flash=str(int(flash/1024)) + "K"
stack=hex(0x20000000 + ram), # 0x20000000 - start address for RAM
ram=str(int(ram / 1024)) + "K",
flash=str(int(flash / 1024)) + "K"
)

with open(default_ldscript, "w") as fp:
fp.write(content)

return default_ldscript


env.Append(
CPPPATH=[
join(FRAMEWORK_DIR, board.get("build.core"),
Expand All @@ -82,6 +83,9 @@ def get_linker_script(mcu):
"variants", board.get("build.mcu")[0:7], "inc"),
join(FRAMEWORK_DIR, board.get("build.core"), "spl",
"variants", board.get("build.mcu")[0:7], "src")
],
LINKFLAGS=[
"-nostartfiles"
]
)

Expand Down
39 changes: 24 additions & 15 deletions builder/frameworks/stm32cube.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ def generate_hal_config_file():


def build_custom_lib(lib_path, lib_manifest=None):
if not os.path.isdir(lib_path):
return
if board.get("build.stm32cube.disable_embedded_libs", "no") == "yes":
return
if lib_path:
Expand Down Expand Up @@ -255,8 +257,9 @@ def build_usb_libs(usb_libs_root):

bsp_dir = os.path.join(FRAMEWORK_DIR, "Drivers", "BSP")
components_dir = os.path.join(bsp_dir, "Components")
for component in os.listdir(components_dir):
build_custom_lib(os.path.join(components_dir, component))
if os.path.isdir(components_dir):
for component in os.listdir(components_dir):
build_custom_lib(os.path.join(components_dir, component))

if os.path.isdir(os.path.join(bsp_dir, "Adafruit_Shield")):
build_custom_lib(os.path.join(bsp_dir, "Adafruit_Shield"))
Expand All @@ -266,19 +269,25 @@ def build_usb_libs(usb_libs_root):
#

utils_dir = os.path.join(FRAMEWORK_DIR, "Utilities")
for util in os.listdir(utils_dir):
util_dir = os.path.join(utils_dir, util)
# Some of utilities is not meant to be built
if not any(f.endswith((".c", ".h")) for f in os.listdir(util_dir)):
continue
build_custom_lib(
os.path.join(utils_dir, util),
{
"name": "Util-%s" % util,
"dependencies": [{"name": "FrameworkVariantBSP"}],
"build": {"flags": ["-I $PROJECT_SRC_DIR", "-I $PROJECT_INCLUDE_DIR"], "libLDFMode": "deep"},
},
)
if os.path.isdir(utils_dir):
for util in os.listdir(utils_dir):
util_dir = os.path.join(utils_dir, util)
# Some of utilities is not meant to be built
if not os.path.isdir(util_dir) or not any(
f.endswith((".c", ".h")) for f in os.listdir(util_dir)
):
continue
build_custom_lib(
os.path.join(utils_dir, util),
{
"name": "Util-%s" % util,
"dependencies": [{"name": "FrameworkVariantBSP"}],
"build": {
"flags": ["-I $PROJECT_SRC_DIR", "-I $PROJECT_INCLUDE_DIR"],
"libLDFMode": "deep",
},
},
)

#
# USB libraries from ST
Expand Down
2 changes: 1 addition & 1 deletion builder/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ def __configure_upload_port(env):
]
openocd_args.extend(
debug_tools.get(upload_protocol).get("server").get("arguments", []))
if env.GetProjectOption("debug_speed"):
if env.GetProjectOption("debug_speed", ""):
openocd_args.extend(
["-c", "adapter speed %s" % env.GetProjectOption("debug_speed")]
)
Expand Down
2 changes: 1 addition & 1 deletion platform.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"type": "git",
"url": "https://github.com/platformio/platform-ststm32.git"
},
"version": "14.0.0",
"version": "14.0.1",
"frameworks": {
"mbed": {
"package": "framework-mbed",
Expand Down

0 comments on commit 645729a

Please sign in to comment.