|
@@ -45,11 +45,27 @@ if rtconfig.PLATFORM == 'iar':
|
|
Export('RTT_ROOT')
|
|
Export('RTT_ROOT')
|
|
Export('rtconfig')
|
|
Export('rtconfig')
|
|
|
|
|
|
|
|
+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')
|
|
|
|
+
|
|
# prepare building environment
|
|
# prepare building environment
|
|
objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
|
|
objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
|
|
|
|
|
|
-objs = objs + SConscript('../Libraries/drivers/SConscript')
|
|
|
|
-objs = objs + SConscript('../Libraries/MIMXRT1050/SConscript')
|
|
|
|
|
|
+imxrt_library = 'MIMXRT1050'
|
|
|
|
+rtconfig.BSP_LIBRARY_TYPE = imxrt_library
|
|
|
|
+
|
|
|
|
+# include libraries
|
|
|
|
+objs.extend(SConscript(os.path.join(libraries_path_prefix, imxrt_library, 'SConscript')))
|
|
|
|
+
|
|
|
|
+# include drivers
|
|
|
|
+objs.extend(SConscript(os.path.join(libraries_path_prefix, 'drivers', 'SConscript')))
|
|
|
|
|
|
# make a building
|
|
# make a building
|
|
DoBuilding(TARGET, objs)
|
|
DoBuilding(TARGET, objs)
|