X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;ds=sidebyside;f=FreeRTOS%2FSource%2Fportable%2FGCC%2FRISC-V%2FportASM.S;h=a5756f9786b53fb50e92f7202ca8938c49395cf4;hb=4d43ef5e51fc562356703c2dd75ab27139e431ce;hp=a28942a09fa6775496236b9d8630cdd2c9aa72eb;hpb=2de47fb440de73fd1eaa865eee82ca4d60df1619;p=freertos diff --git a/FreeRTOS/Source/portable/GCC/RISC-V/portASM.S b/FreeRTOS/Source/portable/GCC/RISC-V/portASM.S index a28942a09..a5756f978 100644 --- a/FreeRTOS/Source/portable/GCC/RISC-V/portASM.S +++ b/FreeRTOS/Source/portable/GCC/RISC-V/portASM.S @@ -71,8 +71,17 @@ /* Check the freertos_risc_v_chip_specific_extensions.h and/or command line definitions. */ -#ifndef portasmHAS_CLINT - #error freertos_risc_v_chip_specific_extensions.h must define portasmHAS_CLINT to either 1 (CLINT present) or 0 (clint not present). +#if defined( portasmHAS_CLINT ) && defined( portasmHAS_MTIME ) + #error The portasmHAS_CLINT constant has been depracted. Please replace it with portasmHAS_CLINT. portasmHAS_CLINT and portasmHAS_MTIME cannot both be defined at once. +#endif + +#ifdef portasmHAS_CLINT + #warning The portasmHAS_CLINT constant has been depracted. Please replace it with portasmHAS_CLINT. For now portasmHAS_MTIME is derived from portasmHAS_CLINT. + #define portasmHAS_MTIME portasmHAS_CLINT +#endif + +#ifndef portasmHAS_MTIME + #error freertos_risc_v_chip_specific_extensions.h must define portasmHAS_MTIME to either 1 (MTIME clock present) or 0 (MTIME clock not present). #endif #ifndef portasmHANDLE_INTERRUPT @@ -153,7 +162,7 @@ test_if_asynchronous: handle_asynchronous: -#if( portasmHAS_CLINT != 0 ) +#if( portasmHAS_MTIME != 0 ) test_if_mtimer: /* If there is a CLINT then the mtimer is used to generate the tick interrupt. */ @@ -205,7 +214,7 @@ handle_asynchronous: addi t1, t1, 4 /* 0x80000007 + 4 = 0x8000000b == Machine external interrupt. */ bne a0, t1, as_yet_unhandled /* Something as yet unhandled. */ -#endif /* portasmHAS_CLINT */ +#endif /* portasmHAS_MTIME */ load_x sp, xISRStackTop /* Switch to ISR stack before function call. */ jal portasmHANDLE_INTERRUPT /* Jump to the interrupt handler if there is no CLINT or if there is a CLINT and it has been determined that an external interrupt is pending. */ @@ -284,7 +293,7 @@ processed_source: .func xPortStartFirstTask: -#if( portasmHAS_CLINT != 0 ) +#if( portasmHAS_MTIME != 0 ) /* 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. */