Skip to content

Commit

Permalink
builder: Fix error or warning message not print
Browse files Browse the repository at this point in the history
Signed-off-by: Huaqi Fang <[email protected]>
  • Loading branch information
fanghuaqi committed Jan 2, 2024
1 parent 8e70d93 commit e84cc57
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions builder/frameworks/nuclei-sdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,18 +126,17 @@ def get_arch_flags(arch, abi, tune, cmodel, archext, toolchain):
build_soc = board.get("build.soc", "").strip()

if not build_soc:
sys.stderr.write(
"build.soc is not defined in board description json file %s.json, please check!" % (build_board))
print("Error! build.soc is not defined in board description json file %s.json, please check!" % (build_board))
env.Exit(1)

# Check whether soc is supported by this nuclei sdk
if build_soc in ("hbird", "demosoc"):
if not is_valid_soc(build_soc):
print("%s SoC is deprecated, please use evalsoc instead!" %(build_soc))
print("Warning! %s SoC is deprecated, please use evalsoc instead!" %(build_soc))
build_soc = "evalsoc"

if not is_valid_soc(build_soc):
sys.stderr.write("Could not find SoC software package for SoC %s" % build_soc)
print("Error! Could not find SoC software package for SoC %s" % build_soc)
env.Exit(1)

build_core = board.get("build.core", "").lower().strip()
Expand Down
2 changes: 1 addition & 1 deletion builder/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def _jlink_cmd_script(env, source):
upload_actions = [env.VerboseAction("$UPLOADCMD", "Uploading $SOURCE")]

else:
sys.stderr.write("Warning! Unknown upload protocol %s\n" % upload_protocol)
print("Warning! Unknown upload protocol %s\n" % upload_protocol)

AlwaysBuild(env.Alias("upload", upload_target, upload_actions))

Expand Down

0 comments on commit e84cc57

Please sign in to comment.