Добавлена поддержка FreeRTOS #16
@ -112,11 +112,9 @@ SystemInit:
|
||||
.section .trap_text, "ax"
|
||||
// .org should be consistent with
|
||||
// default mtvec value (set in scr1_arch_description.svh)
|
||||
//.org 0xC0
|
||||
//.org 0xC0 //j raw_trap_handler
|
||||
trap_entry:
|
||||
// j raw_trap_handler
|
||||
la t0, freertos_risc_v_trap_handler
|
||||
jalr t0
|
||||
j freertos_risc_v_trap_handler
|
||||
|
||||
raw_trap_handler:
|
||||
// Save registers
|
||||
|
||||
@ -47,8 +47,8 @@ extern "C" {
|
||||
/* Set the stack depth type to be uint16_t, otherwise it defaults to StackType_t */
|
||||
#define configSTACK_DEPTH_TYPE uint16_t
|
||||
|
||||
#define configMINIMAL_STACK_SIZE 192
|
||||
#define configISR_STACK_SIZE_WORDS 128 // todo сколько надо?
|
||||
#define configMINIMAL_STACK_SIZE 256
|
||||
// #define configISR_STACK_SIZE_WORDS 128 // todo сколько надо?
|
||||
#define configCHECK_FOR_STACK_OVERFLOW 1
|
||||
#define configUSE_TRACE_FACILITY 0
|
||||
|
||||
|
||||
@ -116,7 +116,7 @@ definitions. */
|
||||
add t2, a3, t1 /* Add overflow to high word of ullNextTime. */
|
||||
sw a4, 0(a1) /* Store new low word of ullNextTime. */
|
||||
sw t2, 4(a1) /* Store new high word of ullNextTime. */
|
||||
|
||||
|
||||
#endif /* __riscv_xlen == 32 */
|
||||
|
||||
#if( __riscv_xlen == 64 )
|
||||
@ -326,7 +326,7 @@ exit_without_context_switch:
|
||||
portcontextRESTORE_CONTEXT
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
.section .text.freertos_risc_v_trap_handler
|
||||
.section .ram_text
|
||||
.align 8
|
||||
freertos_risc_v_trap_handler:
|
||||
portcontextSAVE_CONTEXT_INTERNAL
|
||||
@ -357,6 +357,7 @@ handle_interrupt:
|
||||
bne a0, t1, application_interrupt_handler
|
||||
|
||||
portUPDATE_MTIMER_COMPARE_REGISTER
|
||||
call toggleTestPin
|
||||
call xTaskIncrementTick
|
||||
beqz a0, processed_source /* Don't switch context if incrementing tick didn't unblock a task. */
|
||||
call vTaskSwitchContext
|
||||
|
||||
Loading…
Reference in New Issue
Block a user