mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-01-20 16:53:30 +08:00
acc66c5479
- 为RT-Thread设计MPU抽象层,支持ARMV7-M,ARMV8-M架构,让用户使用MPU检测栈溢出等内存问题,实现线程内存隔离 - 在components/mp目录下提供通用的API,libcpu目录下提供各处理器架构的具体实现 - 在STM32U575 NUCLEO, STM32H75 NUCLEO开发板测试通过
27 lines
599 B
Python
27 lines
599 B
Python
# RT-Thread building script for component
|
|
|
|
from building import *
|
|
|
|
Import('rtconfig')
|
|
|
|
cwd = GetCurrentDir()
|
|
src = Glob('*.c') + Glob('*.cpp')
|
|
CPPPATH = [cwd]
|
|
|
|
if rtconfig.PLATFORM in ['armcc', 'armclang']:
|
|
src += Glob('*_rvds.S')
|
|
|
|
if rtconfig.PLATFORM in ['gcc']:
|
|
src += Glob('*_init.S')
|
|
src += Glob('*_gcc.S')
|
|
|
|
if rtconfig.PLATFORM in ['iccarm']:
|
|
src += Glob('*_iar.S')
|
|
|
|
if not GetDepend('RT_USING_MEM_PROTECTION') and not GetDepend('RT_USING_HW_STACK_GUARD'):
|
|
SrcRemove(src, 'mpu.c')
|
|
|
|
group = DefineGroup('CPU', src, depend = [''], CPPPATH = CPPPATH)
|
|
|
|
Return('group')
|