NEORV32 Software Framework Documentation
The NEORV32 RISC-V Processor
Loading...
Searching...
No Matches
main.c File Reference

Set up the second core to accept, and run, any function pointer pushed into its ICC FIFO. Push in a few pieces of code and get answers back. Shamelessly copied from (BSD-3-Clause license): https://github.com/raspberrypi/pico-examples/tree/master/multicore/multicore_runner. More...

#include <neorv32.h>

Macros

#define BAUD_RATE   19200
 
#define TEST_NUM   11
 

Functions

int core1_entry (void)
 
int32_t factorial (int32_t n)
 
int32_t fibonacci (int32_t n)
 
int main (void)
 

Variables

volatile uint8_t core1_stack [2048]
 

Detailed Description

Set up the second core to accept, and run, any function pointer pushed into its ICC FIFO. Push in a few pieces of code and get answers back. Shamelessly copied from (BSD-3-Clause license): https://github.com/raspberrypi/pico-examples/tree/master/multicore/multicore_runner.

Macro Definition Documentation

◆ BAUD_RATE

#define BAUD_RATE   19200

User configuration

Function Documentation

◆ core1_entry()

int core1_entry ( void )

Main function for core 1 (secondary core).

Returns
Irrelevant (but can be inspected by the debugger).

◆ factorial()

int32_t factorial ( int32_t n)

Compute factorial.

Parameters
[in]nCompute factorial of n.
Returns
Factorial of n.

◆ fibonacci()

int32_t fibonacci ( int32_t n)

Compute n-th Fibonacci number.

Parameters
[in]nCompute factorial of n.
Returns
n-th Fibonacci number.

◆ main()

int main ( void )

Set up the second core to accept, and run, any function pointer pushed into its ICC FIFO. Push in a few pieces of code and get answers back.

Warning
This program requires the dual-core configuration, the CLINT and UART0.
Note
This program was "inspired" by https://github.com/raspberrypi/pico-examples/tree/master. BSD-3-Clause license.
Returns
Irrelevant (but can be inspected by the debugger).

Variable Documentation

◆ core1_stack

volatile uint8_t core1_stack[2048]

Global variables