Explorar o código

[bsp][esp]:fix esp32_c3 ci err

CYFS hai 18 horas
pai
achega
7a4ac8436e
Modificáronse 2 ficheiros con 11 adicións e 2 borrados
  1. 1 1
      bsp/ESP/ESP32_C3/Kconfig
  2. 10 1
      bsp/ESP/ESP32_C3/SConstruct

+ 1 - 1
bsp/ESP/ESP32_C3/Kconfig

@@ -2,7 +2,7 @@ mainmenu "RT-Thread Configuration"
 
 BSP_DIR := .
 
-RTT_DIR := ../..
+RTT_DIR := ../../..
 
 PKGS_DIR := packages
 

+ 10 - 1
bsp/ESP/ESP32_C3/SConstruct

@@ -37,13 +37,21 @@ def elf2image(target, source, env):
 if os.getenv('RTT_ROOT'):
     RTT_ROOT = os.getenv('RTT_ROOT')
 else:
-    RTT_ROOT = os.path.join(os.getcwd(), '..', '..')
+    RTT_ROOT = os.path.join(os.getcwd(), '..', '..', '..')
 
 sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')]
 from building import *
 
 TARGET = 'rtthread.' + rtconfig.TARGET_EXT
+SDK_ROOT = os.path.abspath('./')
 
+if os.path.exists(SDK_ROOT + '/libraries'):
+    libraries_path_prefix = SDK_ROOT + '/libraries'
+else:
+    libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
+
+SDK_LIB = libraries_path_prefix
+Export('SDK_LIB')
 DefaultEnvironment(tools=[])
 env = Environment(tools = ['mingw'],
     AS   = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
@@ -60,6 +68,7 @@ Export('rtconfig')
 # prepare building environment
 objs = PrepareBuilding(env, RTT_ROOT, remove_components = ['libc'])
 
+objs.extend(SConscript(os.path.join(libraries_path_prefix, 'drivers', 'SConscript')))
 # make a building
 DoBuilding(TARGET, objs)