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

Subversion Repositories neorv32

[/] [neorv32/] [trunk/] [docs/] [datasheet/] [software.adoc] - Diff between revs 69 and 70

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 69 Rev 70
Line 77... Line 77...
| `neorv32_spi.c`    | `neorv32_spi.h`        | HW driver functions for the **SPI**
| `neorv32_spi.c`    | `neorv32_spi.h`        | HW driver functions for the **SPI**
| `neorv32_trng.c`   | `neorv32_trng.h`       | HW driver functions for the **TRNG**
| `neorv32_trng.c`   | `neorv32_trng.h`       | HW driver functions for the **TRNG**
| `neorv32_twi.c`    | `neorv32_twi.h`        | HW driver functions for the **TWI**
| `neorv32_twi.c`    | `neorv32_twi.h`        | HW driver functions for the **TWI**
| `neorv32_uart.c`   | `neorv32_uart.h`       | HW driver functions for the **UART0** and **UART1**
| `neorv32_uart.c`   | `neorv32_uart.h`       | HW driver functions for the **UART0** and **UART1**
| `neorv32_wdt.c`    | `neorv32_wdt.h`        | HW driver functions for the **WDT**
| `neorv32_wdt.c`    | `neorv32_wdt.h`        | HW driver functions for the **WDT**
 
| `neorv32_xip.c`    | `neorv32_xip.h`        | HW driver functions for the **XIP**
| `neorv32_xirq.c`   | `neorv32_xirq.h`       | HW driver functions for the **XIRQ**
| `neorv32_xirq.c`   | `neorv32_xirq.h`       | HW driver functions for the **XIRQ**
|=======================
|=======================
 
 
.Documentation
.Documentation
[TIP]
[TIP]
Line 199... Line 200...
| _RISCV_PREFIX_    | The toolchain prefix to be used; follows the naming convention "architecture-vendor-output-"
| _RISCV_PREFIX_    | The toolchain prefix to be used; follows the naming convention "architecture-vendor-output-"
| _MARCH_           | The targeted RISC-V architecture/ISA. Only `rv32` is supported by the NEORV32. Enable compiler support of optional CPU extension by adding the according extension letter (e.g. `rv32im` for _M_ CPU extension). See https://stnolting.github.io/neorv32/ug/#_enabling_risc_v_cpu_extensions[User Guide: Enabling RISC-V CPU Extensions] for more information.
| _MARCH_           | The targeted RISC-V architecture/ISA. Only `rv32` is supported by the NEORV32. Enable compiler support of optional CPU extension by adding the according extension letter (e.g. `rv32im` for _M_ CPU extension). See https://stnolting.github.io/neorv32/ug/#_enabling_risc_v_cpu_extensions[User Guide: Enabling RISC-V CPU Extensions] for more information.
| _MABI_            | The default 32-bit integer ABI.
| _MABI_            | The default 32-bit integer ABI.
| _USER_FLAGS_      | Additional flags that will be forwarded to the compiler tools
| _USER_FLAGS_      | Additional flags that will be forwarded to the compiler tools
| _NEORV32_HOME_    | Relative or absolute path to the NEORV32 project home folder. Adapt this if the makefile/project is not in the project's `sw/example folder`.
| _NEORV32_HOME_    | Relative or absolute path to the NEORV32 project home folder. Adapt this if the makefile/project is not in the project's `sw/example folder`.
| _COM_PORT_        | Default serial port for executable upload to bootloader.
 
|=======================
|=======================
 
 
:sectnums:
:sectnums:
==== Default Compiler Flags
==== Default Compiler Flags
 
 
Line 382... Line 382...
The function has exactly one argument (`return_code`) that provides the _return value_ of the application's main function.
The function has exactly one argument (`return_code`) that provides the _return value_ of the application's main function.
For instance, this variable contains _-1_ if the main function returned with `return -1;`. The return value of the
For instance, this variable contains _-1_ if the main function returned with `return -1;`. The return value of the
`__neorv32_crt0_after_main` function is irrelevant as there is no further "software instance" executed afterwards that can check this.
`__neorv32_crt0_after_main` function is irrelevant as there is no further "software instance" executed afterwards that can check this.
However, the on-chip debugger could still evaluate the return value of the after-main handler.
However, the on-chip debugger could still evaluate the return value of the after-main handler.
 
 
A simple `printf` can be used to inform the user when the application main function return
A simple `printf` can be used to inform the user when the application's main function returns
(this example assumes that UART0 has been already properly configured in the actual application):
(this example assumes that UART0 has been already properly configured in the actual application):
 
 
.After-main handler - example
.After-main handler - example
[source,c]
[source,c]
----
----
Line 446... Line 446...
* no parity bit
* no parity bit
* 1 stop bit
* 1 stop bit
* newline on `\r\n` (carriage return, newline)
* newline on `\r\n` (carriage return, newline)
* no transfer protocol / control flow protocol - just the raw byte stuff
* no transfer protocol / control flow protocol - just the raw byte stuff
 
 
 
[IMPORTANT]
 
_Any_ terminal program that can connect to a serial port should work. However, make sure the program
 
can transfer data in _raw_ byte mode without any protocol overhead around it. Some terminal programs struggle with
 
transmitting files larger than 4kB (see https://github.com/stnolting/neorv32/pull/215). Try a different program
 
if uploading a binary does not work (terminal stall).
 
 
The bootloader uses the LSB of the top entity's `gpio_o` output port as high-active status LED (all other
The bootloader uses the LSB of the top entity's `gpio_o` output port as high-active status LED (all other
output pin are set to low level by the bootloader). After reset, this LED will start blinking at ~2Hz and the
output pin are set to low level by the bootloader). After reset, this LED will start blinking at ~2Hz and the
following intro screen should show up in your terminal:
following intro screen should show up in your terminal:
 
 
[source]
[source]

powered by: WebSVN 2.1.0

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