Skip to content

Commit 5bbb4e5

Browse files
committed
rg_tool: Allow specifying no .fw format if the target doesn't support any.
1 parent efe65bf commit 5bbb4e5

File tree

6 files changed

+13
-5
lines changed

6 files changed

+13
-5
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
import os
22

33
os.environ["IDF_TARGET"] = "esp32"
4-
#os.environ["FW_FORMAT"] = "odroid"
4+
os.environ["FW_FORMAT"] = "none"
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
import os
22

33
os.environ["IDF_TARGET"] = "esp32s3"
4-
os.environ["FW_FORMAT"] = "esplay"
4+
os.environ["FW_FORMAT"] = "none"
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
import os
22

33
os.environ["IDF_TARGET"] = "esp32s3"
4-
os.environ["FW_FORMAT"] = "esplay"
4+
os.environ["FW_FORMAT"] = "none"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import os
2+
3+
os.environ["IDF_TARGET"] = "esp32"
4+
os.environ["FW_FORMAT"] = "none"
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
import os
22

33
os.environ["IDF_TARGET"] = "esp32"
4-
os.environ["FW_FORMAT"] = "odroid"
4+
os.environ["FW_FORMAT"] = "none"

rg_tool.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,12 @@ def monitor_app(app, port, baudrate=115200):
232232

233233
if command in ["build-fw", "release"]:
234234
print("=== Step: Packing ===\n")
235+
fw_format = os.getenv("FW_FORMAT")
235236
fw_file = ("%s_%s_%s.fw" % (PROJECT_NAME, PROJECT_VER, args.target)).lower()
236-
build_firmware(fw_file, apps, os.getenv("FW_FORMAT"), args.fatsize)
237+
if fw_format in ["odroid", "esplay"]:
238+
build_firmware(fw_file, apps, os.getenv("FW_FORMAT"), args.fatsize)
239+
else:
240+
print("Device doesn't support fw format, try build-img!")
237241

238242
if command in ["build-img", "release", "install"]:
239243
print("=== Step: Packing ===\n")

0 commit comments

Comments
 (0)