Skip to content

Commit

Permalink
Use correct linker script
Browse files Browse the repository at this point in the history
  • Loading branch information
maxgerhardt committed Feb 9, 2025
1 parent 1330da1 commit bbba2dc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion builder/frameworks/ch32v003fun.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
# get framework directory
FRAMEWORK_DIR = platform.get_package_dir("framework-ch32v003fun")
MAIN_FUN_DIR = "ch32v003fun" if isdir(join(FRAMEWORK_DIR, "ch32v003fun")) else "ch32fun"
CH32FUN_LDSCRIPT = "ch32v003fun.ld" if isdir(join(FRAMEWORK_DIR, "ch32v003fun")) else "ch32fun.ld"

# Add include paths and defines
env.Append(
Expand Down Expand Up @@ -154,7 +155,7 @@ def get_ld_defines(chip_name: str):
"-DTARGET_MCU=%s" % target_mcu,
"-DMCU_PACKAGE=%d" % mcu_package,
"-DTARGET_MCU_LD=%d" % target_mcu_ld,
join(FRAMEWORK_DIR, MAIN_FUN_DIR, "ch32v003fun.ld"),
join(FRAMEWORK_DIR, MAIN_FUN_DIR, CH32FUN_LDSCRIPT),
">",
join("$BUILD_DIR", "ldscript.ld")
]), "Building %s" % join("$BUILD_DIR", "ldscript.ld"))
Expand Down

0 comments on commit bbba2dc

Please sign in to comment.