1
0
mirror of https://github.com/thooge/esp32-nmea2000-obp60.git synced 2025-12-13 05:53:06 +01:00

revert back for chip id in app info

This commit is contained in:
andreas
2023-09-09 17:11:32 +02:00
parent 4fcf6b753f
commit c87c38fca4
3 changed files with 10 additions and 10 deletions

View File

@@ -42,11 +42,16 @@ def post(source,target,env):
print("found fwname=%s, fwversion=%s"%(fwname,version))
python=env.subst("$PYTHONEXE")
print("base=%s,esptool=%s,appoffset=%s,uploaderflags=%s"%(base,esptool,appoffset,uploaderflags))
chip="esp32"
uploadparts=uploaderflags.split(" ")
#currently hardcoded last 8 parameters...
if len(uploadparts) < 6:
print("uploaderflags does not have enough parameter")
return
for i in range(0,len(uploadparts)):
if uploadparts[i]=="--chip":
if i < (len(uploadparts) -1):
chip=uploadparts[i+1]
uploadfiles=uploadparts[-6:]
for i in range(1,len(uploadfiles),2):
if not os.path.isfile(uploadfiles[i]):
@@ -64,7 +69,7 @@ def post(source,target,env):
versionedFile=os.path.join(outdir,"%s%s-update.bin"%(base,ofversion))
shutil.copyfile(firmware,versionedFile)
outfile=os.path.join(outdir,"%s%s-all.bin"%(base,ofversion))
cmd=[python,esptool,"--chip","esp32","merge_bin","--target-offset",offset,"-o",outfile]
cmd=[python,esptool,"--chip",chip,"merge_bin","--target-offset",offset,"-o",outfile]
cmd+=uploadfiles
cmd+=[appoffset,firmware]
print("running %s"%" ".join(cmd))