mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-10-20 05:25:04 +08:00
[tools] Fix the sys.path issue in IARVersion.
This commit is contained in:
@@ -1,6 +1,4 @@
|
|||||||
from building import *
|
from building import *
|
||||||
from distutils.version import LooseVersion
|
|
||||||
from iar import IARVersion
|
|
||||||
|
|
||||||
Import('rtconfig')
|
Import('rtconfig')
|
||||||
|
|
||||||
@@ -8,12 +6,15 @@ src = Glob('*.c')
|
|||||||
cwd = GetCurrentDir()
|
cwd = GetCurrentDir()
|
||||||
group = []
|
group = []
|
||||||
|
|
||||||
CPPPATH = [cwd]
|
CPPPATH = [cwd]
|
||||||
CPPDEFINES = ['RT_USING_DLIBC']
|
CPPDEFINES = ['RT_USING_DLIBC']
|
||||||
|
|
||||||
if rtconfig.PLATFORM == 'iar':
|
if rtconfig.PLATFORM == 'iar':
|
||||||
|
|
||||||
if GetDepend('RT_USING_DFS'):
|
if GetDepend('RT_USING_DFS'):
|
||||||
|
from distutils.version import LooseVersion
|
||||||
|
from iar import IARVersion
|
||||||
|
|
||||||
CPPDEFINES = CPPDEFINES + ['_DLIB_FILE_DESCRIPTOR']
|
CPPDEFINES = CPPDEFINES + ['_DLIB_FILE_DESCRIPTOR']
|
||||||
|
|
||||||
if LooseVersion(IARVersion()) < LooseVersion("8.20.1"):
|
if LooseVersion(IARVersion()) < LooseVersion("8.20.1"):
|
||||||
|
@@ -124,6 +124,7 @@ def PrepareBuilding(env, root_directory, has_libcpu=False, remove_components = [
|
|||||||
|
|
||||||
Env = env
|
Env = env
|
||||||
Rtt_Root = os.path.abspath(root_directory)
|
Rtt_Root = os.path.abspath(root_directory)
|
||||||
|
sys.path = sys.path + [os.path.join(Rtt_Root, 'tools')]
|
||||||
|
|
||||||
# add compability with Keil MDK 4.6 which changes the directory of armcc.exe
|
# add compability with Keil MDK 4.6 which changes the directory of armcc.exe
|
||||||
if rtconfig.PLATFORM == 'armcc':
|
if rtconfig.PLATFORM == 'armcc':
|
||||||
|
Reference in New Issue
Block a user