Disabled fast interrupt for open source toolchain.
This commit is contained in:
parent
2afc177bc4
commit
b5badc857a
|
@ -348,7 +348,11 @@ handle_reset:
|
|||
csrw 0xbc0, t0
|
||||
|
||||
/* Enable nested and hardware stack */
|
||||
li t0, 0x1f
|
||||
/* li t0, 0x1f */ /* For MRS proprietary GCC compilers */
|
||||
|
||||
/* Enable nested interrupt, disable hardware stack */
|
||||
li t0, 0x1e /* Refer to RISC-V4 PFIC manual */
|
||||
|
||||
csrw 0x804, t0
|
||||
|
||||
/* Enable floating point and interrupt */
|
||||
|
|
|
@ -368,7 +368,11 @@ handle_reset:
|
|||
csrw 0xbc0, t0
|
||||
|
||||
/* Enable nested and hardware stack */
|
||||
li t0, 0x1f
|
||||
/* li t0, 0x1f */ /* For MRS proprietary GCC compilers */
|
||||
|
||||
/* Enable nested interrupt, disable hardware stack */
|
||||
li t0, 0x1e /* Refer to RISC-V4 PFIC manual */
|
||||
|
||||
csrw 0x804, t0
|
||||
|
||||
/* Enable floating point and interrupt */
|
||||
|
|
|
@ -47,6 +47,7 @@ set(TARGET_C_SOURCES
|
|||
"BSP/Peripheral/src/ch32v30x_wwdg.c"
|
||||
"src/ch32v30x_it.c"
|
||||
"src/main.c"
|
||||
"src/syscalls.c"
|
||||
"src/system_ch32v30x.c"
|
||||
)
|
||||
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
*******************************************************************************/
|
||||
#include "ch32v30x_it.h"
|
||||
|
||||
void NMI_Handler(void) __attribute__((interrupt("WCH-Interrupt-fast")));
|
||||
void HardFault_Handler(void) __attribute__((interrupt("WCH-Interrupt-fast")));
|
||||
void NMI_Handler(void) __attribute__((interrupt()));
|
||||
void HardFault_Handler(void) __attribute__((interrupt()));
|
||||
|
||||
/*********************************************************************
|
||||
* @fn NMI_Handler
|
||||
|
|
|
@ -1,6 +1,15 @@
|
|||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include <debug.h>
|
||||
|
||||
int main(void) {
|
||||
|
||||
USART_Printf_Init(115200);
|
||||
|
||||
printf("Hello world?\r\n");
|
||||
|
||||
for(;;) {
|
||||
//
|
||||
}
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
#include <sys/stat.h>
|
||||
|
||||
int _fstat(int file, struct stat *st) {
|
||||
st->st_mode = S_IFCHR;
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue