1``` 2. 3├── arch --- 内核指令架构层代码 4│ ├── arm --- ARM32架构 5│ │ ├── arm9 --- arm9架构 6│ │ │ └── gcc --- gcc 编译工具链实现 7│ │ ├── cortex-m3 --- Cortex-m3架构 8│ │ │ └── keil --- Keil编译工具链实现 9│ │ ├── cortex-m33 --- Cortex-m33架构 10│ │ │ │── gcc --- GCC编译工具链实现 11│ │ │ │ │── NTZ --- Cortex-m33非TrustZone架构实现 12│ │ │ │ └── TZ --- Cortex-m33 TrustZone架构实现 13│ │ │ └── iar --- IAR编译工具链实现 14│ │ │ │── NTZ --- Cortex-m33非TrustZone架构实现 15│ │ │ └── TZ --- Cortex-m33 TrustZone架构实现 16│ │ └── cortex-m4 --- Cortex-m4架构 17│ │ │ │── gcc --- GCC编译工具链实现 18│ │ │ └── iar --- IAR编译工具链实现 19│ │ └── cortex-m7 --- Cortex-m7架构 20│ │ │── gcc --- GCC编译工具链实现 21│ │ └── iar --- IAR编译工具链实现 22│ ├── csky --- csky架构 23│ │ └── v2 --- csky v2架构 24│ │ └── gcc --- GCC编译工具链实现 25│ ├── xtensa --- xtensa架构 26│ │ └── lx6 --- xtensa lx6架构 27│ │ └── gcc --- GCC编译工具链实现 28│ ├── risc-v --- Risc-v架构 29│ │ ├── nuclei --- Nuclei架构 30│ │ │ └── gcc --- GCC编译工具链实现 31│ │ └── riscv32 --- Riscv32架构 32│ │ └── gcc --- GCC编译工具链实现 33│ └── include 34│ ├── los_arch.h --- 定义arch初始化 35│ ├── los_atomic.h --- 定义通用arch原子操作 36│ ├── los_context.h --- 定义通用arch上下文切换 37│ ├── los_interrupt.h --- 定义通用arch中断 38│ ├── los_mpu.h --- 定义通用arch内存保护 39│ └── los_timer.h --- 定义通用arch定时器 40├── components --- 移植可选组件,依赖内核,单独对外提供头文件 41│ ├── backtrace --- 栈回溯功能 42│ ├── cppsupport --- C++支持 43│ ├── cpup --- CPUP功能 44│ ├── dynlink --- 动态加载与链接 45│ ├── exchook --- 异常钩子 46│ ├── fs --- 文件系统 47│ ├── lmk --- Low memory killer 机制 48│ ├── lms --- Lite memory sanitizer 机制 49│ ├── net --- Network功能 50│ ├── power --- 低功耗管理 51│ ├── security --- 安全隔离 52│ ├── shell --- shell功能 53│ ├── signal --- signal支持 54│ └── trace --- trace 工具 55├── drivers --- 驱动框架Kconfig 56├── kal --- 内核抽象层,提供内核对外接口,当前支持CMSIS接口和部分POSIX接口 57│ ├── cmsis --- CMSIS标准支持 58│ └── posix --- POSIX标准支持 59├── kernel --- 内核最小功能集代码 60│ ├── include 61│ │ ├── los_config.h --- 功能开关和配置参数 62│ │ ├── los_event.h --- 事件 63│ │ ├── los_membox.h --- 静态内存管理 64│ │ ├── los_memory.h --- 动态内存管理 65│ │ ├── los_mux.h --- 互斥锁 66│ │ ├── los_queue.h --- 队列 67│ │ ├── los_sched.h --- 调度算法 68│ │ ├── los_sem.h --- 信号量 69│ │ ├── los_sortlink.h --- 排序链表 70│ │ ├── los_swtmr.h --- 定时器 71│ │ ├── los_task.h --- 任务 72│ │ └── los_tick.h --- Tick时钟 73│ └── src 74├── testsuites --- 内核测试用例 75├── tools --- 内核工具 76└── utils 77 ├── internal 78 ├── BUILD.gn --- Gn构建文件 79 ├── los_compiler.h --- 编译工具配置,类型定义 80 ├── los_debug.c --- Debug,printf相关 81 ├── los_debug.h 82 ├── los_error.c --- 错误处理 83 ├── los_error.h 84 ├── los_hook.c --- 钩子函数注册和调用 85 ├── los_hook.h 86 ├── los_list.h --- 双向链表 87 └── los_reg.h --- 寄存器读写宏定义 88``` 89 90