Overview
Nuclei SDK is developed based on NMSIS, all the SoCs supported in it are following the NMSIS-Core Device Templates Guidance.
So this Nuclei SDK can be treated as a software guide for how to use NMSIS.
The build system we use in Nuclei SDK is Makefile
, it support both Windows
and Linux, and when we develop Nuclei SDK build system, we keep it simple, so
it make developer can easily port this Nuclei SDK software code to other IDEs.
Click Overview to learn more about the Nuclei SDK project overview.
For example, we have ported Nuclei SDK to use Segger embedded Studio, IAR Workbench and PlatformIO.
Directory Structure
To learn deeper about Nuclei SDK project, the directory structure is a good start point.
Below, we will describe our design about the Nuclei SDK directory structure:
Here is the directory structure for this Nuclei SDK.
$NUCLEI_SDK_ROOT
├── application
│ ├── baremetal
│ ├── freertos
│ ├── ucosii
│ └── rtthread
├── Build
│ ├── gmsl
│ ├── toolchain
│ ├── Makefile.base
│ ├── Makefile.conf
│ ├── Makefile.core
│ ├── Makefile.components
│ ├── Makefile.files
│ ├── Makefile.global
│ ├── Makefile.misc
│ ├── Makefile.rtos
│ ├── Makefile.rules
│ └── Makefile.soc
├── doc
│ ├── build
│ ├── source
│ ├── Makefile
│ └── requirements.txt
├── NMSIS
│ ├── Core
│ ├── DSP
│ ├── NN
│ └── Library
├── OS
│ ├── FreeRTOS
│ ├── UCOSII
│ └── RTThread
├── SoC
│ ├── gd32vf103
│ └── evalsoc
├── test
│ ├── core
│ ├── ctest.h
│ ├── LICENSE
│ └── README.md
├── LICENSE
├── Makefile
├── NMSIS_VERSION
├── package.json
├── SConscript
├── README.md
├── setup.bat
└── setup.sh
application
This directory contains all the application softwares for this Nuclei SDK.
The application code can be divided into mainly 4 parts, which are:
Baremetal applications, which will provide baremetal applications without any OS usage, these applications will be placed in application/baremetal/ folder.
FreeRTOS applications, which will provide FreeRTOS applications using FreeRTOS RTOS, placed in application/freertos/ folder.
UCOSII applications, which will provide UCOSII applications using UCOSII RTOS, placed in application/ucosii/ folder.
RTThread applications, which will provide RT-Thread applications using RT-Thread RTOS, placed in application/rtthread/ folder.
SoC
This directory contains all the supported SoCs for this Nuclei SDK, the directory name for SoC and its boards should always in lower case.
Here we mainly support Nuclei processor cores running in Nuclei FPGA evaluation board, the support package placed in SoC/evalsoc/.
In each SoC’s include directory, nuclei_sdk_soc.h must be provided, and include the soc header file, for example, SoC/evalsoc/Common/Include/nuclei_sdk_soc.h.
In each SoC Board’s include directory, nuclei_sdk_hal.h must be provided, and include the board header file, for example, SoC/evalsoc/Board/nuclei_fpga_eval/Include/nuclei_sdk_hal.h.
Build
This directory contains the key part of the build system based on Makefile for Nuclei SDK.
NMSIS
This directory contains the NMSIS header files, which is widely used in this Nuclei SDK, you can check the NMSIS_VERSION file to know the current NMSIS version used in Nuclei-SDK.
We will also sync the changes in NMSIS project when it provided a new release.
OS
This directory provided three RTOS package we suppported which are FreeRTOS, UCOSII and RT-Thread.
LICENSE
Nuclei SDK license file.
NMSIS_VERSION
NMSIS Version file. It will show current NMSIS version used in Nuclei SDK.
package.json
PlatformIO package json file for Nuclei SDK, used in Nuclei Platform for PlatformIO.
SConscript
RT-Thread package scons build script, used in RT-Thread package development.
Makefile
An external Makefile just for build, run, debug application without cd to any corresponding application directory, such as application/baremetal/helloworld/.
setup.sh
Nuclei SDK environment setup script for Linux. You need to create your own setup_config.sh.
# you can export this variable to Nuclei Studio's toolchain folder NUCLEI_TOOL_ROOT=/path/to/your_tool_root
In the $NUCLEI_TOOL_ROOT for Linux, you need to have Nuclei RISC-V GNU GCC toolchain and OpenOCD installed as below.
$NUCLEI_TOOL_ROOT ├── gcc │ ├── bin │ ├── include │ ├── lib │ ├── libexec │ ├── riscv64-unknown-elf │ └── share └── openocd ├── bin ├── contrib ├── distro-info ├── OpenULINK ├── scripts └── share
setup.bat
Nuclei SDK environment setup bat script for Windows. You need to create your own setup_config.bat.
set NUCLEI_TOOL_ROOT=\path\to\your_tool_root
In the %NUCLEI_TOOL_ROOT% for Windows, you need to have Nuclei RISC-V GNU GCC toolchain, necessary Windows build tools and OpenOCD installed as below.
%NUCLEI_TOOL_ROOT% ├── build-tools │ ├── bin │ ├── gnu-mcu-eclipse │ └── licenses ├── gcc │ ├── bin │ ├── include │ ├── lib │ ├── libexec │ ├── riscv64-unknown-elf │ └── share └── openocd ├── bin ├── contrib ├── distro-info ├── OpenULINK ├── scripts └── share
Project Components
This Nuclei SDK project components is list as below:
Nuclei Processor: How Nuclei Processor Core is used in Nuclei SDK
SoC: How Nuclei processor code based SoC device is supported in Nuclei SDK
Board: How Nuclei based SoC’s Board is supported in Nuclei SDK
Peripheral: How to use the peripheral driver in Nuclei SDK
RTOS: What RTOSes are supported in Nuclei SDK
Application: How to use pre-built applications in Nuclei SDK