@@ -134,6 +134,7 @@ def build_app(app, device_type, with_profiling=False, no_networking=False, is_re
134134 # To do: clean up if any of the flags changed since last build
135135 print ("Building app '%s'" % app )
136136 args = [IDF_PY , "app" ]
137+ args .append (f"-DRG_BUILD_APP={ app } " )
137138 args .append (f"-DRG_BUILD_VERSION={ PROJECT_VER } " )
138139 args .append (f"-DRG_BUILD_TARGET={ re .sub (r'[^A-Z0-9]' , '_' , device_type .upper ())} " )
139140 args .append (f"-DRG_BUILD_RELEASE={ 1 if is_release else 0 } " )
@@ -145,7 +146,7 @@ def build_app(app, device_type, with_profiling=False, no_networking=False, is_re
145146
146147def flash_app (app , port , baudrate = 1152000 ):
147148 os .putenv ("ESPTOOL_CHIP" , os .getenv ("IDF_TARGET" , "auto" ))
148- os .putenv ("ESPTOOL_BAUD" , baudrate )
149+ os .putenv ("ESPTOOL_BAUD" , str ( baudrate ) )
149150 os .putenv ("ESPTOOL_PORT" , port )
150151 if not os .path .exists ("partitions.bin" ):
151152 print ("Reading device's partition table..." )
@@ -158,7 +159,7 @@ def flash_app(app, port, baudrate=1152000):
158159
159160def flash_image (image_file , port , baudrate = 1152000 ):
160161 os .putenv ("ESPTOOL_CHIP" , os .getenv ("IDF_TARGET" , "auto" ))
161- os .putenv ("ESPTOOL_BAUD" , baudrate )
162+ os .putenv ("ESPTOOL_BAUD" , str ( baudrate ) )
162163 os .putenv ("ESPTOOL_PORT" , port )
163164 print (f"Flashing image file '{ image_file } ' to { port } " )
164165 run ([ESPTOOL_PY , "write_flash" , "--flash_size" , "detect" , "0x0" , image_file ])
0 commit comments