diff --git a/applications/freertos/miv-rv32-freertos-demo/src/freertos-source/source/portable/GCC/RISC-V/portASM.S b/applications/freertos/miv-rv32-freertos-demo/src/freertos-source/source/portable/GCC/RISC-V/portASM.S index 0a59b24..c5f3696 100644 --- a/applications/freertos/miv-rv32-freertos-demo/src/freertos-source/source/portable/GCC/RISC-V/portASM.S +++ b/applications/freertos/miv-rv32-freertos-demo/src/freertos-source/source/portable/GCC/RISC-V/portASM.S @@ -129,7 +129,6 @@ definitions. */ .extern uxTimerIncrementsForOneTick /* size_t type so 32-bit on 32-bit core and 64-bits on 64-bit core. */ .extern xISRStackTop .extern portasmHANDLE_INTERRUPT -.extern freeRTOS_trap_jump /*-----------------------------------------------------------*/ @@ -402,7 +401,7 @@ xPortStartFirstTask: /* If there is a clint then interrupts can branch directly to the FreeRTOS trap handler. Otherwise the interrupt controller will need to be configured outside of this file. */ - la t0, freeRTOS_trap_jump + la t0, freertos_risc_v_trap_handler csrw mtvec, t0 #endif /* portasmHAS_CLILNT */ diff --git a/applications/freertos/miv-rv32-freertos-demo/src/platform/miv_rv32_hal/miv_rv32_entry.S b/applications/freertos/miv-rv32-freertos-demo/src/platform/miv_rv32_hal/miv_rv32_entry.S index e89c7f2..2aac384 100644 --- a/applications/freertos/miv-rv32-freertos-demo/src/platform/miv_rv32_hal/miv_rv32_entry.S +++ b/applications/freertos/miv-rv32-freertos-demo/src/platform/miv_rv32_hal/miv_rv32_entry.S @@ -37,7 +37,6 @@ .macro STORE_CONTEXT addi sp, sp, -SP_SHIFT_OFFSET*REGBYTES SREG x1, 0 * REGBYTES(sp) - SREG x1, 0 * REGBYTES(sp) SREG x2, 1 * REGBYTES(sp) SREG x3, 2 * REGBYTES(sp) SREG x4, 3 * REGBYTES(sp) @@ -241,10 +240,6 @@ MSYS_MIE31_trap_entry: .2byte 0 #endif -.global freeRTOS_trap_jump -freeRTOS_trap_jump: - j freertos_risc_v_trap_handler - #endif /* MIV_RV32_V3_0 */ #endif /* MIV_LEGACY_RV32 */ diff --git a/applications/freertos/miv-rv32-freertos-demo/src/platform/miv_rv32_hal/miv_rv32_hal.c b/applications/freertos/miv-rv32-freertos-demo/src/platform/miv_rv32_hal/miv_rv32_hal.c index c54cf2f..a112821 100644 --- a/applications/freertos/miv-rv32-freertos-demo/src/platform/miv_rv32_hal/miv_rv32_hal.c +++ b/applications/freertos/miv-rv32-freertos-demo/src/platform/miv_rv32_hal/miv_rv32_hal.c @@ -172,7 +172,7 @@ uint32_t MRV_systick_config(uint64_t ticks) g_systick_increment++; } - g_systick_cmp_value = g_systick_increment + MTIME; + g_systick_cmp_value = g_systick_increment + MRV_read_mtime(); if (g_systick_increment > 0U) { @@ -192,7 +192,7 @@ void handle_m_timer_interrupt(void) { clear_csr(mie, MIP_MTIP); - uint64_t mtime_at_irq = MTIME; + uint64_t mtime_at_irq = MRV_read_mtime(); #ifndef NDEBUG static volatile uint32_t d_tick = 0u; diff --git a/applications/freertos/miv-rv32-freertos-demo/src/platform/miv_rv32_hal/miv_rv32_hal_version.h b/applications/freertos/miv-rv32-freertos-demo/src/platform/miv_rv32_hal/miv_rv32_hal_version.h index e7aa448..9c28b82 100644 --- a/applications/freertos/miv-rv32-freertos-demo/src/platform/miv_rv32_hal/miv_rv32_hal_version.h +++ b/applications/freertos/miv-rv32-freertos-demo/src/platform/miv_rv32_hal/miv_rv32_hal_version.h @@ -17,8 +17,8 @@ extern "C" { #endif #define MIV_RV32_HAL_VERSION_MAJOR 4 -#define MIV_RV32_HAL_VERSION_MINOR 1 -#define MIV_RV32_HAL_VERSION_PATCH 114 +#define MIV_RV32_HAL_VERSION_MINOR 2 +#define MIV_RV32_HAL_VERSION_PATCH 101 #ifdef __cplusplus }