Software Architecture
The software architecture and source code structure
Categories:
2 minute read
When designing XWOS, the author fully considered the reusability, portability, and compatibility with third-party software of the code.
The code is structured into multiple layers: build system, BSP, operating system kernel, middleware, and application.
build system
xwbs
: When users integrate 3rd-party software, they only need to set the source code list, header file path, and compilation options inxwmo.mk
.
BSP
xwcd
: Code related to compiler, CPU, SOC, and peripheral driversxwcd/ds
: This folder contains the driver framework of XWOS. It is called XWOS Device Stack .xwcd/perpheral
: This folder contains various peripheral drivers implemented by XWOS Device Stack .xwcd/soc
: This folder contains various SOC porting code.
xwbd
: This folder contains engineering configuration, debugging scripts, linking scripts, drivers, and applications related to various boards.
Kernel
xwos
: Kernelxwos/osal
: This folder contains source code of operating system abstraction layer. It unifies the kernel API for both uni-core kernel and multi-core kernel.xwos/ospl
: This folder contains source code of operating system porting layer . It defines the functions provided by the kernel to BSP, as well as the virtual functions that require BSP to provide implementation to kernel.xwos/lib
: This folder contains source code of basic C function library , including atomic operation library, bit operation library, data structure library, etc.xwos/mm
: This folder contains memory managementxwos/mp
: This folder contains source code that implements a multi-core kernel.xwos/up
: This folder contains source code that implements a uni-core kernel.
Middleware
xwmd
: Top folder of middlewarexwmd/isc
: XWOS Communication Mechanismxwmd/isc/xwcq
: Cycle Queuexwmd/isc/xwmq
: Message Queuexwmd/isc/xwssc
: Inter-SOC Communicationxwmd/libc
: Adaptation code for standard C libraryxwmd/xwrust
: XWOS Rust Framework
xwem
: Third party open-source softwarexwem/fs
: file systemsxwem/serializing
: serialization and deserializationxwem/serializing/nanopb
: protocol-buffer
xwem/vm
: Interpretive Language Virtual Machinexwem/vm/lua
: Lua
Applications
xwam
: This folder contains example code and application code.
Documents
xwxr
: This folder contains configuration for automatically generating documents.