12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
-
-
-
-
-
- import pioutil
- if pioutil.is_pio_build():
- Import("env")
-
- cxxflags = [
-
-
-
-
- ]
- if "teensy" not in env["PIOENV"]:
- cxxflags += ["-Wno-register"]
- env.Append(CXXFLAGS=cxxflags)
-
-
-
-
- def add_cpu_freq():
- if "BOARD_F_CPU" in env:
- env["BUILD_FLAGS"].append("-DBOARD_F_CPU=" + env["BOARD_F_CPU"])
-
-
-
-
-
-
-
- if env.GetBuildType() == "debug" and env.get("UPLOAD_PROTOCOL") not in ["jlink", "stlink", "custom"]:
- env["BUILD_DIR"] = "$PROJECT_BUILD_DIR/$PIOENV/debug"
-
- def on_program_ready(source, target, env):
- import shutil
- shutil.copy(target[0].get_abspath(), env.subst("$PROJECT_BUILD_DIR/$PIOENV"))
-
- env.AddPostAction("$PROGPATH", on_program_ready)
-
-
-
-
-
- add_cpu_freq()
|