diff options
| author | Kevin Liu <[email protected]> | 2022-04-14 10:54:53 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-04-14 10:54:53 +0800 |
| commit | 8af8decb620608e4be2c0c87c0245ed89fb0fa8d (patch) | |
| tree | 6ec32e6613e10664dc965c956e98e3b9887c8985 /bsp/microchip/same54/SConstruct | |
| parent | efdd28bde620b7695ef852b8ab647cbddb12e646 (diff) | |
Add Microchip SAM series MCU support for RT-Thread (#5771)
* Add Microchip SAM series MCU support for RT-Thread
Add Microchip SAM series MCU support for RT-Thread, including SAM Cortex-M0+, M4F and M7.
* Add bsp directory to ignored check list
Add bsp directory to ignored check list, add microchip /samc21/same54/same70 to workflows list
* remove STDIO definition and bug fix
1. remove STDIO code from Microchip official BSP. 2. bug fix of SAME70 hpl/hpl_usart.c, samc21&same54 hpl/hpl_sercom.c baudrate update interface. 3. Add RT-Thread standard STDIO implementation on Microchip SAM MCU.
* add CAN driver & example and script fix
Add CAN driver and example for SAMC21/SAME5x/SAME70 and fix rtconfig.py issue(unused space might result link error)
* Add Chinese version README
Add Chinese version README for SAMC21/E54/E70
Diffstat (limited to 'bsp/microchip/same54/SConstruct')
| -rw-r--r-- | bsp/microchip/same54/SConstruct | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/bsp/microchip/same54/SConstruct b/bsp/microchip/same54/SConstruct new file mode 100644 index 0000000000..4d91cd5ba5 --- /dev/null +++ b/bsp/microchip/same54/SConstruct @@ -0,0 +1,41 @@ +import os +import sys +import rtconfig + +if os.getenv('RTT_ROOT'): + RTT_ROOT = os.getenv('RTT_ROOT') +else: + RTT_ROOT = os.path.normpath(os.getcwd() + '/../../..') + +sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')] +try: + from building import * +except: + print('Cannot found RT-Thread root directory, please check RTT_ROOT') + print(RTT_ROOT) + exit(-1) + +TARGET = 'rt-thread-' + rtconfig.DEVICE_PART + '.' + rtconfig.TARGET_EXT + +DefaultEnvironment(tools=[]) +env = Environment(tools = ['mingw'], + AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS, + CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS, + AR = rtconfig.AR, ARFLAGS = '-rc', + CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS, + LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) +env.PrependENVPath('PATH', rtconfig.EXEC_PATH) + +if rtconfig.PLATFORM == 'iar': + env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) + env.Replace(ARFLAGS = ['']) + env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread-'+ rtconfig.DEVICE_PART + '.map') + +Export('RTT_ROOT') +Export('rtconfig') + +# prepare building environment +objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) + +# make a building +DoBuilding(TARGET, objs) |
