-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathextra_script.py
More file actions
executable file
·36 lines (31 loc) · 1.15 KB
/
extra_script.py
File metadata and controls
executable file
·36 lines (31 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Import("env")
# Custom HEX from ELF
env.AddPostAction(
"$BUILD_DIR/${PROGNAME}.elf",
env.VerboseAction(" ".join([
"$OBJCOPY", "-O", "ihex", "-R", ".eeprom",
"$BUILD_DIR/${PROGNAME}.elf", "$BUILD_DIR/${PROGNAME}.hex"
]), "Building $BUILD_DIR/${PROGNAME}.hex")
)
# from os.path import join
# # platform = env.PioPlatform()
# board = env.BoardConfig()
# # def __configure_upload_port(env):
# # return env.subst("$UPLOAD_PORT")
# env.Replace(
# # __configure_upload_port=__configure_upload_port,
# # UPLOADER=join(
# # '"%s"' % platform.get_package_dir("tool-stm32duino") or "",
# # "stm32flash", "stm32flash"),
# UPLOADERFLAGS=[
# "-g", board.get("upload.offset_address", "0x08000000"),
# "-R",
# "-i", "-rts,-dtr,dtr,-dtr:rts,-rts,dtr,rts",
# "-b", "115200", "-w"
# ],
# # UPLOADCMD='$UPLOADER $UPLOADERFLAGS "$SOURCE" "${__configure_upload_port(__env__)}"'
# )
# # upload_actions = [
# # env.VerboseAction(env.AutodetectUploadPort, "Looking for upload port..."),
# # env.VerboseAction("$UPLOADCMD", "Uploading $SOURCE")
# # ]