Nuclei RISC-V Software Development Kit
This is release version 0.5.0
of Nuclei SDK, please use it with Nuclei Studio 2023.10 release.
- This 0.5.0 version is a big change version for Nuclei SDK, it now support Nuclei Toolchain 2023.10, which have gnu toolchain and llvm toolchain in it, gcc version increased to gcc 13, and clang version used is clang 17. It will no longer support old gcc 10 version, since gcc and clang
-march
option changed a lot, such as b extension changed to_zba_zbb_zbc_zbs
.- This version also introduced other compiler support such as terapines zcc and IAR compiler. For terapines zcc compiler, please visit https://www.terapines.com/ to contact them for toolchain evaluation, pass
TOOLCHAIN=terapines
during make to select terapines zcc compiler. For IAR compiler, please visit https://www.iar.com/riscv for IAR workbench evaluation, we provided iar projects to take a try with it.- This version introduced libncrt v3.0.0 support, which split libncrt library into three parts, you need to take care when using newer toolchain.
- This version removed demosoc support, please use evalsoc instead.
- This version introduced qemu 8.0 support, old qemu will not be supported.
- This version introduced Nuclei Studio 2023.10 support which introduced llvm toolchain support via npk, so it can only works with 2023.10 or later version.
- This version required a lot of new npk features introduced in Nuclei Studio 2023.10, so it can only be imported as npk package in Nuclei Studio 2023.10 or later version.
Please create issue if you are facing issues using Nuclei SDK, see https://github.com/Nuclei-Software/nuclei-sdk/issues
Application
__set_hpm_event
function, take care if you are using this API.toolchain_$(TOOLCHAIN).mk
file to place toolchain specified options, see benchmark examples' MakefileNMSIS
SOC
Build System
develop_buildsystem_var_stdclib
--specs=nano.specs
like --specs=
gcc only options, since clang don't support it, we directly link the required libraries according to the library type you want to use in Makefile, group all the required libraries using --start-group archives --end-group
of linker option, see https://sourceware.org/binutils/docs/ld/Options.html, but when using Nuclei Studio, the Eclipse CDT based IDE didn't provided a good way to do library group, here is an issue tracking it, see https://github.com/eclipse-embed-cdt/eclipse-plugins/issues/592
-nodefaultlibs
option to not use any standard system libraries when linking, so we need to specify the system libraries we want to use during linking, which is the best way to support both gcc and clang toolchain.-lgcc
), newlib c library(-lc/-lc_nano
) and math library(-lm
), the c and math features are also provided in libncrt library-fomit-frame-pointer -fno-shrink-wrap-separate
options for Zc extension to enable zcmp instruction generationTools
RTOS
Misc
Check https://doc.nucleisys.com/nuclei_sdk/quickstart.html#quickstart to know how to get started with Nuclei SDK.
Full Changelog: https://github.com/Nuclei-Software/nuclei-sdk/compare/0.4.1...0.5.0
This is release version 0.4.1
of Nuclei SDK.
Application
NMSIS
Bump NMSIS to 1.1.1 release version, NMSIS DSP/NN prebuilt libraries are built with 1.1.1 release.
Add CIDU support via core_feature_cidu.h, and __CIDU_PRESENT
macro is required in <Device>.h
to represent CIDU present or not
Add macros of HPM m/s/u event enable, events type, events idx
Fix define error of HPM_INIT macro
Due to mhartid csr update for nuclei subsystem reference design, two new API added called __get_hart_id
and __get_cluster_id
Build System
--specs=nosys.specs
compile options used during compiling, since we have implement almost all necessary newlibc stub functions, no need to link the nosys version, which will throw warning of link with empty newlibc stub functions.SoC
startup_demosoc.S
__CIDU_PRESENT
macro to control CIDU present or not in demosoc.h
and evalsoc.h
which is the <Device>.h
SEMIHOST=1
control semihost support--specs=nosys.specs
CI
Tools
--uniqueid <id>
option for nsdk cli toolsFull Changelog: https://github.com/Nuclei-Software/nuclei-sdk/compare/0.4.0...0.4.1
This is release version 0.4.0
of Nuclei SDK.
Application
app_demo_pmp
application to demostrate pmp feature.app_demo_spmp
application to demostrate smode pmp feature, spmp is present when TEE feature is enabled.demo_smode_eclic
application to demonstrate ECLIC interrupt with TEE feature of Nuclei Processor.test/core
test case due to EXC_Frame_Type
struct member name changes.NMSIS
__CTZ
count trailing zero API in core_compatiable.h__switch_mode
switch risc-v privilege mode API in core_feature_base.h__enable_irq_s
, __disable_irq_s
smode irq control(on/off) API in core_feature_base.h__set_medeleg
exception delegation API in core_feature_base.h__set_PMPENTRYx
and __get_PMPENTRYx
API for easily PMP configuration in core_feature_pmp.hSysTimer_SetHartCompareValue
, SysTimer_SetHartSWIRQ
and etc in core_feature_timer.h, this is mainly needed when configure timer in smode per hartICachePresent/DCachePresent
APIBuild System
intexc_<Device>_s.S
asm file into compiling for evalsoc and demosocARCH_EXT
information when run make infoBOOT_HARTID
and JTAGSN
support, which need to be done in SoC support code and build systemSoC
Add smode interrupt and exception handling framework for evalsoc and demosoc, for details see code changes.
.vector_s
is added(required in linker script) to store smode vector table which is initialized in system_<Device>.c
intexc_<Device>_s.S
asm source file is added to handle s-mode interrupt and exceptionsystem_<Device>.c
Exception_DumpFrame
parameters changed to add mode passing in system_<Device>.c/h
EXC_Frame_Type
struct member mcause/mepc changed to cause/epc in system_<Device>.c/h
Print \0
instead of \r
when do simulation exit for better integration in Nuclei Studio QEMU simulation.
Add clock
stub function for libncrt library in demosoc/evalsoc/gd32vf103 SoC support software.
Add sram
download mode for evalsoc/demosoc, for details directly check the linker script
Change default __ICACHE_PRESENT/__DCACHE_PRESENT
to 1 for evalsoc/demosoc, when evalsoc/demosoc startup, it will
enable i/d cache if it really present.
Update openocd configuration files to remove deprecated command which might not be support in future
Merge smp and single core openocd config into one configuration for evalsoc and demosoc
Add BOOT_HARTID support for evalsoc and demosoc, which is used to specify the boot hartid, used together with SMP can support SMP or AMP run mode
Add JTAGSN support to specify a unified hummingbird jtag debugger via adapter serial
For AMP support, we can work together with Nuclei Linux SDK, see https://github.com/Nuclei-Software/nsdk_ampdemo
Add NPK support for SMP/AMP working mode, and sram download mode
CI
Tools
httpserver.py
tool to create a http server on selected folder, good to preview built documentation.nsdk_runcpu.py
tool to run fpga baremetal benchmarkDocumentation
make preview
to preview build documentation.Full Changelog: https://github.com/Nuclei-Software/nuclei-sdk/compare/0.3.9...0.4.0
This is release version 0.3.9
of Nuclei SDK.
Application
lowpower
application to demostrate lowpower feature of Nuclei Processor.demo_nice
application due to RTL change in cpu.NMSIS
Build System
SoC
Add npk support for smp, required to update ide plugin in Nuclei Studio 2022.04. And also a new version of qemu is required, if you want to run in qemu.
Add evalsoc
in Nuclei SDK, evalsoc
is a new evaluation SoC for Nuclei RISC-V Core, for next generation
of cpu evaluation with iregion feature support. demosoc
will be deprecated in future, when all our CPU IP
provide iregion support.
Important: A lot of changes are maded to linker script of SDK.
ram
to ilm
._text_lma/_text/_etext
to replace _ilm_lma/_ilm/_eilm
, and startup code now using new ld symbols.FPU state are set to initial state when startup, not previous dirty state.
Vector are enabled and set to initial state when startup, when vector are enabled during compiling.
For latest version of Nuclei CPU IP, BPU cold init need many cycles, so we placed bpu enable before enter to main.
For detailed changes, please check commit histories since 0.3.8 release.
This is release version 0.3.8
of Nuclei SDK.
Application
smphello
application to test baremetal smp support, this will do demostration
to boot default 2 core and each hart print hello world.NMSIS
Build
SYSCLK
and CLKSRC
make variable for gd32vf103 SoC to set system clock in hz and clock source, such as SYSCLK=72000000 CLKSRC=hxtal
EXCLUDE_SRCS
make variable in MakefileC_SRCS/ASM_SRCS/CXX_SRCS
now support wildcard patternUSB_DRV_SUPPORT
in gd32vf103 is removed, new USB_DRIVER
is introduced, USB_DRIVER=device/host/both
to choose device,
host or both driver code.SMP
, HEAPSZ
and STACKSZ
make variable are introduced to control stack/heap
size and smp cpu count used in SDKSoC
HEAPSZ
and STACKSZ
HEAPSZ
, STACKSZ
and SMP
SMP=2
to build for 2 smp cpu.Tools
nsdk_report.py
such as NUCLEI_SDK_ROOT
, OPENOCD_CFG
and LINKER_SCRIPT
.SMP
variableOS
For detailed changes, please check commit histories since 0.3.7 release.
This is release version 0.3.7
of Nuclei SDK.
Application
ground
, inline
and best
are supportedNMSIS
Build
showflags
target to show compiling information and flagsshowtoolver
target to show tool version usedSoC
default_intexc_handler
, which means user need to register
the interrupt handler using ECLIC_SetVector
before enable it.demosoc
, internal usageTools
nsdk_report.py
script to support generate benchmark run result in excel.ncycm
cycle model runner support in nsdk_bench.py
nsdk_runner.py
script for running directly on different fpga board with feature of programing fpga bitstream using vivadoFor detailed changes, please check commit histories since 0.3.6 release.
This is release version 0.3.6
of Nuclei SDK.
Application
NMSIS
__CCM_PRESENT
macro in NMSIS-Core, if CCM hardware unit is present in your CPU,
__CCM_PRESENT
macro need to be set to 1 in <Device>.h
core_feature_eclic.h
nmsis_gcc.h
Build
run_xlspike
and run_qemu
make target supportSIMU=xlspike
or SIMU=qemu
passed in make will auto exit xlspike/qemu if main function returnedSoC
For detailed changes, please check commit histories since 0.3.5 release.
This is release version 0.3.5
of Nuclei SDK.
!!!Caution!!!
- This version introduce a lot of new featues, and required Nuclei GNU Toolchain 2022.01
- If you want to import as NPK zip package into Nuclei Studio, 2022.01 version is required.
- If you want to have smaller code size for Nuclei RISC-V 32bit processors, please define
STDCLIB=libncrt_small
in your application Makefile, or change STDCLIB defined inBuild/Makefile.base
to make it available globally.
Application
DSP_ENABLE and VECTOR_ENABLE are deprecated now in demo_dsp application, please use ARCH_EXT to replace it.
ARCH_EXT=p
equal to DSP_ENABLE=ON
, ARCH_EXT=v
equal to VECTOR_ENABLE=ON
.
demo_dsp
application no need to set include and libraries for NMSIS DSP library, just use NMSIS_LIB = nmsis_dsp
to
select NMSIS DSP library and set include directory.
Update coremark compile options for different Nuclei cpu series, currently
900 series options and 200/300/600 series options are provided, and can be selected by CPU_SERIES
.
CPU_SERIES=900
: the compiler options for Nuclei 900 series will be selected.Fix whetstone
application compiling issue when compiled with v extension present
SoC
putchar/getchar
newlib stub are required to be implemented for RT-Thread porting__HEAP_SIZE
__heap_start
and __heap_end
sbrk
now using new heap start and end ld symbols.vtable
section now instead of .vtable_ilm
,
VECTOR_TABLE_REMAPPED
macro is still required in DOWNLOAD=flash modeNMSIS
__RISCV_FEATURE_DSP
and __RISCV_FEATURE_VECTOR
for riscv_math.h
now, it is now auto-defined in riscv_math_types.h
OS
Build System
-lstdc++
library when using STDCLIB=newlib_xxx
medlow
for RV32 otherwise medany
for RV64.nuclei-200-series
,
nuclei-300-series
, nuclei-600-series
and nuclei-900-series
in Nuclei RISC-V GNU toolchain >= 2021.12Contribution
NPK
newlibsel configuration variable changed to stdclib, and is not compatiable.
SoC/demosoc/Common/npk.yml
SoC/demosoc/Common/npk.yml
tools
For detailed changes, please check commit histories since 0.3.4 release.
This is release version 0.3.4
of Nuclei SDK.
CI
Build System
Tools
tools/scripts/nsdk_cli/configs/nuclei_fpga_eval_ci_qemu.json
description issue for dsp enabled build configstools/scripts/nsdk_cli/nsdk_bench.py
p
to ,ext=p
SoC
NPK
-x assembler-with-cpp
in npk.yml for sspFor detailed changes, please check commit histories since 0.3.3 release.
This is release version 0.3.3
of Nuclei SDK.
NPK
For detailed changes, please check commit histories since 0.3.2 release.