# Porting to Renesas RISC-V MCU - portasmHANDLE\_INTERRUPT

**URL:** <https://forums.freertos.org/t/porting-to-renesas-risc-v-mcu-portasmhandle-interrupt/21680>\
**Category:** Kernel\
**Created:** [October 21, 2024, 5:06pm UTC](https://forums.freertos.org/t/porting-to-renesas-risc-v-mcu-portasmhandle-interrupt/21680 "2024-10-21T17:06:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pole](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/pole/32/5067_2.png) [@Pole](https://forums.freertos.org/u/Pole)\
**Post date:** [October 21, 2024, 5:06pm UTC](https://forums.freertos.org/t/porting-to-renesas-risc-v-mcu-portasmhandle-interrupt/21680/1 "2024-10-21T17:06:11Z")

</div>

Hi everyone, I am working a porting on Renesas RISC-V MCU (R9A02G021). The problems I am encoutering are many, I’ll start by exposing one of them.

The problem is about portasmHANDLE\_INTERRUPT. On the website ([Using FreeRTOS on RISC-V Microcontrollers - FreeRTOS™](https://www.freertos.org/Using-FreeRTOS-on-RISC-V#required-compiler-and-assembler-command-line-options)) it is stated that it _must_ be declared as an assembler macro. It is not clear to me what this routine should do and where shuold I look for it. If I am unable to find it, how should I implement it?  
Also this is stated to be responsible for managing external interrupts. Are the MTIME interrupts considered external? I have a problem regarding the non increasing of the value of xTickCount, but probably that’s for another thread.

---

<div class="post-metadata">

**Author:** ![aggarg](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/aggarg/32/4245_2.png) [@aggarg](https://forums.freertos.org/u/aggarg)\
**Post date:** [October 21, 2024, 5:23pm UTC](https://forums.freertos.org/t/porting-to-renesas-risc-v-mcu-portasmhandle-interrupt/21680/2 "2024-10-21T17:23:49Z")

</div>

> [@Pole](#):
>
> The problem is about portasmHANDLE\_INTERRUPT. On the website ([Using FreeRTOS on RISC-V Microcontrollers - FreeRTOS™](https://www.freertos.org/Using-FreeRTOS-on-RISC-V#required-compiler-and-assembler-command-line-options)) it is stated that it _must_ be declared as an assembler macro. It is not clear to me what this routine should do and where shuold I look for it. If I am unable to find it, how should I implement it?

Apologies for the inconvenience - we need to update our documentation but this macro is no longer needed.

> [@Pole](#):
>
> Are the MTIME interrupts considered external?

We handle MTIME in the port itself - [FreeRTOS-Kernel/portable/GCC/RISC-V/portASM.S at main · FreeRTOS/FreeRTOS-Kernel · GitHub](https://github.com/FreeRTOS/FreeRTOS-Kernel/blob/main/portable/GCC/RISC-V/portASM.S#L353).

You can try to refer one of these demos -

- [FreeRTOS/FreeRTOS/Demo/RISC-V\_RV32\_QEMU\_VIRT\_GCC at main · FreeRTOS/FreeRTOS · GitHub](https://github.com/FreeRTOS/FreeRTOS/tree/main/FreeRTOS/Demo/RISC-V_RV32_QEMU_VIRT_GCC)
- [FreeRTOS/FreeRTOS/Demo/RISC-V\_RV32\_SiFive\_HiFive1-RevB\_IAR at main · FreeRTOS/FreeRTOS · GitHub](https://github.com/FreeRTOS/FreeRTOS/tree/main/FreeRTOS/Demo/RISC-V_RV32_SiFive_HiFive1-RevB_IAR)
