mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-24 05:04:10 +08:00
bsp: raspberry-pico: fix SDK sub-build invocation
This commit is contained in:
@@ -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))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user