Added c3 target

This commit is contained in:
Magnus Persson
2022-10-12 19:52:15 +02:00
parent 1ddd8bc669
commit 1148a23bb4
3 changed files with 130 additions and 85 deletions

View File

@ -46,12 +46,17 @@ def after_build(source, target, env):
print( "Copy file : " + source + " -> " + target )
shutil.copyfile( source, target )
if name == "gravity32-release2" :
target = dir + "/bin/firmware32_2.bin"
if name == "gravity32-c3-release" :
target = dir + "/bin/firmware32_c3.bin"
source = dir + "/.pio/build/" + name + "/firmware.bin"
print( "Copy file : " + source + " -> " + target )
shutil.copyfile( source, target )
target = dir + "/bin/partitions32_c3.bin"
source = dir + "/.pio/build/" + name + "/partitions.bin"
print( "Copy file : " + source + " -> " + target )
shutil.copyfile( source, target )
print( "Adding custom build step (copy firmware): ")
env.AddPostAction("buildprog", after_build)