Probably a very simple solution. I’m trying to copy a binary after compile. Everything works except the actual file copy.
Import("env")
def post_program_action(source, target, env):
src = target[0].get_abspath()
dest = env["PROJECT_DIR"]+env.GetProjectOption("renameToFile")
print("dest:"+dest)
print("source:"+src)
# Copy(dest, src)
Command(dest, src, Copy("$TARGET", "$SOURCE"))
env.AddPostAction("$BUILD_DIR/firmware.hex", post_program_action)
The source and destination paths are correct and exist. The file just doesn’t get copied.