changelog.rst 83 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491
  1. .. _changelog:
  2. Changelog
  3. =========
  4. V0.9.0-dev
  5. ----------
  6. .. note::
  7. - Please use ``Nuclei Studio 2025.10`` with v0.9.0 and later version.
  8. - **Nuclei N100 series with ECLIC configured** are supported, see :ref:`N100 support limitation <n100_support_limitation>`
  9. - ECLIC v2 hardware feature is supported, only can run on Nuclei RISC-V CPU with ECLIC v2, see :ref:`design_soc_evalsoc_eclicv2`
  10. This is release version of ``0.9.0`` of Nuclei SDK, which is still under development.
  11. * NMSIS
  12. - Change ``core_feature_pmp.h`` to support more PMP entries, changed from 16 to 64 now
  13. - Enable __LD/__SD macro when Zilsd extension present for rv32 in ``core_feature_base.h``
  14. - Add comments for updating ECLIC threshold MTH setting recommendations in ``core_feature_eclic.h``
  15. - Add ECLICv2 related CSR and bit macros in ``riscv_encoding.h`` to support ECLICv2 hardware context auto-save feature
  16. - Add ECLICv2 shadow register level APIs ``ECLIC_SetShadowLevel`` and ``ECLIC_GetShadowLevel`` in ``core_feature_eclic.h``
  17. - Add ECLICv2 s-mode shadow register level APIs ``ECLIC_SetShadowLevel_S`` and ``ECLIC_GetShadowLevel_S`` for TEE in ``core_feature_eclic.h``
  18. - Add ECLICv2 shadow register level register APIs ``ECLIC_SetShadowLevelReg``/``ECLIC_GetShadowLevelReg`` and ``ECLIC_SetShadowLevelReg_S``/``ECLIC_GetShadowLevelReg_S`` in ``core_feature_eclic.h``
  19. - Add new S-mode ECLIC interrupt pending control APIs ``ECLIC_SetPendingIRQ_S``, ``ECLIC_GetPendingIRQ_S`` and ``ECLIC_ClearPendingIRQ_S`` in ``core_feature_eclic.h``
  20. - Fix **HDBG** bit position in SysTimer **MTIMECTL** from 4 to 3 in ``core_feature_timer.h``
  21. - Add **MTIME_SRC** bit position and update SRW control handling in ``core_feature_timer.h``
  22. - Add new field mapping of ``CSR_MTLBCFGINFO_Type`` CSR structure in ``core_feature_base.h``
  23. - Introduced ``rv_counter_t`` type to support n100 time/cycle/instret counter since it is only 24 bit but other cpu is 64 bit
  24. - Update ``core_feature_timer.h``, ``core_feature_base.h`` and ``nmsis_bench.h`` for n100 cpu
  25. - Add RISC-V fence barrier before CSR read such as ``cycle/instret/time/hpmcounter`` to ensure ordering with prior memory/IO operations in ``core_feature_base.h``
  26. - Relocate fence-related definitions to a more logical position in the header file ``core_feature_base.h``
  27. - Add new APIs to maintain Cluster Cache coherency in ``core_feature_cache.h``
  28. - Add ``core_feature_smpcc.h`` to support SMP and Cluster Cache Related operations.
  29. - Correct the L2 cache read/write hit event definitions in ``nmsis_bench.h`` to match the true hardware behavior.
  30. - Update ``CSR_MSUBM_Type`` structure in ``core_feature_base.h`` with detailed sub-mode descriptions and new ``gpridx``/``pgpridx`` fields
  31. - Add new ``CSR_MMISC_CTL1_Type`` union in ``core_feature_base.h`` to support FP16 mode and VLSU features
  32. - Update ``CSR_MMISCCTRL_Type`` structure in ``core_feature_base.h`` with ``lsu_allow_diff_en`` and ``hw_auto_context`` fields
  33. - Update ``CSR_MILMCTL_Type`` structure in ``core_feature_base.h`` with ``dis_lsu_ilm`` field
  34. - Update ``CSR_MECC_CTL_Type`` structure in ``core_feature_base.h`` with ``io_prot_chk_en`` field and 64-bit support
  35. - Add new CSR bit field definitions for ``MSUBM``/``SSUBM`` in ``riscv_encoding.h``
  36. - Update ``CSR_MDLMCTL_Type`` structure in ``core_feature_base.h`` with ``dlm_va_en`` and ``dis_lsu_dlm`` field
  37. - Add bit mask of ``CSR_MCACHE_CTL`` and ``CSR_MECC_CODE`` in ``riscv_encoding.h``
  38. - Add ``core_feature_ecc.h`` and update ``core_feature_smpcc.h`` to support ECC related operations.
  39. - Add SSUBM CSR handling for ECLIC v2 to enable proper S-Mode vector interrupt nesting with ``SAVE_SSUBM_VAR()`` and
  40. ``RESTORE_SSUBM_VAR()`` macros in ``core_feature_eclic.h``
  41. - Extend ``CSR_MCFG_INFO`` bit definitions with new feature flags including ``ZC_XLCZ_EXT``, ``SEC_MODE``, ``ETRACE``,
  42. ``SAFETY_MECHANISM``, ``VNICE``, ``XLCZ``, ``ZILSD``, and ``SSTC`` in ``riscv_encoding.h``
  43. - Add ``CSR_PUSHXSUBM`` macro definition in ``riscv_encoding.h`` for ECLICv2 SUBM register handling in interrupt context
  44. - Add ``core_feature_iinfo.h`` to support IREGION INFO related operations.
  45. - Rename ``__TEE_PRESENT`` to ``__SMODE_PRESENT`` in ``core_feature_eclic.h`` and ``core_feature_timer.h`` to better reflect S-Mode support without implying TEE functionality
  46. - Update ECLIC API comments in ``core_feature_eclic.h`` to refer to S-Mode instead of TEE
  47. - Add missing FCSR(Floating-Point Control and Status Register) save/restore functionality to FPU context handling macros ``SAVE_FPU_CONTEXT`` and ``RESTORE_FPU_CONTEXT`` in ``core_feature_fpu.h``
  48. - Add ``i_share_dlm`` bit field in ``CSR_MICFGINFO_Type`` structure in ``core_feature_base.h`` and show this infomation in cpuinfo application.
  49. * Application
  50. - Update ``demo_eclic_stress`` application to use ``__SMODE_PRESENT`` instead of ``__TEE_PRESENT`` and update npk.yml to remove TEE requirement
  51. - Update ``demo_smode_eclic`` application to use ``__SMODE_PRESENT`` instead of ``__TEE_PRESENT`` and add ``XLCFG_SMODE`` configuration variable
  52. - Update ``demo_sstc`` application to use ``__SMODE_PRESENT`` instead of ``__TEE_PRESENT`` and remove TEE requirement
  53. - Update ``demo_smode_plic`` application to add ``XLCFG_PLIC`` configuration variable
  54. - Update ``demo_plic`` application to add ``XLCFG_PLIC`` configuration variable
  55. - Update ``demo_cidu`` application to add ``XLCFG_CIDU`` configuration variable
  56. - Update ``demo_smpu`` application to remove ``__TEE_PRESENT`` dependency and update error messages to reflect S-Mode requirement
  57. - Update ``demo_smode`` RT-Thread application to use ``__SMODE_PRESENT`` instead of ``__TEE_PRESENT`` and add ``XLCFG_SMODE`` configuration variable
  58. - Add new application :ref:`design_app_demo_eclic_stress` to stress test ECLIC interrupt handling in both M-Mode and S-Mode with vector and non-vector interrupts, nesting, tail-chaining, and M-S mode interactions
  59. - Add new application :ref:`design_app_demo_eclic_umode` to show how to use U-Mode with ECLIC running in M-Mode
  60. - For FreeRTOS demo/smpdemo, now default use MSTATUS.MIE to do interrupt masking since default ``configMAX_SYSCALL_INTERRUPT_PRIORITY`` set to 255
  61. - Update ``cpuinfo`` to display additional CPU features, including prefetch capabilities, hardware performance configirations, supported ISAs, and more. See :ref:`design_app_cpuinfo`.
  62. - Add ``get_basic_cpuinfo`` in ``cpuinfo`` to get basic CPU information in a single string.
  63. - Add ``CHK_MODE`` makefile variable to select different check mode for ``demo_pmp`` and ``demo_spmu`` applications.
  64. - Fix FreeRTOS SMP ``smpdemo`` via ``configIDLE_SHOULD_YIELD`` should set to ``0`` when no idle priority(0) application
  65. task in main.c to avoid idle task trigger task switch frequently via ``taskYIELD()``, when freertos smp run on more than 2 COREs, it will
  66. make CORE 0 not able to acquire lock with interrupt disabled, since other COREs are acquire and release locks, then CORE
  67. 0 timer tick will not be able to be active since interrupt is disabled, then higher priority tasks in other COREs will
  68. not able to be wake up even time delay reached, so to fix this issue, we need to set ``configIDLE_SHOULD_YIELD`` to ``0``.
  69. To stay lowpower, we also enable ``configUSE_PASSIVE_IDLE_HOOK`` and ``configUSE_IDLE_HOOK`` to ``1`` and in hook code,
  70. we let it execute ``wfi``.
  71. - Change FreeRTOS SMP ``smpdemo`` task delay time from 500 to 15 ms to make it possible to let different tasks run on different CORE.
  72. - Add ThreadX SMP ``smpdemo`` application to demostrate ThreadX SMP kernel feature on Nuclei RISC-V CPU.
  73. - Add a prebuilt IAR project for ThreadX SMP ``smpdemo`` application.
  74. - Optimize benchmark cases and cpuinfo case for n100 cpu with eclic.
  75. - Add :ref:`design_app_demo_smpcc` to demonstrate SMP Cluster Cache feature on Nuclei RISC-V CPU.
  76. - Probe and show vlenb in ``cpuinfo`` application.
  77. - Add :ref:`design_app_demo_ecc` to demonstrate ECC error injection feature on Nuclei RISC-V CPU.
  78. - Disable ECLIC v2 hardware context auto save/restore feature in ``demo_clint_timer``, ``demo_plic``, ``demo_smode_clint`` and ``demo_smode_plic`` applications when using CLINT/PLIC interrupt modes to ensure proper interrupt handling
  79. - Add :ref:`design_app_demo_smode_clint` to demonstrate timer interrupt handling in S-Mode with CLINT interrupt mode.
  80. - Update :ref:`design_app_demo_profiling` to demonstrate the usage of ``APPDIRS`` variable for application-specific compilation flags.
  81. - Update :ref:`design_app_demo_profiling` documentation to include command-line usage instructions for profiling and code coverage, GCC version compatibility notes, and recommended lcov-based workflow.
  82. - Update :ref:`design_app_demo_profiling` Makefile to add local documentation reference comments pointing to ``doc/source/design/app.rst#demo_profiling`` and ``Components/profiling/README.md``
  83. - Fix documentation to correctly state that Nuclei Studio IDE supports both GCC and LLVM/Clang gcov format coverage visualization
  84. - Remove ``nuclei_cache`` npk configuration from ``demo_cache``, ``demo_cidu``, ``demo_ecc``, ``demo_pma``, ``demo_smpcc``, and ``smphello`` applications ``npk.yml`` since it is now deprecated
  85. - Add ``get_cpu_feature`` in ``cpuinfo`` to list CPU features for the future hardware ci testing.
  86. * Build System
  87. - Add ``XLCFG_SMODE``, ``XLCFG_PLIC``, ``XLCFG_CIDU``, and ``XLCFG_SMPU`` configuration variables to various application Makefiles to indicate required CPU extensions
  88. - Update ``npk.yml`` files to use ``-DXLCFG_SMODE=1`` instead of ``-DCFG_HAS_TEE`` for S-Mode applications
  89. - Introduce a new generic function mechanism in ``cpuconfig.mk`` for defining XLCFG variables with automatic dependency management, improving the modularity and maintainability of CPU feature configurations
  90. * OS
  91. - Bugfix for FreeRTOS/UCOSII/RT-Thread/ThreadX task stack sp alignment to match 16 bytes
  92. alignment requirement, see https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/301374e92976e298e676e7129a6212926b2299ce/riscv-cc.adoc?plain=1#L245-L259
  93. - Bugfix and optimize FreeRTOS SMP spinlock implementation
  94. - Bugfix for FreeRTOS interrupt masking related API implementation when using ECLIC MTH, when set MTH, we need to disable interrupt and then set MTH,
  95. and then do fence, then enable interrupt
  96. - Add new interrupt masking feature for FreeRTOS porting, when ``configMAX_SYSCALL_INTERRUPT_PRIORITY >= 255``, it will use ``MSTATUS.MIE`` to do interrupt masking
  97. - Bugfix for UCOSII interrupt masking related API implementation, now optimize the implementation to use ``MSTATUS.MIE`` only to do interrupt masking
  98. - Bugfix for ThreadX idle task emulation in ``eclic_msip_handler`` task switch function, both ``mcause`` and ``msubm`` need to be saved and restored correctly.
  99. - Mention about other RTOSs Nuclei supported, but not in Nuclei SDK, see :ref:`design_rtos_others`
  100. - Add support for **ThreadX SMP** kernel support for both Nuclei RISC-V RV32 and RV64 CPU with ECLIC feature enabled.
  101. - Fix issue where ``tx_thread_run_count`` was not incremented during task switches and initial task creation in the ThreadX kernel.
  102. - Add ECLICv2 hardware context auto-save support for all RTOS including FreeRTOS, RT-Thread, ThreadX and UCOSII when ``ECLIC_HWCTX=1`` and ``XLCFG_ECLIC=2``
  103. - Fix FreeRTOS task switch ``xPortTaskSwitch`` function, interrupt should be disabled during task switch
  104. - Fix FreeRTOS timer setup ``vPortSetupTimerInterrupt`` call location in ``xPortStartScheduler`` function to ensure proper initialization order
  105. - Update RT-Thread interrupt handling to support ECLICv2 SUBM register handling with ``CSR_PUSHXSUBM`` when ``CFG_HAS_ECLICV2`` is defined
  106. - Rename ``__TEE_PRESENT`` to ``__SMODE_PRESENT`` in RT-Thread S-Mode implementation to accurately reflect S-Mode support without implying TEE functionality
  107. - Fix FreeRTOS tickless sleep implementation by moving ``__disable_irq()`` call to proper location in ``vPortSuppressTicksAndSleep`` function to ensure correct interrupt handling during sleep mode
  108. * Build System
  109. - Add new ``APPDIRS`` variable to apply application-specific compilation flags only to specified source directories. When defined, ``APP_XXXFLAGS`` and ``APP_COMMON_FLAGS`` are applied only to source code in ``APPDIRS`` directories, enabling fine-grained control for profiling, coverage, and other app-specific optimizations. See :ref:`develop_buildsystem_var_appdirs` for details.
  110. - Add new ``n300e`` CPU core support in build system and npk.yml for evalsoc
  111. - Add ``-isystem=/include/libncrt`` for nuclei llvm toolchain when using libncrt_xxx library, but ``-isystem=`` feature is not
  112. the same as gcc, see report here https://github.com/llvm/llvm-project/pull/82084#discussion_r2387373311, so when you use libncrt library with llvm toolchain, the header file could be wrongly included using newlib ones
  113. - Recommend ``-fno-strict-aliasing`` as common compiler options should be passed, see :ref:`develop_buildsystem_var_common_flags`
  114. - Must pass ``-fomit-frame-pointer`` when using ``Zc`` extension to generate push/pop instructions, see https://github.com/riscvarchive/riscv-code-size-reduction/issues/194
  115. - Toolchain Terapines ZCC support is updated to match latest ZCC 4.1.7 release which is integrated with Nuclei Studio 2025.10
  116. - Nuclei **N100 series** CPU Core with **ECLIC** configured are supported, see :ref:`N100 support limitation <n100_support_limitation>`
  117. - Refactor evalsoc build system by splitting ``build.mk`` into modularized makefiles (``build.mk``, ``cpuconfig.mk``, ``qemu.mk``, ``xlmodel.mk``) for better maintainability, see :ref:`design_soc_evalsoc_build_modularization` for details
  118. - ``XLCFG_xxx`` for evalsoc will not be effective when ``cpufeature.mk`` are generated by ``nuclei_gen``, this is mainly used internally to quickly enable/disable certain cpu feature via make options
  119. - Refactor ``cpuconfig.mk`` to use a generic function mechanism for defining ``XLCFG_xxx`` variables with dependency support, allowing better management of CPU feature configurations and their interdependencies
  120. - Reorder include statements in ``Build/Makefile.conf`` to ensure proper variable dependency resolution between ``Makefile.soc`` and ``NMSIS/build.mk``, fixing issues with ``LDLIBS := -lm`` assignments
  121. - Add ``simulation.mk`` to evalsoc build system to support RTL simulation related make options, including a new ``SIMULATION_BSSZERO`` make variable to control whether BSS section is zeroed during startup.
  122. * SoC
  123. - Implement ``__libc_init_array`` and ``__libc_fini_array`` in ``stubs.c`` for ``libncrt`` to support C++ constructors and GCOV coverage initialization
  124. - Only enable/disable L2 cache enable bit during pre-main initialization
  125. - Limit sPMP/sMPU entry numbers to 16 event PMP entries are 64 for evalsoc to match Nuclei CPU design
  126. - Optimize SMP bringup process, boot hart should wait for other harts software pending bit be set, mainly to be suitable
  127. for Nuclei Qemu 2025.10, the other harts run slow than main harts
  128. - Enable nuclei cpu model debug configuration generation using npk, which require Nuclei Studio and Model 2025.10 version, currently only non-smp debug is supported by Nuclei CPU Model
  129. - Enable ``IC_CANCEL_EN`` in mcache_ctl when I-Cache present by default to prevent I-cache pipeline stalls on branch misprediction
  130. - Optimize evalsoc startup code for n100 cpu since n100 dont have many cpu features, so many initialization can be simplified
  131. - Add ``__CPU_PA_SIZE`` macro to identify the Physical Address size (PASIZE).
  132. - Add ECLICv2 support with hardware context auto-save feature in evalsoc, including conditional compilation guards and ECLIC version definitions
  133. - Add ``XLCFG_ECLIC=2`` support in evalsoc to enable ECLICv2 configuration, see :ref:`design_soc_evalsoc_eclicv2`
  134. - Add ``nuclei_eclic`` configuration option in ``npk.yml`` to select ECLIC version (v1/v2) with conditional compilation flags for ECLICv2 features
  135. - Add ``XLCFG_ECC`` support in evalsoc to support different ECC error injection mode, see :ref:`design_soc_evalsoc_ecc`
  136. - Add ECLICv2 support in evalsoc interrupt context save/restore for S-Mode SUBM register handling when ``CFG_HAS_ECLICV2`` is defined in ``cpufeature.h``
  137. - Use ``IINFO_EnablePrefetchOverall()`` to enable prefetch overall by default in evalsoc.
  138. - Add ``__UMODE_PRESENT`` macro definition in ``evalsoc.h`` to indicate U-Mode support availability when ``PMP`` present
  139. - Update conditional compilation in ``system_evalsoc.h`` and ``startup_evalsoc.c`` to use ``__SMODE_PRESENT`` instead of ``__TEE_PRESENT``
  140. - Update ECLIC interrupt initialization comments in ``system_evalsoc.c`` to refer to S-Mode instead of TEE
  141. - Update CSR checking logic in ``system_evalsoc.c`` to check supervisor mode implementation via ``CSR_MISA`` instead of relying on TEE presence
  142. - Enhance evalsoc build system modularization with improved flexibility and reduced customer porting effort, see :ref:`design_soc_evalsoc_build_modularization` for details
  143. - Add ``eclic_hwctx`` hidden configuration option in evalsoc Common ``npk.yml`` to control ECLIC v2 hardware context auto-save/restore feature with conditional compilation flag ``ECLIC_HW_CTX_AUTO``
  144. - Update ``cpufeature.h`` to use a more systematic approach for defining CPU features based on ``XLCFG_xxx`` variables, with clear distinction between features enabled by default versus those disabled by default
  145. - Enable L2 Cache for evalsoc when L2 Cache present by default now, previous it is only enabled when ``SMP >= 2``
  146. - The ``nuclei_cache`` configuration option in ``SoC/evalsoc/Common/npk.yml`` is removed and will no longer be effective. L1/L2 Cache will be enabled by default when present, and CCM feature by default not present. To force enable CCM for evalsoc with non-nuclei_gen generated cpufeature.h, pass macro ``-DXLCFG_CCM=1`` in your compiler options.
  147. - Remove ``RUNMODE_IC_EN``, ``RUNMODE_DC_EN``, and ``RUNMODE_CCM_EN`` build configurations that were previously tied to ``nuclei_cache`` selections in ``SoC/evalsoc/Common/npk.yml``
  148. - Add conditional BSS initialization in ``startup_evalsoc.S`` based on ``CFG_SIMULATION_BSSZERO`` C macro to allow skipping BSS initialization during simulation
  149. - Add new ``get_system_clock()`` function in ``system_evalsoc.c`` to improve system clock frequency determination by checking performance counters(mcycle) availability, and update ``_premain_init()`` to use this new function
  150. * Documentation
  151. - Fix typo ``reuqests`` to ``requires`` in ``app.rst``
  152. - Update ``rtos.rst`` to mention about recent bugfix for RTOS porting, and other RTOSes supported but not in Nuclei SDK
  153. - Update the expected output of ``cpuinfo`` in ``app.rst``
  154. - Update documentation about n100 with eclic is now supported in Nuclei SDK
  155. - Add ``demo_smpcc`` and ``demo_ecc`` application documentation in ``app.rst``
  156. - Update :ref:`design_app_demo_profiling` documentation in ``app.rst`` with detailed GCC and LLVM/Clang toolchain-specific instructions for profiling and coverage analysis, and command-line workflows using ``lcov``
  157. - Add warning note in :ref:`develop_buildsystem_var_semihost` about heap and stack collision risk when using semihosting with ``malloc``, due to newlib semihost ``_sbrk`` implementation assumes unlimited heap size
  158. * Tools
  159. - Add ``demo_eclic_umode`` nsdk_cli run configuration for daily ci running
  160. - Support ``matrix`` field in ``appcfg`` or ``hwcfg`` for ``nsdk_bench.py``
  161. - Add a new utility script, ``gen_config.py``, to automate the generation of ``build_configs`` sections in nsdk_cli config file.
  162. This tool accelerates the development of test suites by producing diverse configuration sets. As an initial implementation,
  163. the ``build_configs`` section in ``nuclei_fpga_eval_ci_*zxinx*.json`` have been migrated to be generated by this script.
  164. - Add missing ``demo_profiling`` pass checker in nsdk cli configuration files
  165. - Add more ci jobs to cover zfinx/zdinx/zcmt usage and optimize ci jobs without download apt/pip package since bumped sdkbuild to 2025.10
  166. - ``nsdk_runcpu.py`` cpu json configuration now can add ``appdirs_ignore`` key to specified cases to be ignored, mainly introduced for n100 cpu, since many cases could not run on n100
  167. - Add n100 cpu nsdk_cli configurations for qemu and fpga benchmark
  168. - Add new ci configuration for ``demo_smpcc`` and ``demo_ecc`` daily ci running
  169. - Add ``check_cppbuild.sh`` to check the C++ compatibility of NMSIS Core header files and add the corresponding ci job.
  170. - Update test validation strings in application config files, replacing specific error messages like ``[ERROR]__TEE_PRESENT`` with generic ``must be defined`` strings for better consistency.
  171. - Move and enhance ``update_list_items`` function in ``nsdk_utils.py`` to merge unique elements from one list to another, and update ``dict_merge`` to handle merging of lists by combining unique elements using this function.
  172. - Remove ``appdirs_ignore`` key from ``finalruncfg`` in ``merge_app_hw_config`` function when the list is empty.
  173. * Components
  174. - Support ``libncrt`` library for profiling component by replacing POSIX I/O with ANSI C I/O, which also fixed header file conflict issues when using ``libncrt`` library such as ``STDCLIB=libncrt_small``
  175. - Add LLVM/Clang ``-coverage`` option support in ``gcov.c`` with comprehensive Doxygen-style documentation
  176. - Fix printf format specifiers in ``gcov.c`` and ``gprof.c`` for better portability
  177. - Enhance profiling component documentation with GCC/LLVM toolchain support matrix, usage guide and result analysis examples
  178. V0.8.1
  179. ------
  180. This is release version of ``0.8.1`` of Nuclei SDK.
  181. * Application
  182. - Remove ``-ffast-math`` for clang based toolchain since it is deprecated
  183. - Update ``demo_cache`` optimization level to ``-O2`` and update its doc
  184. - Fix ``demo_stack_check`` via modify evalsoc correct max exception number ``MAX_SYSTEM_EXCEPTION_NUM``
  185. - Fix freertos demo case build fail when SMP=2 passed
  186. - Fix CIDU/Vector/SMP information display in ``cpuinfo`` application
  187. * NMSIS
  188. - Replace ``__ASSEMBLY__`` with ``__ASSEMBLER__`` to match with gcc predefined asm macro
  189. - Optimize ``__STATIC_FORCEINLINE`` to ``__STATIC_INLINE`` in NMSIS Core header files to avoid un-necessary inline to save code size
  190. - Bump NMSIS version to 1.4.1
  191. * SoC
  192. - Update evalsoc linker script files to support RT-Thread v5.x
  193. - Update SConscript to support RT-Thread v5.x
  194. - Fix zcmt jvt section alignment and section name in evalsoc linker script files
  195. - Fix evalsoc stubs.c compile fail in RT-Thread
  196. - Fix evalsoc linker options in RT-Thread SConscript to fix link issue
  197. - Fix instruction fetch not updated via fence.i after text section copied to cached area when program run in flash download mode
  198. - Fix ``MAX_SYSTEM_EXCEPTION_NUM`` for evalsoc, it should be 26 not 19, which will fix ``demo_stack_check`` case
  199. * OS
  200. - Add ilde task support in ThreadX when no thread is available, by default threadx dont have a idle task
  201. - Set threadx ``ra`` with proper routine when thread terminated
  202. * Components
  203. - Fix profiling component to support gcc 14.x
  204. * Tools
  205. - Update ``demo_pma`` case nsdk_cli checker to match its design
  206. - Add filter configuration feature in nsdk_cli tools, you can filter certain arches which you dont want to run via ``SDK_IGNORED_EXTS`` environment variable
  207. - Add filter configuration feature in nsdk_cli tools, you can allow only arches supported to run via ``SDK_SUPPORT_ARCH`` environment variable
  208. - Add full_norvv cpu json, and make it as default cpu configurations used by fpga benchmark
  209. * Documentation
  210. - Fix build system :ref:`develop_buildsystem_var_core` support table format error
  211. * Build System
  212. - Update to support Zcc version 4.1.2 and above as well as the new C library configuration
  213. V0.8.0
  214. ------
  215. .. note::
  216. - Please use ``Nuclei Studio 2025.02`` with v0.8.0 and later version.
  217. - Two new benchmark cases ``dhrystone_v2.2`` and ``whetstone_v1.2`` are added in this release.
  218. - In Nuclei Studio IDE, if you are importing this Nuclei SDK 0.8.0 as a NPK package, you will be able to see following versions in new project wizard:
  219. - **Dhrystone Benchmark, Version 2.1**: located in ``application/baremetal/benchmark/dhrystone``, previous existed version
  220. - **Whetstone Benchmark, Roy Longbottom Version**: located in ``application/baremetal/benchmark/whetstone``, previous existed version
  221. - **Dhrystone Benchmark, Version 2.2**: located in ``application/baremetal/benchmark/dhrystone_v2.2``, **new** introduced version
  222. - **Whetstone Benchmark, Netlib Version 1.2**: located in ``application/baremetal/benchmark/whetstone_v1.2``, **new** introduced version
  223. This is release version ``0.8.0`` of Nuclei SDK.
  224. * NMSIS
  225. - Fix wrong macro ``PLIC_GetThreshold`` & ``PLIC_GetThreshold_S`` implementation for ``core_feature_plic.h``
  226. - Add ``MTIME_SRW_CTRL`` bitfields in **SysTimer_Type** structure for ``core_feature_timer.h``
  227. - Optimize ECLIC API for better code performance in ``core_feature_eclic.h``
  228. - Add SSTC support in ``core_feature_timer.h``, a new macro called ``__SSTC_PRESENT`` is added
  229. - Update and add more CSR Union types
  230. - Add more CSR macros such shartid csr, worldguard csrs, and related csr bitfield macro
  231. - Add the ``BENCH_XLEN_MODE`` macro to enable more accurate cycle and HPM counter measurements for **RV32**,
  232. when ``BENCH_XLEN_MODE`` is enabled, the cycle/instret/time/hpm_counter will be 32 bits for rv32 and 64 bits for rv64.
  233. - Fix return type error of ``__get_hpm_counter``
  234. - Add new APIs to read ``cycle/instret/time/hpm_counter`` with ``XLEN`` bits:
  235. - ``unsigned long __read_cycle_csr()``
  236. - ``unsigned long __read_instret_csr()``
  237. - ``unsigned long __read_time_csr()``
  238. - ``unsigned long __read_hpm_counter(unsigned long idx)``
  239. - Fix ``__clear_core_irq_pending`` and ``__clear_core_irq_pending_s`` implementation in ``core_feature_base.h``
  240. - Fix ``__enable_sw_irq_s`` implementation in ``core_feature_base.h``
  241. - Add PMA(Physical Memory Attribute) APIs for managing attribute type(Device/Non-Cacheable/Cacheable) of memory regions when **__PMA_PRESENT=1**
  242. - Fix and update HPM v1 event macro due to Nuclei ISA documentation update in ``nmsis_bench.h``
  243. - Add new PMU v1 and v2 event macros in ``nmsis_bench.h``
  244. - Add ``flushpipe`` and ``fence`` in each ccm operation API in ``core_feature_cache.h``
  245. - Use ``1UL`` instead of ``1`` in NMSIS/Core header files to avoid left shift overflow issue
  246. * Application
  247. - Add more application code compile check message for better example requirement explanation
  248. - Add :ref:`design_app_demo_sstc` to show how to SSTC(S-Mode timer interrupt extension)
  249. - Add :ref:`design_app_rtthread_demo_smode` to show how to run rt_thread in S-Mode, it will require TEE and PMP extension
  250. - Remove ``demo_spmp`` application due to hw ``sPMP`` upgraded to ``sMPU`` and no longer supported,
  251. - please use :ref:`design_app_demo_smpu` now.
  252. - Add ``-fno-tree-tail-merge`` compiler option for threadx RTOS example compiling, which is required for correct
  253. - compiling
  254. - Fix :ref:`design_app_demo_vnice` insufficient mask length when vlen > 128
  255. - Add more documentation for :ref:`design_app_demo_dsp` example
  256. - Optimize :ref:`design_app_smphello` spinlock usage and update doc for it
  257. - Optimize :ref:`design_app_demo_profiling` example execution speed on hw from about 5min to 30s by decease the loop count
  258. - Update :ref:`design_app_freertos_demo` example to use ``configTICK_TYPE_WIDTH_IN_BITS`` instead of ``configUSE_16_BIT_TICKS``
  259. - Add :ref:`design_app_demo_pma` case to show how to use PMA related API in ``core_feature_pma.h``
  260. - Add :ref:`design_app_demo_smode_plic` to show how to use PLIC in S-Mode, it will require PLIC and PMP extension
  261. - Increase freertos timer stack size from ``256`` to ``512`` due to timer task still generate vector instruction even with :ref:`AUTOVEC=0 <develop_buildsystem_var_autovec>`
  262. - Add two new benchmark cases :ref:`design_app_dhrystone_v2.2` and :ref:`design_app_whetstone_v1.2` which are the ones used in linux benchmark
  263. - Update Terapines ZCC dhrystone and coremark options for ZCC v4.0.0 and give better code size
  264. - ``-Ofast`` is deprecated in clang, use ``-O3 -ffast-math``
  265. * SoC
  266. - Add more documentation about IAR compiler support and porting notes, especially the vector table alignment with the ``MTVT`` CSR.
  267. - Add ``nx1000/nx1000f/nx1000fd/ux1000/ux1000f/ux1000fd`` in supported CPU :ref:`develop_buildsystem_var_core` list
  268. - Only enable i/d cache when ecc not present in evalsoc startup asm code to avoid x-state propagation during rtl simulation
  269. - Fix ``#endif`` not placed correctly when XLCFG_TEE=1 and CODESIZE=1 in system_evalsoc.c
  270. - Only initialize ECLIC SMode related registers when TEE really present for evalsoc
  271. - Place default vector entry for vector_table_s when SSTC present for evalsoc
  272. - Add ``#define _DEFAULT_SOURCE`` in all SoC's newlibc stub implementation to use BSD Standard API when compiler c standard is not gnu c standard ``-std=gnu23``,
  273. such as ``-std=c23``, to fix compiler error ``error: implicit declaration of function 'TIMEVAL_TO_TIMESPEC' [-Wimplicit-function-declaration]``
  274. - Add ``__SMODE_PRESENT`` macro in ``evalsoc.h`` to represent s-mode present or not
  275. - Add support for smode clint and plic support for evalsoc
  276. - Add a README.md to introduce evalsoc reference implementation of NMSIS Device Templates in ``SoC/evalsoc/README.md``
  277. * RTOS
  278. - Add S-Mode RT-Thread support which rely on TEE feature, SSTC feature is preferred
  279. - Update FreeRTOS port to use ``configTICK_TYPE_WIDTH_IN_BITS`` instead of ``configUSE_16_BIT_TICKS``
  280. - Cherry-pick a FreeRTOS incorrect error checking of prvCreateIdleTasks fix, see https://github.com/FreeRTOS/FreeRTOS-Kernel/commit/a49c35b5dc0f1f521eef3ef993d401af7f26f439
  281. - Add ThreadX module support for both RISC-V 32 and 64 bit
  282. - Add FreeRTOS lazy fp/vector registers save and restore support
  283. * Build System
  284. - Add **COMPILE_PREFIX** support for :ref:`develop_buildsystem_var_toolchain` ``nuclei_llvm``, now both ``nuclei_llvm`` and ``nuclei_gnu`` support this variable, you can change it like this ``COMPILE_PREFIX=/path/to/newgcc/bin/riscv64-unknown-elf-`` when do make command
  285. - Add :ref:`develop_buildsystem_var_autovec` make variable, when **AUTOVEC=0**, it will disable auto vectorization as much as possible, this is useful for some application which require no auto vectorization
  286. - Add ``GDB_UPLOAD_EXTRA_CMDS`` make variable to execute extra commands after upload elf file to target
  287. - Add ``run_xlmodel`` make target for evalsoc to run Nuclei Near Cycle Model Simulation
  288. * Tools
  289. - Add exclusive lock when program fpga for ``nsdk_cli`` tools
  290. - Update ``hpm_parse.py`` to match hpm v1 and v2 update
  291. * Misc
  292. - Attach url of supply doc about debug with multiple FTDI devices in FAQ section
  293. V0.7.1
  294. ------
  295. This is release version ``0.7.1`` of Nuclei SDK.
  296. * NMSIS
  297. - Fix Cache CCM related API compile fail using c++ compiler
  298. - **mfp16mode** csr is renamed to **mmisc_ctl1** due to hw changes
  299. - Update prebuilt NMSIS DSP/NN library to release 1.3.1
  300. * SoC
  301. - Only call ``EnableSUCCM`` in ``_premain_init`` process when CCM present and S/U mode present defined in auto generated cpufeature.h
  302. * Misc
  303. - Fix various typos found in source code and doc
  304. - Recommend evalsoc user to run :ref:`design_app_cpuinfo` to check cpu features it present
  305. - If you want to do openocd rtos aware debug, you need to follow note in commit b7ed34e96
  306. - Evalsoc uart eclic irq maybe not working due to different cpu configuration
  307. V0.7.0
  308. ------
  309. This is release version ``0.7.0`` of Nuclei SDK.
  310. * Application
  311. - Add ``demo_plic`` case to show how to use PLIC related API in PLIC interrupt mode.
  312. - Add ``demo_clint_timer`` case to show how to use systimer in CLINT interrupt mode not ECLIC interrupt mode.
  313. - Update ``demo_pmp`` case to make it suitable for when PMP not present.
  314. - Change download mode from ``ddr`` to ``sram`` for smp and cache cases to be suitable for some custom soc sdk.
  315. * NMSIS
  316. - Add more ECC related macros for ``milm_ctl/mdlm_ctl/mcache_ctl`` csr
  317. - Add more PLIC interrupt API in ``core_feature_plic.h``
  318. - Add more interrupt related API when in plic interrupt mode, see changes in ``core_feature_base.h``
  319. - Bump NMSIS version to 1.3.0 with updated NMSIS Core/DSP/NN header files and prebuilt library
  320. * SoC
  321. - Add **Terapines ZCC NPK** support, require Nuclei Studio >= 2024.06
  322. - Merge newlib stub code from many files into one file called ``stubs.c`` for all SoC supported in Nuclei SDK
  323. - Enable I/D cache for evalsoc before data/bss initialization steps using ``cpufeature.h`` for faster data initialization
  324. - gd32vf103 default CORE name changed from ``n205`` to ``n203`` which are the same in software
  325. - gd32vw55x default CORE name changed from ``n307fd`` to ``n300fd`` which are the same in software
  326. - evalsoc default CORE name changed from ``n307fd`` to ``n300fd`` which are the same in software
  327. - Add plic interrupt and exception related handling code for evalsoc
  328. - Fix BPU is not enabled during startup for startup code for IAR compiler, which will increase performance of 600/900/1000 series a lot
  329. * Build System
  330. - Introduce ``XLCFG_xxx`` make variable for evalsoc which is only internally used by Nuclei to overwrite default cpufeature.h macro definition, which will be useful for some applications such as demo_cidu, demo_cache, demo_spmp, demo_smpu and demo_smode_eclic
  331. - Introduce ``ECC_EN`` make variable for evalsoc which is only internally used by Nuclei to control whether ECC check is enabled or disabled.
  332. - Add core ``n200e/n202/n202e`` and remove ``n205/n205e/n305/n307/n307fd`` which can be replaced by ``n203/n203e/n300/n300f/n300fd``
  333. - Prebuilt IAR projects and workbench are updated due to evalsoc support changes for plic and clint interrupt modes.
  334. - Add ``SYSCLK`` make variable for manually set default SYSTEM_CLOCK macro in evalsoc, it is useful for ``CODESIZE=1`` case
  335. - Add ``QEMU_MC_EXTOPT`` make variable to pass extra Nuclei Qemu ``-M`` machine options for evalsoc.
  336. - Add ``QEMU_CPU_EXTOPT`` make variable to pass extra Nuclei Qemu ``-cpu`` cpu options for evalsoc.
  337. V0.6.0
  338. ------
  339. This is release version ``0.6.0`` of Nuclei SDK.
  340. .. note::
  341. - Please use **Nuclei Studio 2024.06** with this Nuclei SDK 0.6.0.
  342. - There are many changes in this release, so we decide to name it as 0.6.0, not 0.5.1
  343. - This version introduced **ThreadX and FreeRTOS-SMP support** for Nuclei RISC-V Processors.
  344. - This version introduced a ``profiling`` middleware and an example to show code coverage and profiling technology
  345. using gcov and gprof in **Nuclei Studio 2024.06**.
  346. - We introduced support for **Nuclei 100 series RISC-V CPU**, but in seperated Nuclei SDK branches called **master_n100** or **develop_n100**, see https://doc.nucleisys.com/nuclei_n100_sdk
  347. - This version introduced support for gd32vw55x chip and Nuclei DLink Board.
  348. - Better **Terapines ZCC** toolchain integrated in Nuclei SDK and Nuclei Studio, try ZStudio Lite version here https://www.terapines.com/products/
  349. - Better **IAR Workbench** support in Nuclei SDK, with Baremetal SMP and FreeRTOS SMP supported.
  350. * Application
  351. - Add ThreadX RTOS example to show how to use ThreadX in SDK.
  352. - Add Nuclei 1000 series benchmark flags for benchmark examples.
  353. - Add ``demo_vnice`` example to show how to use Nuclei Vector NICE feature.
  354. - Add ``demo_profiling`` example to how to use gprof and gcov in Nuclei Studio.
  355. - Add ``smphello``, ``demo_cidu`` baremetal SMP examples in IAR workbench.
  356. - Add FreeRTOS ``smpdemo`` example to show how to use SMP version of FreeRTOS.
  357. - Optimize and fix ``cpuinfo`` example for better cpu feature dection.
  358. - Optimize benchmark gcc13 flags to provide better performance.
  359. - Fix wrong ipc calculating for benchmark examples.
  360. - Reset mcycle and minstret when read cycle or instret in benchmark examples.
  361. - Fix dhrystone strcmp_xlcz.S removed by make clean in windows.
  362. - Update benchmark flags for benchmark examples when compiled with Terapines ZCC Toolchain.
  363. - Fix ``lowpower`` example no need to use ``newlib_full`` library.
  364. * NMSIS
  365. - Update many CSR structure defined in ``core_feature_base.h`` such as ``CSR_MCFGINFO_Type``, ``CSR_MDLMCTL_Type`` and ``CSR_MCACHECTL_Type`` etc.
  366. - Add ``__set_rv_cycle`` and ``__set_rv_instret`` API to set cycle and instret csr registers.
  367. - Add ``CSR_MTLBCFGINFO_Type`` CSR structure in ``core_feature_base.h``.
  368. - Fix protection type error in PMP/sPMP API.
  369. - Fix wrong CLIC_CLICINFO_VER_Msk and CLIC_CLICINFO_NUM_Msk macro value in ``core_feature_eclic.h``
  370. - Add ``__ROR64`` in ``core_compatiable.h``.
  371. - Add and update DSP intrinsic APIs in ``core_feature_dsp.h``.
  372. - Add and update Nuclei customized CSRs in ``riscv_encoding.h``.
  373. - Sync NMSIS DSP/NN library 1.2.1
  374. * SoC
  375. - Redesign ``evalsoc`` reference SoC support software for better evalsoc and nuclei cpu support, see :ref:`design_soc_evalsoc_usage`
  376. - Remove ``-msave-restore`` in npk.yml to fix dhrystone benchmark value is low in Nuclei Studio issue.
  377. - No need to get system clock using ``get_cpu_freq`` for gd32vf103.
  378. - In npk.yml, when pass ``-isystem=`` should be changed to ``-isystem =`` as a workaround for Nuclei Studio to pass correct system include header.
  379. - Update standard c library and arch ext prompt for soc npk.yml for better hints.
  380. - Add ``gd32vf103c_dlink`` board support for Nuclei DLink development.
  381. - Fix non-ABS relocation R_RISCV_JAL against symbol '_start' fail for nuclei_llvm toolchain
  382. - Add Nuclei ``ux1000fd`` support in both NPK and Makefile based Build System.
  383. - Add support for **gd32vw55x** SoC which is Gigadevice new Nuclei RISC-V N300 Processor based WiFi MCU.
  384. - Add **SPLITMODE** support for **evalsoc** when evaluate NA class Core.
  385. - Allow custom linker script if npk variable ``linker_script`` is not empty.
  386. - Explicit declare asm function in gcc asm code if that part of code is a function, which is required by ``gprof`` plugin in Nuclei Studio.
  387. - Clear zc bit for non zc elf in mmsic_ctl csr for cases when cpu is not reset but zc bit is set before.
  388. - Only print CSR value when CSR is present during ``__premain_init`` for **evalsoc**.
  389. - Fix undefined symbol when link cpp for clang ``__eh_frame_start/__eh_frame_hdr_start/__eh_frame_end/__eh_frame_hdr_end``
  390. - Add **LDSPEC_EN**, **L2_EN** and **BPU_EN** for evalsoc in Makefile based build system to control
  391. load speculative, L2 cache and BPU enable or disable, which is only internally used.
  392. - Move eclic and interrupt and exception initialization from startup asm code into premain c code for evalsoc.
  393. - Optimize cpu startup when ECLIC not present it will not be initialized, which is helpful for CPU without ECLIC unit.
  394. - evalsoc ``SystemIRegionInfo`` variable is removed now, if you want to access to the base address of cpu internal device, you can use ``*_BASEADDR``,
  395. such as ``__CIDU_BASEADDR``.
  396. - Introduce an IAR startup asm code called ``IAR/startup.S`` for evalsoc to support SMP boot, and for SMP stack setup,
  397. different IAR linker script is required, see the iar linker script provided in ``smphello`` or ``freertos/smpdemo``.
  398. * Build System
  399. - Now disassemble elf will show no alias instructions
  400. - Add ``u600*/u900*/ux1000fd`` into support CORE list
  401. - Update and optimize toolchain support for Terapines ZCC Toolchain, which can provide better performance
  402. - In ``Build/toolchain/nuclei_gnu.mk``, ``-mmemcpy-strategy=scalar`` option is replaced by ``-mstringop-strategy=scalar`` in official gcc 14, see
  403. https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=4ae5a7336ac8e1ba57ee1e885b5b76ed86cdbfd5
  404. * RTOS
  405. - Bump FreeRTOS Kernel to V11.1.0
  406. - Bump RTThread Nano to V3.1.5
  407. - Introduce FreeRTOS SMP support for Nuclei RISC-V CPU
  408. - Introduce Eclipse ThreadX v6.4.1 Support for Nuclei RISC-V CPU
  409. * Misc
  410. - Add ``Zc/Zicond`` and ``1000`` series support in SDK CLI script used internally
  411. - Optimize gitlab ci jobs to speedup job execution time and better merge request pipeline check
  412. V0.5.0
  413. ------
  414. This is release version ``0.5.0`` of Nuclei SDK, please use it with `Nuclei Studio 2023.10`_ release.
  415. .. note::
  416. - This 0.5.0 version is a big change version for Nuclei SDK, it now support `Nuclei Toolchain 2023.10`_,
  417. which have gnu toolchain and llvm toolchain in it, gcc version increased to gcc 13, and clang version
  418. used is clang 17. It will no longer support old gcc 10 version, since gcc and clang ``-march`` option
  419. changed a lot, such as b extension changed to ``_zba_zbb_zbc_zbs``.
  420. - This version also introduced other compiler support such as terapines zcc and IAR compiler.
  421. 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.
  422. For IAR compiler, please visit https://www.iar.com/riscv for IAR workbench evaluation, we provided iar projects to take a try with it.
  423. - This version introduced libncrt v3.0.0 support, which split libncrt library into three parts, you need to take care when using newer toolchain.
  424. - This version removed demosoc support, please use evalsoc instead.
  425. - This version introduced qemu 8.0 support, old qemu will not be supported.
  426. - 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.
  427. - 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.
  428. * Application
  429. - Add cpuinfo case to dump nuclei cpu feature
  430. - Add stack check demo to demostrate nuclei stack check feature
  431. - Add support for gcc13/clang17/terapines/iar compiler
  432. - Fix missing break in ``__set_hpm_event`` function, take care if you are using this API.
  433. - For different compiler option support, we introduced ``toolchain_$(TOOLCHAIN).mk`` file to place toolchain specified options, see benchmark examples' Makefile
  434. - Optimize demo_cidu smp case
  435. - Optimize application code and makefile when port for clang, terapines zcc and iar compiler
  436. - Change :ref:`develop_buildsystem_var_archext` makefile comment for demo_dsp when using gcc 13
  437. - Auto choose proper CPU_SERIES and proper optimization flags for benchmark cases
  438. - Optimize whetstone cost to decrease execution time for better ci testing in qemu and fpga
  439. - Add Zc and Xxlcz extension optimization for coremark and dhrystone cases
  440. - Do specical adaption for demo_pmp/demo_spmp for iar compiler which require customized iar linker icf for this cases
  441. - Optimize benchmark flags when using gcc 13
  442. * NMSIS
  443. - Add bench reset/sample/stop/stat and get usecyc/sumcyc/lpcnt APIs in NMSIS Core
  444. - Add more CSRs such as Zc/Stack Check in riscv_encoding.h
  445. - Rename NMSIS DSP/NN library name to match gcc 13 changes, eg. ``b -> zba_zbb_zbc_zbs``, so the library name changed a lot
  446. - Add IAR compiler support in NMSIS Core
  447. - No more bitmanip extension intrinsic header ``<rvintrin.h>`` for gcc13
  448. - Fix ``__RV_CLAMP`` macro and add ``__MACHINE/SUPERVISOR/USER_INTERRUPT`` macros
  449. - Add ``__get_hart_index`` and ``SysTimer_GetHartID`` and modify ``__get_hart_id`` API
  450. - In <Device.h>, we introduced ``__HARTID_OFFSET`` and ``__SYSTIMER_HARTID`` macro to represent timer hart index relation with cpu hartid for AMP SoC
  451. - Update NMSIS Core/DSP/NN header files to `NMSIS 1.2.0`_
  452. - Update NMSIS DSP/NN prebuilt library to v1.2.0, and added F16 prebuilt library
  453. * SOC
  454. - **CAUTION**: Demosoc support is removed since evalsoc is the successor, please use **evalsoc** now.
  455. - Set **RUNMODE_CCM_EN** macro when **CCM_EN** make variable passed and allow ``__CCM_PRESENT`` overwrite by **RUNMODE_CCM_EN** macro
  456. - Enable ``__CIDU_PRESENT`` macro passed via compiler option
  457. - Update cpu startup asm code to fix clang compile issue such as STB_WEAK warning and non-ABS relocation error
  458. - Update cpu startup asm code to support zcmt jump table
  459. - Update gnu linker files to support zcmt extension
  460. - Update gnu linker files to fix 2 byte gap issue, and align section to 8bytes and reorg sections
  461. - Update openocd configuration files to support openocd new version
  462. - Make ``metal_tty_putc/getc`` with ``__USED`` attribute to avoid ``-flto`` build and link fail
  463. - Add startup and exception code and iar linker icf files for IAR compiler support
  464. - Add new macros ``__HARTID_OFFSET`` and ``__SYSTIMER_HARTID`` in evalsoc.h
  465. - Add **HARTID_OFFSET** make variable to control hartid offset for evalsoc
  466. - Boot hartid check no longer only compare lower 8bits for evalsoc
  467. - Currently IAR compiler support is only for single core support, smp support is not yet ready and need to use in IAR workbench
  468. - Update Nuclei Studio NPK files to support both gcc and llvm toolchain support, this require `Nuclei Studio 2023.10`_, which is incompatiable with previous IDE version.
  469. * Build System
  470. - Fix semihost not working when link with semihost library
  471. - Add support for gcc 13, clang 17, terapines zcc toolchain using :ref:`develop_buildsystem_var_toolchain` make variable, eg. ``TOOLCHAIN=nuclei_gnu`` for gnu gcc toolchain, ``TOOLCHAIN=nuclei_llvm`` for llvm toolchain, ``TOOLCHAIN=terapines`` for terapines zcc toolchain
  472. - Add support for libncrt v3.0.0, which spilt libncrt into 3 parts, the c library part, fileops part, and heapops part, so :ref:`develop_buildsystem_var_ncrtheap` and :ref:`develop_buildsystem_var_ncrtio` makefile variable are added to support new version of libncrt, about upgrading libncrt, please check :ref:`develop_buildsystem_var_stdclib`
  473. - To support both gcc, clang, zcc, now we no longer use ``--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
  474. - And also now we defaultly enabled ``-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.
  475. - When using libncrt library, this is no need to link with other libgcc library, c library or math library, such as gcc libgcc library(``-lgcc``), newlib c library(``-lc/-lc_nano``) and math library(``-lm``), the c and math features are also provided in libncrt library
  476. - When using Nuclei Studio with imported Nuclei SDK NPK package, you might meet with undefined reference issue during link
  477. - The use of :ref:`develop_buildsystem_var_archext` is changed for new toolchain, eg. you can't pass ``ARCH_EXT=bp`` to represent b/p extension, instead you need to pass ``ARCH_EXT=_zba_zbb_zbc_zbs_xxldspn1x``
  478. - Show CC/CXX/GDB when make showflags
  479. - Add u900 series cores support
  480. - No longer support gd32vf103 soc run on qemu
  481. - Add extra ``-fomit-frame-pointer -fno-shrink-wrap-separate`` options for Zc extension to enable zcmp instruction generation
  482. - Extra **CPU_SERIES** macro is passed such (200/300/600/900) during compiling for benchmark examples
  483. - When you want to select different nmsis library arch, please use :ref:`develop_buildsystem_var_nmsis_lib_arch` make variable, see demo_dsp as example
  484. * Tools
  485. - A lot of changes mainly in nsdk cli configs have been made to remove support of demosoc, and change it to evalsoc
  486. - A lot of changes mainly in nsdk cli configs have been made to support newer :ref:`develop_buildsystem_var_archext` variable format
  487. - Add llvm ci related nsdk cli config files
  488. - Add Zc/Xxlcz fpga benchmark config files
  489. - Support qemu 8.0 in nsdk cli tools
  490. - Update configurations due to application adding and updating
  491. * RTOS
  492. - Add freertos/ucosii/rtthread porting code for IAR compiler
  493. - Enable vector when startup new task for rtos for possible execute rvv related instruction exception
  494. * Misc
  495. - Change gitlab ci to use `Nuclei Toolchain 2023.10`_
  496. - Add IAR workbench workspace and projects for evalsoc, so user can quickly evaluate IAR support in IAR workbench
  497. V0.4.1
  498. ------
  499. This is release version ``0.4.1`` of Nuclei SDK.
  500. * Application
  501. - Add demo_cidu to demo cidu feature of Nuclei RISC-V Processor
  502. - Add demo_cache to demo ccm feature of Nuclei RISC-V Processor
  503. - Optimize demo_nice for rv64
  504. - Fix compile error when -Werror=shadow
  505. - Update helloworld and smphello due to mhartid changes
  506. * NMSIS
  507. - Bump NMSIS to 1.1.1 release version, NMSIS DSP/NN prebuilt libraries are built with 1.1.1 release.
  508. - Add CIDU support via core_feature_cidu.h, and ``__CIDU_PRESENT`` macro is required in ``<Device>.h`` to represent CIDU present or not
  509. - Add macros of HPM m/s/u event enable, events type, events idx
  510. - Fix define error of HPM_INIT macro
  511. - Due to mhartid csr update for nuclei subsystem reference design, two new API added called ``__get_hart_id`` and ``__get_cluster_id``
  512. - mhartid csr is now used to present cluster id and hart id for nuclei subsystem reference design
  513. - bit 0-7 is used for hart id in current cluster
  514. - bit 8-15 is used for cluster id of current cluster
  515. - for normal nuclei riscv cpu design, the mhartid csr is used as usual, but in NMSIS Core, we only take
  516. lower 8bits in use cases like systimer, startup code to support nuclei subsystem
  517. * Build System
  518. - Add semihost support in build system via SEMIHOST make variable, if SEMIHOST=1, will link semihost library, currently only works with newlibc library, not working with libncrt
  519. - Add support for compile cpp files with suffix like .cc or .CC
  520. - Remove ``--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.
  521. * SoC
  522. - Fix missing definition of BOOT_HARTID in ``startup_demosoc.S``
  523. - Update demosoc and evalsoc interrupt id and handler definition for CIDU changes
  524. - Add ``__CIDU_PRESENT`` macro to control CIDU present or not in ``demosoc.h`` and ``evalsoc.h`` which is the ``<Device>.h``
  525. - Add uart status get and clear api for evalsoc and demosoc, which is used by cidu demo
  526. - Add semihost support for all SoCs, currently only works with newlib, ``SEMIHOST=1`` control semihost support
  527. - Update openocd configuration file to support semihosting feature
  528. - Add extra run/restart command for openocd debug configuration in smp debug in npk for Nuclei Studio
  529. - Update smp/boot flow to match mhartid csr update
  530. - **BOOT_HARTID** is the choosen boot hart id in current cluster, not the full mhartid register value, for example, it the mhartid csr register is 0x0101, and the **BOOT_HARTID** should be set to 1, if you want hart 1 to be boot hart
  531. - Update and add more newlib stub functions in demosoc/evalsoc/gd32vf103 SoC's newlibc stub implementation, since we are no longer compile with ``--specs=nosys.specs``
  532. * CI
  533. - Add demo_cidu and demo_cache in ci configuration files, but expect it to run fail when run in qemu
  534. - Don't check certificate when download tool
  535. * Tools
  536. - Modify openocd configuration file in nsdk_utils.oy support win32 now
  537. - Add new feature to generate cpu json when knowing cpu arch in nsdk_runcpu.py script
  538. - Add runresult_diff.py script to compare the difference of two runresult.xlsx.csvtable.json files, useful when
  539. do benchmark difference check
  540. - Add ``--uniqueid <id>`` option for nsdk cli tools
  541. V0.4.0
  542. ------
  543. This is release version ``0.4.0`` of Nuclei SDK.
  544. * Application
  545. - Add :ref:`design_app_demo_pmp` application to demostrate pmp feature.
  546. - Add :ref:`design_app_demo_spmp` application to demostrate smode pmp feature, spmp is present when TEE feature is enabled.
  547. - Add :ref:`design_app_demo_smode_eclic` application to demonstrate ECLIC interrupt with TEE feature of Nuclei Processor.
  548. - Changed ``test/core`` test case due to ``EXC_Frame_Type`` struct member name changes.
  549. - Fix XS bit set bug in demo_nice application.
  550. - Add return value in smphello application.
  551. * NMSIS
  552. - Add ``__CTZ`` count trailing zero API in core_compatiable.h
  553. - Add ``__switch_mode`` switch risc-v privilege mode API in core_feature_base.h
  554. - Add ``__enable_irq_s``, ``__disable_irq_s`` smode irq control(on/off) API in core_feature_base.h
  555. - Add ``__set_medeleg`` exception delegation API in core_feature_base.h
  556. - Update and add smode eclic related API in core_feature_eclic.h only present when **TEE_PRESENT=1**
  557. - Optimize APIs of PMP and add ``__set_PMPENTRYx`` and ``__get_PMPENTRYx`` API for easily PMP configuration in core_feature_pmp.h
  558. - Add spmp related APIs for smode pmp hardware feature when **__SPMP_PRESENT=1**
  559. - Add per-hart related APIs for systimer such as ``SysTimer_SetHartCompareValue``, ``SysTimer_SetHartSWIRQ`` and etc in core_feature_timer.h, this is mainly needed when configure timer in smode per hart
  560. - Add TEE related csr macros in riscv_encoding.h
  561. - Add iregion offset macros and N3/VP mask in riscv_encoding.h and use it in demosoc/evalsoc implementation.
  562. - Add ``ICachePresent/DCachePresent`` API
  563. - Don't sub extra cost for BENCH_xxx API
  564. - Update NMSIS Core/DSP/NN and prebuilt library to version 1.1.0
  565. * Build System
  566. - Add ``intexc_<Device>_s.S`` asm file into compiling for evalsoc and demosoc
  567. - Show ``ARCH_EXT`` information when run make info
  568. - Don't specify elf filename when run gdb, only specify it when do load to avoid some gdb internal error
  569. - Add ``BOOT_HARTID`` and ``JTAGSN`` support, which need to be done in SoC support code and build system
  570. * SoC
  571. - Add smode interrupt and exception handling framework for evalsoc and demosoc, for details see code changes.
  572. - A new section called ``.vector_s`` is added(required in linker script) to store smode vector table which is initialized in ``system_<Device>.c``
  573. - A new ``intexc_<Device>_s.S`` asm source file is added to handle s-mode interrupt and exception
  574. - A default smode exception register and handling framework is added in ``system_<Device>.c``
  575. - **API Changes**: ``Exception_DumpFrame`` parameters changed to add mode passing in ``system_<Device>.c/h``
  576. - **API Changes**: ``EXC_Frame_Type`` struct member mcause/mepc changed to cause/epc in ``system_<Device>.c/h``
  577. - Print ``\0`` instead of ``\r`` when do simulation exit for better integration in Nuclei Studio QEMU simulation.
  578. - Add ``clock`` stub function for libncrt library in demosoc/evalsoc/gd32vf103 SoC support software.
  579. - Add ``sram`` download mode for evalsoc/demosoc, for details directly check the linker script
  580. - Change default ``__ICACHE_PRESENT/__DCACHE_PRESENT`` to 1 for evalsoc/demosoc, when evalsoc/demosoc startup, it will
  581. enable i/d cache if it really present.
  582. - Update openocd configuration files to remove deprecated command which might not be support in future
  583. - Merge smp and single core openocd config into one configuration for evalsoc and demosoc
  584. - Add **BOOT_HARTID** support for evalsoc and demosoc, which is used to specify the boot hartid, used together with **SMP**
  585. can support SMP or AMP run mode
  586. - Add **JTAGSN** support to specify a unified hummingbird jtag debugger via ``adapter serial``
  587. - For AMP support, we can work together with Nuclei Linux SDK, see https://github.com/Nuclei-Software/nsdk_ampdemo
  588. - Add NPK support for SMP/AMP working mode, and sram download mode
  589. * CI
  590. - Start to use Nuclei QEMU/Toolchain/OpenOCD 2022.12 in daily ci for gitlab runner
  591. * Tools
  592. - Add ``httpserver.py`` tool to create a http server on selected folder, good to preview built documentation.
  593. - Fix many issues related to nsdk_cli scripts when integrated using fpga hardware ci flow.
  594. - Support extra parsing benchmark python script for nsdk_cli tools, see 5f546fa0
  595. - Add ``nsdk_runcpu.py`` tool to run fpga baremetal benchmark
  596. * Documentation
  597. - Add ``make preview`` to preview build documentation.
  598. V0.3.9
  599. ------
  600. This is release version ``0.3.9`` of Nuclei SDK.
  601. * Application
  602. - Add ``lowpower`` application to demonstrate low-power feature of Nuclei Processor.
  603. - Update ``demo_nice`` application due to RTL change in cpu.
  604. - Change dhrystone compiling options to match better with Nuclei CPU IP.
  605. * NMSIS
  606. - Update riscv_encoding.h, a lot of changes in the CSRs and macros, VPU are added.
  607. - Add nmsis_bench.h, this header file will not be included in nmsis_core.h, if you want to
  608. use it, please directly include in your source code. It is used to help provide NMSIS
  609. benchmark and high performance monitor macro helpers.
  610. - Add hpm related API in core_feature_base.h
  611. - Add enable/disable vector API only when VPU available
  612. * Build System
  613. - Fix upload program the pc is not set correctly to _start when cpu is reset in flash programming mode.
  614. - Add run_qemu_debug/run_xlspike_rbb/run_xlspike_openocd make targets
  615. * SoC
  616. - Add npk support for smp, required to update ide plugin in Nuclei Studio 2022.04. And also a new version
  617. of qemu is required, if you want to run in qemu.
  618. - Add ``evalsoc`` in Nuclei SDK, ``evalsoc`` is a new evaluation SoC for Nuclei RISC-V Core, for next generation
  619. of cpu evaluation with iregion feature support. ``demosoc`` will be deprecated in future, when all our CPU IP
  620. provide iregion support.
  621. - **Important**: A lot of changes are made to linker script of SDK.
  622. - rodata are placed in data section for ilm/flash/ddrdownload mode, but placed in text section for flashxip download mode.
  623. - For ilm download mode, if you want to make the generated binary smaller, you can change REGION_ALIAS of DATA_LMA from ``ram`` to ``ilm``.
  624. - Add ``_text_lma/_text/_etext`` to replace ``_ilm_lma/_ilm/_eilm``, and startup code now using new ld symbols.
  625. - Use REGION_ALIAS to make linker script portable
  626. - Linker scripts of gd32vf103/evalsoc/demosoc are all changed.
  627. - FPU state are set to initial state when startup, not previous dirty state.
  628. - Vector are enabled and set to initial state when startup, when vector are enabled during compiling.
  629. - For latest version of Nuclei CPU IP, BPU cold init need many cycles, so we placed bpu enable before enter to main.
  630. V0.3.8
  631. ------
  632. This is release version ``0.3.8`` of Nuclei SDK.
  633. * Application
  634. - Add ``smphello`` application to test baremetal smp support, this will do demonstration
  635. to boot default 2 core and each hart print hello world.
  636. * NMSIS
  637. - Some macros used in NMSIS need to expose when DSP present
  638. - nmsis_core.h might be included twice, it might be included by <Device.h> and <riscv_math.h>
  639. * Build
  640. - Add ``SYSCLK`` and ``CLKSRC`` make variable for gd32vf103 SoC to set system clock in hz and clock source, such as ``SYSCLK=72000000 CLKSRC=hxtal``
  641. - Exclude source files using ``EXCLUDE_SRCS`` make variable in Makefile
  642. - ``C_SRCS/ASM_SRCS/CXX_SRCS`` now support wildcard pattern
  643. - ``USB_DRV_SUPPORT`` in gd32vf103 is removed, new ``USB_DRIVER`` is introduced, ``USB_DRIVER=device/host/both`` to choose device, host or both driver code.
  644. - ``SMP``, ``HEAPSZ`` and ``STACKSZ`` make variable are introduced to control stack/heap
  645. size and smp cpu count used in SDK
  646. * SoC
  647. - Add libncrt 2.0.0 support for demosoc and gd32vf103, libncrt stub functions need to be adapted, see 2e09b6b0 and 2e09b6b0
  648. - Fix ram size from 20K to 32K for gd32vf103v_eval and gd32vf103v_rvstar
  649. - Change demosoc eclic/timer baseaddr to support future cpu iregion feature, see eab28320d and 18109d04
  650. - Adapt system_gd32vf103.c to support control system clock in hz and clock source via macro **SYSTEM_CLOCK** and **CLOCK_USING_IRC8M** or **CLOCK_USING_HXTAL**
  651. - Merge various changes for gd32vf103 support from ``gsauthof@github``, see PR #37, #38, #40
  652. - Remove usb config header files and usb config source code for gd32vf103
  653. - Change gd32vf103 linker scripts to support ``HEAPSZ`` and ``STACKSZ``
  654. - Change demosoc linker scripts to support ``HEAPSZ``, ``STACKSZ`` and ``SMP``
  655. - Add baremetal SMP support for demosoc, user can pass ``SMP=2`` to build for 2 smp cpu.
  656. * Tools
  657. - Record more flags in ``nsdk_report.py`` such as ``NUCLEI_SDK_ROOT``, ``OPENOCD_CFG`` and ``LINKER_SCRIPT``.
  658. - Fix nsdk_report.py generated runresult.xls file content is not correct when some application failed
  659. - Add benchmark c standard script in tools/misc/barebench
  660. - Change to support ``SMP`` variable
  661. * OS
  662. - RT_HEAP_SIZE defined in cpuport.c is small, need to be 2048 for msh example when RT_USING_HEAP is enabled
  663. - Application can define RT_HEAP_SIZE in rtconfig.h to change the size
  664. For detailed changes, please check commit histories since 0.3.7 release.
  665. V0.3.7
  666. ------
  667. This is release version ``0.3.7`` of Nuclei SDK.
  668. * Application
  669. - **CAUTION**: Fix benchmark value not correct printed when print without float c library,
  670. which means the CSV printed value in previous release is not correct, please take care
  671. - Add **DHRY_MODE** variable to support different dhrystone run options in dhrystone benchmark, ``ground``, ``inline`` and ``best`` are supported
  672. * NMSIS
  673. - Bump to v1.0.4
  674. - Add B-extension support for NMSIS
  675. - Fix various issues reported in github
  676. * Build
  677. - add ``showflags`` target to show compiling information and flags
  678. - add ``showtoolver`` target to show tool version used
  679. * SoC
  680. - Change all un-registered interrupt default handler to ``default_intexc_handler``, which means user need to register
  681. the interrupt handler using ``ECLIC_SetVector`` before enable it.
  682. - Add **RUNMODE** support only in ``demosoc``, internal usage
  683. - Add jlink debug configuration for gd32vf103 soc
  684. * Tools
  685. - Update ``nsdk_report.py`` script to support generate benchmark run result in excel.
  686. - Add ``ncycm`` cycle model runner support in ``nsdk_bench.py``
  687. - Add ``nsdk_runner.py`` script for running directly on different fpga board with feature of programing fpga bitstream using vivado
  688. For detailed changes, please check commit histories since 0.3.6 release.
  689. V0.3.6
  690. ------
  691. This is release version ``0.3.6`` of Nuclei SDK.
  692. * Application
  693. - update coremark benchmark options for n900/nx900, which can provide better score number
  694. - benchmark value will be print in float even printf with float is not supported in c library
  695. - baremetal applications will exit with an return value in main
  696. * NMSIS
  697. - add ``__CCM_PRESENT`` macro in NMSIS-Core, if CCM hardware unit is present in your CPU,
  698. ``__CCM_PRESENT`` macro need to be set to 1 in ``<Device>.h``
  699. - Fixed mtvec related api comment in ``core_feature_eclic.h``
  700. - Add safely write mtime/mtimecmp register for 32bit risc-v processor
  701. - rearrage #include header files for all NMSIS Core header files
  702. - removed some not good #pragma gcc diagnostic lines in ``nmsis_gcc.h``
  703. * Build
  704. - Add experimental ``run_xlspike`` and ``run_qemu`` make target support
  705. - ``SIMU=xlspike`` or ``SIMU=qemu`` passed in make will auto exit xlspike/qemu if main function returned
  706. * SoC
  707. - Add xlspike/qemu auto-exit support for gd32vf103 and demosoc, required next version after Nuclei QEMU 2022.01
  708. For detailed changes, please check commit histories since 0.3.5 release.
  709. V0.3.5
  710. ------
  711. This is release version ``0.3.5`` of Nuclei SDK.
  712. .. caution::
  713. - This version introduce a lot of new features, and required Nuclei GNU Toolchain 2022.01
  714. - If you want to import as NPK zip package into Nuclei Studio, 2022.01 version is required.
  715. - If you want to have smaller code size for Nuclei RISC-V 32bit processors, please define ``STDCLIB=libncrt_small``
  716. in your application Makefile, or change **STDCLIB** defined in ``Build/Makefile.base`` to make it available
  717. globally.
  718. * Application
  719. - **DSP_ENABLE** and **VECTOR_ENABLE** are deprecated now in demo_dsp application, please use **ARCH_EXT** to replace it.
  720. ``ARCH_EXT=p`` equal to ``DSP_ENABLE=ON``, ``ARCH_EXT=v`` equal to ``VECTOR_ENABLE=ON``.
  721. - ``demo_dsp`` application no need to set include and libraries for NMSIS DSP library, just use ``NMSIS_LIB = nmsis_dsp`` to
  722. select NMSIS DSP library and set include directory.
  723. - Update coremark compile options for different Nuclei cpu series, currently
  724. 900 series options and 200/300/600 series options are provided, and can be selected by ``CPU_SERIES``.
  725. - ``CPU_SERIES=900``: the compiler options for Nuclei 900 series will be selected.
  726. - otherwise, the compiler options for Nuclei 200/300/600 series will be selected, which is by default for 300
  727. - Fix ``whetstone`` application compiling issue when compiled with v extension present
  728. * SoC
  729. - Provide correct gd32vf103.svd, the previous one content is messed up.
  730. - ``putchar/getchar`` newlib stub are required to be implemented for RT-Thread porting
  731. - Added support for newly introduced nuclei c runtime library(libncrt).
  732. - Rearrange stub function folder for gd32vf103 and demosoc to support
  733. different c runtime library.
  734. - A lot changes happened in link scripts under SoC folder
  735. - heap section is added for libncrt, size controlled by ``__HEAP_SIZE``
  736. - heap start and end ld symbols are ``__heap_start`` and ``__heap_end``
  737. - stub function ``sbrk`` now using new heap start and end ld symbols
  738. - tdata/tbss section is added for for libncrt, thread local storage supported
  739. - For **flash** download mode, vector table are now placed in ``.vtable`` section now instead of ``.vtable_ilm``,
  740. ``VECTOR_TABLE_REMAPPED`` macro is still required in **DOWNLOAD=flash** mode
  741. - flash program algo used in openocd for demosoc changed to nuspi, see changes in openocd_demosoc.cfg
  742. * NMSIS
  743. - Update NMSIS Core/DSP/NN to version 1.0.3, see `NMSIS 1.0.3 Changelog`_
  744. - Update prebuilt NMSIS DSP/NN library to version 1.0.3 built by risc-v gcc 10.2
  745. - For NMSIS Core 1.0.3, no need to define ``__RISCV_FEATURE_DSP`` and ``__RISCV_FEATURE_VECTOR``
  746. for ``riscv_math.h`` now, it is now auto-defined in ``riscv_math_types.h``
  747. * OS
  748. - Change RT-Thread porting to support libncrt and newlibc, mainly using putchar and getchar
  749. * Build System
  750. - Introduce :ref:`develop_buildsystem_var_stdclib` makefile variable to support different c library.
  751. - **NEWLIB** and **PFLOAT** variable is deprecated in this release.
  752. - Introduce :ref:`develop_buildsystem_var_archext` makefile variable to support b/p/v extension.
  753. - Only link ``-lstdc++`` library when using **STDCLIB=newlib_xxx**
  754. - **RISCV_CMODEL** variable is added to choose code model, medlow or medany can be chosen,
  755. default is ``medlow`` for RV32 otherwise ``medany`` for RV64.
  756. - **RISCV_TUNE** variable is added to select riscv tune model, for Nuclei CPU, we added ``nuclei-200-series``,
  757. ``nuclei-300-series``, ``nuclei-600-series`` and ``nuclei-900-series`` in Nuclei RISC-V GNU toolchain >= 2021.12
  758. * Contribution
  759. - Update contribution guide due to runtime library choices provided now.
  760. * NPK
  761. - **newlibsel** configuration variable changed to **stdclib**, and is not compatiable.
  762. - **newlibsel=normal** change to **stdclib=newlib_full**
  763. - **newlibsel=nano_with_printfloat** changed to **stdclib=newlib_small**
  764. - **newlibsel=nano** changed to **stdclib=newlib_nano**
  765. - **stdclib** has more options, please see ``SoC/demosoc/Common/npk.yml``
  766. - **nuclei_archext** is added as new configuration variable, see ``SoC/demosoc/Common/npk.yml``
  767. * tools
  768. - generate benchmark values in csv files when running nsdk_bench.py or nsdk_execute.py
  769. - fix xl_spike processes not really killed in linux environment when running nsdk_bench.py
  770. For detailed changes, please check commit histories since 0.3.4 release.
  771. V0.3.4
  772. ------
  773. This is release version ``0.3.4`` of Nuclei SDK.
  774. * CI
  775. - Fix gitlab ci fail during install required software
  776. * Build System
  777. - build asm with -x assembler-with-cpp
  778. * Tools
  779. - Fix ``tools/scripts/nsdk_cli/configs/nuclei_fpga_eval_ci_qemu.json`` description issue for dsp enabled build configs
  780. - Generate html report when run ``tools/scripts/nsdk_cli/nsdk_bench.py``
  781. - nsdk_builder.py: modify qemu select cpu args,change ``p`` to ``,ext=p``
  782. * SoC
  783. - For demosoc, if you choose ilm and ddr download mode, then the data section's LMA is equal to VMA now, and there
  784. will be no data copy for data section, bss section still need to set to zero.
  785. - For demosoc, if you choose ilm and ddr download mode, The rodata section are now also placed in data section.
  786. * NPK
  787. - add ``-x assembler-with-cpp`` in npk.yml for ssp
  788. For detailed changes, please check commit histories since 0.3.3 release.
  789. V0.3.3
  790. ------
  791. This is release version ``0.3.3`` of Nuclei SDK.
  792. * NPK
  793. - Fix NPK issues related to QEMU for demosoc and gd32vf103, and RTOS macro definitions in NPK
  794. - This SDK release required Nuclei Studio 2021.09-ENG1, 2021.08.18 build version
  795. For detailed changes, please check commit histories since 0.3.2 release.
  796. V0.3.2
  797. ------
  798. This is release version ``0.3.2`` of Nuclei SDK.
  799. * Build
  800. - **Important changes** about build system:
  801. - The SoC and RTOS related makefiles are moving to its own folder, and controlled By
  802. **build.mk** inside in in the SoC/<SOC> or OS/<RTOS> folders.
  803. - Middlware component build system is also available now, you can add you own middleware or library
  804. into ``Components`` folder, such as ``Components/tjpgd`` or ``Components/fatfs``, and you can include
  805. this component using make variable ``MIDDLEWARE`` in application Makefile, such as ``MIDDLEWARE := fatfs``,
  806. or ``MIDDLEWARE := tjpgd fatfs``.
  807. - Each middleware component folder should create a ``build.mk``, which is used to control
  808. the component build settings and source code management.
  809. - An extra ``DOWNLOAD_MODE_STRING`` macro is passed to represent the DOWNLOAD mode string.
  810. - In ``startup_<Device>.S`` now, we don't use ``DOWNLOAD_MODE`` to handle the vector table location, instead
  811. we defined a new macro called ``VECTOR_TABLE_REMAPPED`` to stand for whether the vector table's vma != lma.
  812. If ``VECTOR_TABLE_REMAPPED`` is defined, the vector table is placed in ``.vtable_ilm``, which means the vector
  813. table is placed in flash and copy to ilm when startup.
  814. - Change openocd ``--pipe`` option to ``-c "gdb_port pipe; log_output openocd.log"``
  815. - Remove ``-ex "monitor flash protect 0 0 last off"`` when upload or debug program to avoid error
  816. when openocd configuration file didn't configure a flash
  817. - Add ``cleanall`` target in **<NUCLEI_SDK_ROOT>/Makefile**, you can clean all the applications
  818. defined by ``EXTRA_APP_ROOTDIRS`` variable
  819. - Fix ``size`` target of build system
  820. * Tools
  821. - Add ``nsdk_cli`` tools in Nuclei SDK which support run applications
  822. - **tools/scripts/nsdk_cli/requirements.txt**: python module requirement file
  823. - **tools/scripts/nsdk_cli/configs**: sample configurations used by scripts below
  824. - **tools/scripts/nsdk_cli/nsdk_bench.py**: nsdk bench runner script
  825. - **tools/scripts/nsdk_cli/nsdk_execute.py**: nsdk execute runner script
  826. * SoC
  827. - Add general bit operations and memory access APIs in ``<Device>.h``, eg. ``_REG32(p, i)``, ``FLIP_BIT(regval, bitofs)``
  828. - ``DOWNLOAD_MODE_xxx`` macros are now placed in ``<Device>.h``, which is removed from ``riscv_encoding.h``, user can define
  829. different ``DOWNLOAD_MODE_xxx`` according to its device/board settings.
  830. - ``DOWNLOAD_MODE_STRING`` are now used to show the download mode string, which should be passed eg. ``-DOWNLOAD_MODE_STRING=\"flash\"``,
  831. it is used in ``system_<Device>.c``
  832. - ``DOWNLOAD_MODE_xxx`` now is used in ``startup_<Device>.S`` to control the vector table location,
  833. instead a new macro called ``VECTOR_TABLE_REMAPPED`` is used, and it should be defined in ``SoC/<SOC>/build.mk``
  834. if the vector table's LMA and VMA are different.
  835. * NMSIS
  836. - Bump NMSIS to version 1.0.2
  837. * OS
  838. - Fix OS task switch bug in RT-Thread
  839. V0.3.1
  840. ------
  841. This is official version ``0.3.1`` of Nuclei SDK.
  842. .. caution::
  843. - We are using ``demosoc`` to represent the Nuclei Evaluation SoC for customer to replace the old name ``hbird``.
  844. - The ``hbird`` SoC is renamed to ``demosoc``, so the ``SoC/hbird`` folder is renamed to ``SoC/demosoc``,
  845. and the ``SoC/hbird/Board/hbird_eval`` is renamed to ``SoC/demosoc/Board/nuclei_fpga_eval``.
  846. * SoC
  847. - board: Add support for TTGO T-Display-GD32, contributed by `tuupola`_
  848. - Add definitions for the Interface Association Descriptor of USB for GD32VF103, contributed by `michahoiting`_.
  849. - **IMPORTANT**: ``hbird`` SoC is renamed to ``demosoc``, and ``hbird_eval`` is renamed to ``nuclei_fpga_eval``
  850. - Please use ``SOC=demosoc BOARD=nuclei_fpga_eval`` to replace ``SOC=hbird BOARD=hbird_eval``
  851. - The changes are done to not using the name already used in opensource Hummingbird E203 SoC.
  852. - Now ``demosoc`` is used to represent the Nuclei Demo SoC for evaluation on Nuclei FPGA evaluation Board(MCU200T/DDR200T)
  853. * Documentation
  854. - Update ``msh`` application documentation
  855. - Add basic documentation for **TTGO T-Display-GD32**
  856. - Add Platformio user guide(written in Chinese) link in get started guide contributed by Maker Young
  857. * Application
  858. - Increase idle and finsh thread stack for RT-Thread, due to stack size is not enough for RISC-V 64bit
  859. - Set rt-thread example tick hz to 100, and ucosii example tick hz to 50
  860. * Build
  861. - Format Makefile space to tab
  862. - Add $(TARGET).dasm into clean targets which are missing before
  863. * Code style
  864. - Format source files located in application, OS, SoC, test using astyle tool
  865. V0.3.0
  866. ------
  867. This is official version ``0.3.0`` of Nuclei SDK.
  868. * SoC
  869. - Add more newlib stub functions for all SoC support packages
  870. - Dump extra csr ``mdcause`` in default exception handler for hbird
  871. - Add Sipeed Longan Nano as new supported board
  872. - Add **gd32vf103c_longan_nano** board support, contributed by `tuupola`_ and `RomanBuchert`_
  873. * Documentation
  874. - Add ``demo_nice`` application documentation
  875. - Add ``msh`` application documentation
  876. - Update get started guide
  877. - Add **gd32vf103c_longan_nano** board Documentation
  878. - Update board documentation structure levels
  879. * Application
  880. - Cleanup unused comments in dhrystone
  881. - Add new ``demo_nice`` application to show Nuclei NICE feature
  882. - Add new ``msh`` application to show RT-Thread MSH shell component usage
  883. * NMSIS
  884. - Fix typo in CLICINFO_Type._reserved0 bits
  885. - Fix ``__STRBT``, ``__STRHT``, ``__STRT`` and ``__USAT`` macros
  886. * OS
  887. - Add ``msh`` component source code into RT-Thread RTOS source code
  888. - Add ``rt_hw_console_getchar`` implementation
  889. * Build
  890. - Add ``setup.ps1`` for setting up environment in windows powershell
  891. V0.2.9
  892. ------
  893. This is official version ``0.2.9`` of Nuclei SDK.
  894. * SoC
  895. - Remove ``ftdi_device_desc "Dual RS232-HS"`` line in openocd configuration.
  896. .. note::
  897. Newer version of RVSTAR and Hummingbird Debugger have changed the FTDI description
  898. from "Dual RS232-HS" to "USB <-> JTAG-DEBUGGER", to be back-compatiable with older
  899. version, we just removed this ``ftdi_device_desc "Dual RS232-HS"`` line.
  900. If you want to select specified JTAG, you can add this ``ftdi_device_desc`` according
  901. to your description.
  902. - Fix typos in **system_<Device>.c**
  903. - Fix gpio driver implementation bugs of hbird
  904. - Enable more CSR(micfg_info, mdcfg_info, mcfg_info) show in gdb debug
  905. * Documentation
  906. - Add more faqs
  907. * Build System
  908. - Remove unnecessary upload gdb command
  909. - Remove upload successfully message for ``make upload``
  910. V0.2.8
  911. ------
  912. This is the official release version ``0.2.8`` of Nuclei SDK.
  913. * SoC
  914. - Fixed implementation for ``_read`` newlib stub function, now scanf
  915. can be used correctly for both gd32vf103 and hbird SoCs.
  916. * Misc
  917. - Update platformio package json file according to latest platformio requirements
  918. V0.2.7
  919. ------
  920. This is the official release version ``0.2.7`` of Nuclei SDK.
  921. * OS
  922. - Fix OS portable code, configKERNEL_INTERRUPT_PRIORITY should
  923. set to default 0, not 1. 0 is the lowest abs interrupt level.
  924. * Application
  925. - Fix configKERNEL_INTERRUPT_PRIORITY in FreeRTOSConfig.h to 0
  926. * NMSIS
  927. - Change timer abs irq level setting in function SysTick_Config from 1 to 0
  928. V0.2.6
  929. ------
  930. This is the official release version ``0.2.6`` of Nuclei SDK.
  931. * Application
  932. - Fix typo in rtthread demo code
  933. - Update helloworld application to parse vector extension
  934. * NMSIS
  935. - Update NMSIS DSP and NN library built using NMSIS commit 3d9d40ff
  936. * Documentation
  937. - Update quick startup nuclei tool setup section
  938. - Update build system documentation
  939. - Fix typo in application documentation
  940. V0.2.5
  941. ------
  942. This is the official release version ``0.2.5`` of Nuclei SDK.
  943. This following changes are maded since ``0.2.5-RC1``.
  944. * SoC
  945. - For **SOC=hbird**, in function ``_premain_init`` of ``system_hbird.c``, cache will be enable in following cases:
  946. - If ``__ICACHE_PRESENT`` is set to 1 in ``hbird.h``, I-CACHE will be enabled
  947. - If ``__DCACHE_PRESENT`` is set to 1 in ``hbird.h``, D-CACHE will be enabled
  948. * Documentation
  949. - Fix several invalid cross reference links
  950. * NMSIS
  951. - Update and use NMSIS 1.0.1
  952. V0.2.5-RC1
  953. ----------
  954. This is release ``0.2.5-RC1`` of Nuclei SDK.
  955. * Documentation
  956. - Fix invalid links used in this documentation
  957. - Rename `RVStar` to `RV-STAR` to keep alignment in documentation
  958. * NMSIS
  959. - Update and use NMSIS 1.0.1-RC1
  960. - Add NMSIS-DSP and NMSIS-NN library for RISC-V 32bit and 64bit
  961. - Both RISC-V 32bit and 64bit DSP instructions are supported
  962. * SoC
  963. - All startup and system init code are adapted to match design changes of NMSIS-1.0.1-RC1
  964. - `_init` and `_fini` are deprecated for startup code, now please use `_premain_init` and `_postmain_fini` instead
  965. - Add `DDR` download mode for Hummingbird SoC, which downloaded program into DDR and execute in DDR
  966. V0.2.4
  967. ------
  968. This is release ``0.2.4`` of Nuclei SDK.
  969. * Application
  970. - Upgrade the ``demo_dsp`` application to a more complicated one, and by default,
  971. ``DSP_ENABLE`` is changed from ``OFF`` to ``ON``, optimization level changed from
  972. ``O2`` to no optimization.
  973. * SoC
  974. - Update openocd configuration file for Hummingbird FPGA evaluation board,
  975. If you want to use ``2-wire`` mode of JTAG, please change ``ftdi_oscan1_mode off``
  976. in ``openocd_hbird.cfg`` to ``ftdi_oscan1_mode on``.
  977. - Add ``delay_1ms`` function in all supported SoC platforms
  978. - Fix bugs found in uart and gpio drivers in hbird SoC
  979. - Move ``srodata`` after ``sdata`` for ILM linker script
  980. - Change bool to BOOL to avoid cpp compiling error in gd32vf103
  981. - Fix ``adc_mode_config`` function in gd32vf103 SoC
  982. * Build System
  983. - Add **GDB_PORT** variable in build system, which is used to specify the gdb port
  984. of openocd and gdb when running ``run_openocd`` and ``run_gdb`` targets
  985. - Add Nuclei N/NX/UX 600 series core configurations into *Makefile.core*
  986. - Add -lstdc++ library for cpp application
  987. - Generate hex output for dasm target
  988. - Optimize Makefile to support MACOS
  989. V0.2.3
  990. ------
  991. This is release ``0.2.3`` of Nuclei SDK.
  992. * OS
  993. - Add **RT-Thread 3.1.3** as a new RTOS service of Nuclei SDK, the kernel source
  994. code is from RT-Thread Nano project.
  995. - Update UCOSII source code from version ``V2.91`` to ``V2.93``
  996. - The source code of UCOSII is fetched from https://github.com/SiliconLabs/uC-OS2/
  997. - **Warning**: Now for UCOSII application development, the ``app_cfg.h``, ``os_cfg.h``
  998. and ``app_hooks.c`` are required, which can be also found in
  999. https://github.com/SiliconLabs/uC-OS2/tree/master/Cfg/Template
  1000. * Application
  1001. - Add **RT-Thread** demo application.
  1002. - Don't use the ``get_cpu_freq`` function in application code, which currently is only
  1003. for internal usage, and not all SoC implementations are required to provide this function.
  1004. - Use ``SystemCoreClock`` to get the CPU frequency instead of using ``get_cpu_freq()`` in
  1005. ``whetstone`` application.
  1006. - Update UCOSII applications due to UCOSII version upgrade, and application development
  1007. for UCOSII also required little changes, please refer to :ref:`design_rtos_ucosii`
  1008. - Fix ``time_in_secs`` function error in ``coremark``, and cleanup ``coremark`` application.
  1009. * Documentation
  1010. - Add documentation about RT-Thread and its application development.
  1011. - Update documentation about UCOSII and its application development.
  1012. - Update ``coremark`` application documentation.
  1013. * Build System
  1014. - Add build system support for RT-Thread support.
  1015. - Build system is updated due to UCOSII version upgrade, the ``OS/UCOSII/cfg`` folder
  1016. no longer existed, so no need to include it.
  1017. * SoC
  1018. - Update SoC startup and linkscript files to support RT-Thread
  1019. * Misc
  1020. - Add ``SConscript`` file in Nuclei SDK root, this file is used by RT-Thread package.
  1021. V0.2.2
  1022. ------
  1023. This is release ``0.2.2`` of Nuclei SDK.
  1024. * OS
  1025. - Update UCOSII portable code
  1026. - Now both FreeRTOS and UCOSII are using similar portable code,
  1027. which both use ``SysTimer Interrupt`` and ``SysTimer Software Interrupt``.
  1028. * Documentation
  1029. - Update documentation about RTOS
  1030. V0.2.1
  1031. ------
  1032. This is release ``0.2.1`` of Nuclei SDK.
  1033. * Build System
  1034. - Add extra linker options ``-u _isatty -u _write -u _sbrk -u _read -u _close -u _fstat -u _lseek``
  1035. in Makefile.conf to make sure if you pass extra ``-flto`` compile option, link phase will not fail
  1036. * Documentation
  1037. - Add documentation about how to optimize for code size in application development, using ``demo_eclic``
  1038. as example.
  1039. * OS
  1040. - Update FreeRTOS to version V10.3.1
  1041. - Update FreeRTOS portable code
  1042. * NMSIS
  1043. - Update NMSIS to release ``v1.0.0-beta1``
  1044. V0.2.0-alpha
  1045. ------------
  1046. This is release ``0.2.0-alpha`` of Nuclei SDK.
  1047. * Documentation
  1048. - Initial verison of Nuclei SDK documentation
  1049. - Update Nuclei-SDK README.md
  1050. * Application
  1051. - Add ``demo_eclic`` application
  1052. - Add ``demo_dsp`` application
  1053. - ``timer_test`` application renamed to ``demo_timer``
  1054. * Build System
  1055. - Add comments for build System
  1056. - Small bug fixes
  1057. * **NMSIS**
  1058. - Change ``NMSIS/Include`` to ``NMSIS/Core/Include``
  1059. - Add ``NMSIS/DSP`` and ``NMSIS/NN`` header files
  1060. - Add **NMSIS-DSP** and **NMSIS-NN** pre-built libraries
  1061. V0.1.1
  1062. ------
  1063. This is release ``0.1.1`` of Nuclei SDK.
  1064. Here are the main features of this release:
  1065. * Support Windows and Linux development in command line using Make
  1066. * Support development using PlatformIO, see https://github.com/Nuclei-Software/platform-nuclei
  1067. * Support Humming Bird FPGA evaluation Board and GD32VF103 boards
  1068. - The **Humming Bird FPGA evaluation Board** is used to run evaluation FPGA bitstream
  1069. of Nuclei N200, N300, N600 and NX600 processor cores
  1070. - The **GD32VF103 boards** are running using a real MCU from Gigadevice which is using
  1071. Nuclei N200 RISC-V processor core
  1072. * Support different download modes flashxip, ilm, flash for our FPGA evaluation board
  1073. .. _Nuclei-SDK: https://github.com/Nuclei-Software/nuclei-sdk
  1074. .. _tuupola: https://github.com/tuupola
  1075. .. _RomanBuchert: https://github.com/RomanBuchert
  1076. .. _michahoiting: https://github.com/michahoiting
  1077. .. _NMSIS 1.0.3 Changelog: https://doc.nucleisys.com/nmsis/changelog.html#v1-0-3
  1078. .. _Nuclei Studio 2023.10: https://github.com/Nuclei-Software/nuclei-studio/releases/tag/2023.10
  1079. .. _Nuclei Toolchain 2023.10: https://github.com/riscv-mcu/riscv-gnu-toolchain/releases/tag/nuclei-2023.10
  1080. .. _NMSIS 1.2.0: https://github.com/Nuclei-Software/NMSIS/releases/tag/1.2.0