2023-05-16 18:41:54 +08:00
|
|
|
Import('RTT_ROOT')
|
|
|
|
Import('rtconfig')
|
2022-05-19 14:06:35 +08:00
|
|
|
from building import *
|
|
|
|
|
|
|
|
cwd = GetCurrentDir()
|
|
|
|
|
|
|
|
# add the general drivers.
|
|
|
|
src = Split("""
|
|
|
|
board.c
|
|
|
|
MCUX_Config/clock_config.c
|
|
|
|
MCUX_Config/pin_mux.c
|
2023-05-16 18:41:54 +08:00
|
|
|
MCUX_Config/dcd.c
|
2022-05-19 14:06:35 +08:00
|
|
|
""")
|
|
|
|
|
|
|
|
CPPPATH = [cwd,cwd + '/MCUX_Config',cwd + '/ports']
|
|
|
|
|
|
|
|
CPPDEFINES = ['CPU_MIMXRT1021DAG5A', 'ENDIANNESS', 'STD=C99', 'SKIP_SYSCLK_INIT', 'EVK_MCIMXRM', 'FSL_SDK_ENABLE_DRIVER_CACHE_CONTROL','XIP_EXTERNAL_FLASH=1', 'XIP_BOOT_HEADER_ENABLE=1']
|
|
|
|
|
2022-08-15 22:32:27 +08:00
|
|
|
if rtconfig.PLATFORM in ['armcc', 'armclang']:
|
2022-05-19 14:06:35 +08:00
|
|
|
CPPDEFINES.append('__FPU_PRESENT=1')
|
2022-08-15 11:21:27 +08:00
|
|
|
|
2022-05-19 14:06:35 +08:00
|
|
|
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH, CPPDEFINES=CPPDEFINES)
|
|
|
|
|
|
|
|
Return('group')
|