risc-v support all irq handler

This commit is contained in:
acevest
2019-10-16 18:10:03 +08:00
parent 7983b07386
commit f41e287c2a
15 changed files with 126 additions and 37 deletions

View File

@@ -46,7 +46,8 @@ ARCH_SRC = \
C_SOURCES += $(ARCH_SRC)
HAL_DRIVER_SRC = \
$(TOP_DIR)/board/QEMU_Spike/Src/main.c
$(TOP_DIR)/board/QEMU_Spike/Src/main.c \
$(TOP_DIR)/board/QEMU_Spike/Src/gd32vf103_it.c
C_SOURCES += $(HAL_DRIVER_SRC)
# ASM sources
@@ -54,6 +55,7 @@ ASM_SOURCES =
ASM_SOURCES_S = \
$(TOP_DIR)/arch/risc-v/rv32i/gcc/port_s.S \
$(TOP_DIR)/arch/risc-v/spike/gcc/riscv_port_s.S \
start.S

View File

@@ -0,0 +1,9 @@
#include "tos.h"
void SysTick_IRQHandler() {
port_systick_config((uint32_t)k_cpu_cycle_per_tick);
if (tos_knl_is_running()) {
tos_knl_irq_enter();
tos_tick_handler();
tos_knl_irq_leave();
}
}

View File

@@ -137,11 +137,11 @@
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/demo/TOS-CONFIG}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/demo/TencentOS_tiny/arch/risc-v/rv32i}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/demo/TencentOS_tiny/arch/risc-v/spike}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/demo/TencentOS_tiny/kernel/evtdrv/include}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/demo/TencentOS_tiny/arch/risc-v/rv32i/gcc/}&quot;"/>
</option>

View File

@@ -57,12 +57,12 @@
<link>
<name>TencentOS_tiny/arch/risc-v/common</name>
<type>2</type>
<locationURI>TOP_DIR/arch/risc-v/common</locationURI>
<locationURI>$%7BPARENT-4-PROJECT_LOC%7D/arch/risc-v/common</locationURI>
</link>
<link>
<name>TencentOS_tiny/arch/risc-v/rv32i</name>
<type>2</type>
<locationURI>TOP_DIR/arch/risc-v/rv32i/gcc</locationURI>
<locationURI>$%7BPARENT-4-PROJECT_LOC%7D/arch/risc-v/rv32i</locationURI>
</link>
<link>
<name>TencentOS_tiny/arch/risc-v/spike</name>

View File

@@ -11,7 +11,7 @@
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="1303215729854698371" id="ilg.gnumcueclipse.managedbuild.cross.riscv.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT RISC-V Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="1292200280605858179" id="ilg.gnumcueclipse.managedbuild.cross.riscv.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT RISC-V Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>