@@ -15,6 +15,25 @@ except:
1515 print (RTT_ROOT )
1616 exit (- 1 )
1717
18+ def bsp_pkg_check ():
19+ import subprocess
20+
21+ check_paths = [
22+ os .path .join ("packages" , "hc32-f4-cmsis-latest" ),
23+ os .path .join ("packages" , "hc32-f4-series-latest" )
24+ ]
25+
26+ need_update = not all (os .path .exists (p ) for p in check_paths )
27+
28+ if need_update :
29+ print ("\n ===============================================================================" )
30+ print ("Dependency packages missing, please running 'pkgs --update'..." )
31+ print ("If no packages are fetched, run 'pkgs --upgrade' first, then 'pkgs --update'..." )
32+ print ("===============================================================================" )
33+ exit (1 )
34+
35+ RegisterPreBuildingAction (bsp_pkg_check )
36+
1837TARGET = 'rtthread.' + rtconfig .TARGET_EXT
1938
2039DefaultEnvironment (tools = [])
@@ -47,11 +66,7 @@ Export('SDK_LIB')
4766# prepare building environment
4867objs = PrepareBuilding (env , RTT_ROOT , has_libcpu = False )
4968
50- hc32_library = 'hc32f448_ddl'
51- rtconfig .BSP_LIBRARY_TYPE = hc32_library
52-
53- # include libraries
54- objs .extend (SConscript (os .path .join (libraries_path_prefix , hc32_library , 'SConscript' )))
69+ rtconfig .BSP_LIBRARY_TYPE = None
5570
5671# include drivers
5772objs .extend (SConscript (os .path .join (libraries_path_prefix , 'hc32_drivers' , 'SConscript' )))
0 commit comments