Line 44... |
Line 44... |
|
|
/*
|
/*
|
* Modified for the NEORV32 processor by Stephan Nolting.
|
* Modified for the NEORV32 processor by Stephan Nolting.
|
*/
|
*/
|
|
|
|
/* UART hardware constants. */
|
|
#define BAUD_RATE 19200
|
|
|
#ifdef RUN_FREERTOS_DEMO
|
#ifdef RUN_FREERTOS_DEMO
|
|
|
#include <stdint.h>
|
#include <stdint.h>
|
|
|
/* FreeRTOS kernel includes. */
|
/* FreeRTOS kernel includes. */
|
Line 64... |
Line 67... |
|
|
/* Set mainCREATE_SIMPLE_BLINKY_DEMO_ONLY to one to run the simple blinky demo,
|
/* Set mainCREATE_SIMPLE_BLINKY_DEMO_ONLY to one to run the simple blinky demo,
|
or 0 to run the more comprehensive test and demo application. */
|
or 0 to run the more comprehensive test and demo application. */
|
#define mainCREATE_SIMPLE_BLINKY_DEMO_ONLY 1
|
#define mainCREATE_SIMPLE_BLINKY_DEMO_ONLY 1
|
|
|
/* UART hardware constants. */
|
|
#define BAUD_RATE 19200
|
|
|
|
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
|
|
/*
|
/*
|
* main_blinky() is used when mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 1.
|
* main_blinky() is used when mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 1.
|
* main_full() is used when mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 0.
|
* main_full() is used when mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 0.
|
Line 125... |
Line 125... |
neorv32_cpu_csr_write(CSR_MTVEC, (uint32_t)&freertos_risc_v_trap_handler);
|
neorv32_cpu_csr_write(CSR_MTVEC, (uint32_t)&freertos_risc_v_trap_handler);
|
|
|
// clear GPIO.out port
|
// clear GPIO.out port
|
neorv32_gpio_port_set(0);
|
neorv32_gpio_port_set(0);
|
|
|
// configure UART for default baud rate, no rx interrupt, no tx interrupt
|
// init UART at default baud rate, no parity bits, no rx interrupt, no tx interrupt
|
neorv32_uart_setup(BAUD_RATE, 0, 0);
|
neorv32_uart_setup(BAUD_RATE, 0b00, 0, 0);
|
}
|
}
|
|
|
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
|
|
void vToggleLED( void )
|
void vToggleLED( void )
|
Line 226... |
Line 226... |
#warning FREERTOS DEMO HAS NOT BEEN COMPILED! Use >>make USER_FLAGS+=-DRUN_FREERTOS_DEMO clean_all exe<< to compile it.
|
#warning FREERTOS DEMO HAS NOT BEEN COMPILED! Use >>make USER_FLAGS+=-DRUN_FREERTOS_DEMO clean_all exe<< to compile it.
|
|
|
#include <neorv32.h>
|
#include <neorv32.h>
|
int main() {
|
int main() {
|
|
|
neorv32_uart_setup(19200, 0, 0);
|
// init UART at default baud rate, no parity bits, no rx interrupt, no tx interrupt
|
|
neorv32_uart_setup(BAUD_RATE, 0b00, 0, 0);
|
neorv32_uart_print("ERROR! FreeRTOS has not been compiled. Use >>make USER_FLAGS+=-DRUN_FREERTOS_DEMO clean_all exe<< to compile it.\n");
|
neorv32_uart_print("ERROR! FreeRTOS has not been compiled. Use >>make USER_FLAGS+=-DRUN_FREERTOS_DEMO clean_all exe<< to compile it.\n");
|
return 0;
|
return 0;
|
}
|
}
|
#endif
|
#endif
|
|
|
No newline at end of file
|
No newline at end of file
|