.. _changelog:

Changelog
=========

V0.3.0
------

This is release version ``0.3.0`` of N100 SDK.

.. note::

   - Fix bug in RTOS porting for task sp alignment requirement
   - This N100 SDK only support N100 with IRQC interrupt controller,
     if your N100 CPU configured with ECLIC, please use Nuclei SDK >= 0.9.0
   - Please use Nuclei N100 SDK with **Nuclei Studio >= 2025.10**, get it from https://nucleisys.com/download.php#tools

* OS

  - Bugfix for correct task stack pointer alignment(16 bytes for non-ilp32e, and 4 bytes for ilp32e) on FreeRTOS/UCOSII/RT-Thread RTOS porting, see https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/301374e92976e298e676e7129a6212926b2299ce/riscv-cc.adoc?plain=1#L245-L259
  - Fix ``xPortTaskSwitch`` disable/enable IRQ around ``vTaskSwitchContext`` which may cause interrupt nesting during task switch in FreeRTOS
  - Fix tickless sleep mode may miss interrupts by ensuring global IRQ is disabled before stopping SysTick in FreRTOS
  - Remove unnecessary ``__FENCE_I`` after re-enabling interrupts in tickless sleep mode in FreeRTOS
  - Fix tick drift caused by wrong elapsed time calculation when WFI wakes up but MTIME has not yet incremented in FreeRTOS tickless idle

* Build

  - Fix gdb not correct when toolchain choose Terapines ZCC
  - Bump CI to use 2025.10 tools
  - Bump sdkbuild podman image to 2025.10
  - Update to support Zcc version 4.1.2 and above as well as the new C library configuration
  - Fix Zc extension detection: change from matching ``zc`` prefix to explicitly checking for ``zcmp`` and ``zcmt`` separately when removing ``c`` from base ARCH string in ``SoC/evalsoc/build.mk`` and ``SoC/evalsoc/npk.yml``
  - Update compiler flags ``-fomit-frame-pointer -fno-shrink-wrap-separate`` to only apply for ``zcmp`` extension, required for generating Zc push/pop instructions in ``toolchain/nuclei_gnu.mk`` and ``SoC/evalsoc/npk.yml``

* Tools

  - Support conditional QEMU ``icount`` option via ``ICOUNT_OPT`` in ``nsdk_cli`` tools
  - Add ``SDK_APPDIRS_IGNORE`` environment variable support in ``nsdk_cli`` tools to specify ignored application directories

* Documentation

  - Clarify N100 SDK support for IRQC vs ECLIC interrupt controllers
  - Update documentation to indicate that N100 SDK is only for Nuclei N100 CPU with IRQC interrupt controller
  - Update toolchain version references from 2025.02 to 2025.10

V0.2.1
-------

.. note::

    - Please use Nuclei N100 SDK with **Nuclei Studio 2025.02**, get it from https://nucleisys.com/download.php#tools
    - For Terapines ZCC toolchain, please download it from https://www.terapines.com/products/zcc and replace
     Nuclei Studio IDE ``toolchain/zcc`` folder existing content

This is release version ``0.2.1`` of N100 SDK.

* SoC

  - Fix missing return for IRQC_Register_IRQ for evalsoc
  - Add NMI exception support for evalsoc, exception code is ``0xFFF``
  - Support ``zcmt`` extension in evalsoc linker script file
  - Fix wrong npk dependency described in ``npk.yml`` file which cause wrongly depends on nuclei sdk

* Tools

  - 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

V0.2.0
-------

.. note::

    - Please use Nuclei N100 SDK with **Nuclei Studio 2025.02**, get it from https://nucleisys.com/download.php#tools
    - This version of N100 SDK only support latest n100/ns100 cpu core.

This is release version ``0.2.0`` of N100 SDK.

* Application

  - Add an empty project for n100 sdk
  - Add an macro ``TIMER_RELOAD`` to control ``demo_timer`` timer interrupt reload via TIME or TIMECMP
  - reset cycle and instret when start to do benchmark

