Skip to content
Snippets Groups Projects
Commit 6fff52dc authored by cnlohr's avatar cnlohr
Browse files

* Only add arch option if GCC > version 9.

 * Allow for older __riscv__ predefine'd checks.
parent 129ef75a
No related branches found
No related tags found
No related merge requests found
...@@ -764,8 +764,10 @@ void handle_reset() ...@@ -764,8 +764,10 @@ void handle_reset()
.option norelax\n\ .option norelax\n\
la gp, __global_pointer$\n\ la gp, __global_pointer$\n\
.option pop\n\ .option pop\n\
la sp, _eusrstack\n\ la sp, _eusrstack\n"
.option arch, +zicsr\n" #if __GNUC__ > 9
".option arch, +zicsr\n"
#endif
// Setup the interrupt vector, processor status and INTSYSCR. // Setup the interrupt vector, processor status and INTSYSCR.
" li a0, 0x80\n\ " li a0, 0x80\n\
csrw mstatus, a0\n\ csrw mstatus, a0\n\
......
...@@ -4822,7 +4822,7 @@ extern "C" { ...@@ -4822,7 +4822,7 @@ extern "C" {
#define DELAY_US_TIME (SYSTEM_CORE_CLOCK / 8000000) #define DELAY_US_TIME (SYSTEM_CORE_CLOCK / 8000000)
#define DELAY_MS_TIME (SYSTEM_CORE_CLOCK / 8000) #define DELAY_MS_TIME (SYSTEM_CORE_CLOCK / 8000)
#if defined(__riscv) #if defined(__riscv) || defined(__riscv__)
void handle_reset() __attribute__((naked)) __attribute((section(".text.handle_reset"))) __attribute__((used)); void handle_reset() __attribute__((naked)) __attribute((section(".text.handle_reset"))) __attribute__((used));
void DefaultIRQHandler( void ) __attribute__((section(".text.vector_handler"))) __attribute__((naked)) __attribute__((used)); void DefaultIRQHandler( void ) __attribute__((section(".text.vector_handler"))) __attribute__((naked)) __attribute__((used));
#endif #endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment