OpenCores
URL https://opencores.org/ocsvn/neorv32/neorv32/trunk

Subversion Repositories neorv32

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /neorv32/trunk/sw/example
    from Rev 32 to Rev 33
    Reverse comparison

Rev 32 → Rev 33

/cpu_test/main.c
485,20 → 485,22
// ----------------------------------------------------------
exception_handler_answer = 0xFFFFFFFF;
neorv32_uart_printf("EXC I_ILLEG: ");
 
cnt_test++;
 
// create test program in RAM
static const uint32_t dummy_sub_program[2] __attribute__((aligned(8))) = {
0xDEAD007F, // undefined 32-bit instruction (invalid opcode) -> illegal instruction exception
0x00008067 // ret (32-bit)
};
asm volatile ("csrrw zero, 0xfff, zero"); // = 0xfff01073 : CSR 0xfff not implemented -> illegal instruction
 
tmp_a = (uint32_t)&dummy_sub_program; // call the dummy sub program
asm volatile ("jalr ra, %[input_i]" : : [input_i] "r" (tmp_a));
 
#if (DETAILED_EXCEPTION_DEBUG==0)
// make sure this has cause an illegal exception
if (exception_handler_answer == TRAP_CODE_I_ILLEGAL) {
test_ok();
// make sure this is really the instruction that caused the exception
// for illegal instructions mtval contains the actual instruction word
if (neorv32_cpu_csr_read(CSR_MTVAL) == 0xfff01073) {
test_ok();
}
else {
test_fail();
}
}
else {
test_fail();
/demo_freeRTOS/makefile
66,6 → 66,38
 
 
# -----------------------------------------------------------------------------
# FreeRTOS
# -----------------------------------------------------------------------------
ifneq (,$(findstring RUN_FREERTOS_DEMO,$(USER_FLAGS)))
# FreeRTOS home folder (adapt this!)
FREERTOS_HOME ?= /mnt/n/Projects/FreeRTOS/FreeRTOS
 
# Application
APP_SRC += blinky_demo/main_blinky.c
 
# FreeRTOS core
APP_SRC += $(wildcard $(FREERTOS_HOME)/Source/*.c)
APP_SRC += $(wildcard $(FREERTOS_HOME)/Source/portable/MemMang/heap_1.c)
 
APP_INC += -I $(FREERTOS_HOME)/Source/include
 
# FreeRTOS RISC-V specific
APP_SRC += $(wildcard $(FREERTOS_HOME)/Source/portable/GCC/RISC-V/*.c)
APP_SRC += $(FREERTOS_HOME)/Source/portable/GCC/RISC-V/portASM.S
 
APP_INC += -I $(FREERTOS_HOME)/Source/portable/GCC/RISC-V
 
# NEORV32 specific
ASM_INC += -DportasmHANDLE_INTERRUPT=SystemIrqHandler
 
APP_INC += -I chip_specific_extensions/neorv32
 
ASM_INC += -I chip_specific_extensions/neorv32
endif
 
 
 
# -----------------------------------------------------------------------------
# NEORV32 framework
# -----------------------------------------------------------------------------
# Path to NEORV32 linker script and startup file

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.