Add binary relocate function to avoid random pio purging
This commit is contained in:
@@ -73,3 +73,13 @@ def encrypt_mks(source, target, env, new_name):
|
||||
|
||||
def add_post_action(action):
|
||||
env.AddPostAction(join("$BUILD_DIR", "${PROGNAME}.bin"), action);
|
||||
|
||||
def add_post_action_hex(action):
|
||||
env.AddPostAction(join("$BUILD_DIR", "${PROGNAME}.hex"), action);
|
||||
|
||||
import shutil
|
||||
def mvHex(source, target, env) :
|
||||
print("Moving Hex...");
|
||||
shutil.copy2(target[0].path, target[0].dir.path + '/../../../binaries');
|
||||
|
||||
add_post_action_hex(mvHex);
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
import pioutil
|
||||
import marlin
|
||||
import shutil
|
||||
Import("env")
|
||||
def mvBinary(source, target, env) :
|
||||
print("Moving Bin...");
|
||||
shutil.copy2(target[0].path, target[0].dir.path + '/../../../binaries');
|
||||
|
||||
marlin.add_post_action(mvBinary)
|
||||
Reference in New Issue
Block a user