bsp: raspberry-pico: fix SDK sub-build invocation

This commit is contained in:
CYFS
2026-07-22 13:47:46 +08:00
committed by Rbb666
parent 5fca863334
commit 622c55248c
+11 -4
View File
@@ -1,4 +1,5 @@
import os
import subprocess
import sys
import rtconfig
@@ -32,11 +33,17 @@ objs = PrepareBuilding(env, RTT_ROOT)
ocwd = os.getcwd()
os.chdir(find_package_path(os.getcwd(), 'raspberrypi-pico-sdk-latest'))
print("Enter " + os.getcwd())
package_env = os.environ.copy()
package_env['RTT_EXEC_PATH'] = rtconfig.EXEC_PATH
package_command = [sys.executable, '-m', 'SCons']
if GetOption('clean'):
os.system("scons -c")
else:
os.system("scons")
os.chdir(ocwd)
package_command.append('-c')
try:
package_result = subprocess.call(package_command, env=package_env)
finally:
os.chdir(ocwd)
if package_result:
Exit(package_result)
objs.extend(SConscript(os.path.join(os.getcwd(), 'board', 'ports', 'SConscript'), variant_dir='build/board/ports', duplicate=0))