* NMSIS

  - Add ``__set_rv_instret`` and ``__set_rv_cycle`` API for N100 NMSIS Core
  - Fix ``SysTick_Config`` API by using ``SysTick_Reload`` instead of directly set MTIMECMP register to avoid easy 24b overflow
  - Remove ``IRQC_SetPendingIRQ`` and ``IRQC_ClearPendingIRQ`` API due to N100 only support level interrupt
  - Update ``CSR_MCAUSE_Type/CSR_MSTATUS_Type/CSR_MSTATUSH_Type`` union member

* SoC

  - Merge newlib stub code files into one stub code file
  - Add ``CODESIZE`` make variable to reduce application code size
  - Modify startup code for both gcc and iar startup code and linker script to support
    new startup and exception rules, see :ref:`design_soc_evalsoc_usage`
  - Now only ``sram`` linker script is provided for reference, you can always modify
    startup and linker script code to match your real cpu design
  - Fix ``delay_1ms`` API may work wrongly due to TIME register overflow
  - N100 evalsoc external interrupt number changed from 30 to 16
  - N100 exception entry alignment changed to 4bytes to match n100 design

* Build System

  - Add ``nuclei_llvm`` and ``terapines`` toolchain supported, required Nuclei Studio 2025.02
  - Fix IAR prebuild projects build issues

V0.1.0
------

This is release version ``0.1.0`` of N100 SDK.

.. note::

    - Please use Nuclei N100 SDK with **Nuclei Studio 2024.06**, get it from https://nucleisys.com/download.php#tools
    - Nuclei N100 SDK is modified based on Nuclei SDK **0.5.0** release, and will not merge back to Nuclei SDK in the future.
    - This SDK is not compatible with Nuclei SDK for **200/300/600/900/1000** series, if you want SDK for these series, please switch to **master** or **develop** branch, see https://doc.nucleisys.com/nuclei_sdk/

* Application

    - Added baremetal/freertos/ucosii/rtthread examples.
    - Baremetal examples contains helloworld, demo_irqc, demo_timer, demo_extirq, lowpower cases to show cpu interrupt and timer usage.
    - Baremetal examples also contains benchmark examples such as coremark, dhrystone, whetstone which can demostrate the performance of Nuclei CPU.
    - RTOS examples contains different samples to show how to use FreeRTOS, UCOSII and RT-Thread on Nuclei N100.

* Build System

    - Support Nuclei 100 series RISC-V CPU Cores.
    - Support Nuclei RISC-V GCC toolchain, IAR Compiler and Terapines ZCC toolchain.

* NMSIS

    - NMSIS in N100 SDK is **not compatible with** standard NMSIS, this is modified to match Nuclei 100 series CPU.
    - Most of the APIs in this **modified NMSIS** are similar to standard NMSIS, but some APIs have been changed or added.
    - Please refer to the header files in ``NMSIS/Core/Include`` directory for more details.

* SoC

    - **Only Nuclei Evaluation SoC for 100 series is supported by this SDK**.
    - If you want to port to your own SoC, you modify based on this ``evalsoc`` implementation.
    - This SDK will also be generated by 100 series ``nuclei_gen`` tool, please take a look at the ``evalsoc.memory``, ``openocd_evalsoc.cfg``, ``cpufeature.h`` and ``cpufeature.mk``,
      for IAR projects, you need to also check the linker script inside it.
    - Only ``sram`` and ``flashxip`` download modes are supported in this SDK, and the linker script is quite different to normal Nuclei SDK,
      please take care, especially the vector table and exception entry address are RTL configurable which means when your RTL configuration
      is different to our ``evalsoc``, you need to modify the linker script to match your rtl configuration.
    - IAR support is also added in this SDK, and linker and startup/exception code are different from GCC, please take care when you port to your own SoC.

* RTOS

    - FreeRTOS/UCOSII/RT-Thread port for 100 series CPU are added in this SDK.
    - IAR compiler port and gcc/clang port are also supported by these RTOSes.

* IDE support

    - **Nuclei Studio 2024.06** will support this Nuclei N100 SDK via NPK solution just like Nuclei SDK.
    - IAR Workbench support is also done in this SDK, please take a try with it in ``ideprojects/iar`` folder.

* Documentation

    - The documentation is modified based on Nuclei SDK.
    - We have go through the whole documentation and modified it to match Nuclei N100 SDK, maybe some of them are not perfect, please feel free to correct me if you find any mistakes.
