mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-10-15 09:17:44 -04:00
Install FreeRTOS trap handler (#1087)
Install FreeRTOS trap handler The application is supposed to program mtvec correctly depending on whether they want to use vectored interrupt or not. Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
This commit is contained in:
parent
3a2f6646f0
commit
99f5b80ae4
1 changed files with 8 additions and 2 deletions
|
@ -95,6 +95,9 @@ void vApplicationIdleHook( void );
|
||||||
void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName );
|
void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName );
|
||||||
void vApplicationTickHook( void );
|
void vApplicationTickHook( void );
|
||||||
|
|
||||||
|
/* Trap handler implemented in the portASM.S file. */
|
||||||
|
extern void freertos_risc_v_trap_handler( void );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Very simply polling write to the UART. The full demo only writes single
|
* Very simply polling write to the UART. The full demo only writes single
|
||||||
* characters at a time so as not to disrupt the timing of the test and demo
|
* characters at a time so as not to disrupt the timing of the test and demo
|
||||||
|
@ -106,6 +109,9 @@ void vSendString( const char * pcString );
|
||||||
|
|
||||||
int main( void )
|
int main( void )
|
||||||
{
|
{
|
||||||
|
/* Program mtvec with the FreeRTOS trap handler. */
|
||||||
|
__asm__ volatile( "csrw mtvec, %0" :: "r"( freertos_risc_v_trap_handler ) );
|
||||||
|
|
||||||
vSendString( "Starting" );
|
vSendString( "Starting" );
|
||||||
|
|
||||||
/* The mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting is described at the top
|
/* The mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting is described at the top
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue