NEORV32 - Software Framework Documentation
Functions | Variables
main.c File Reference

Interactive memory inspector. More...

#include <neorv32.h>
#include <string.h>

Macros

User configuration
#define BAUD_RATE   19200
 

Functions

void read_memory (void)
 
void setup_access (void)
 
void write_memory (void)
 
void dump_memory (void)
 
void hexdump (void)
 
uint32_t hexstr_to_uint (char *buffer, uint8_t length)
 
void aux_print_hex_byte (uint8_t byte)
 
int main ()
 

Variables

char access_size
 

Detailed Description

Interactive memory inspector.

Author
Stephan Nolting

Macro Definition Documentation

◆ BAUD_RATE

#define BAUD_RATE   19200

UART BAUD rate

Function Documentation

◆ aux_print_hex_byte()

void aux_print_hex_byte ( uint8_t  byte)

Print HEX byte.

Parameters
[in]byteByte to be printed as 2-cahr hex value.

◆ dump_memory()

void dump_memory ( void  )

Read several bytes/halfs/word from memory base address

◆ hexdump()

void hexdump ( void  )

Make pretty hexadecimal + ASCII dump (byte-wise)

◆ hexstr_to_uint()

uint32_t hexstr_to_uint ( char *  buffer,
uint8_t  length 
)

Helper function to convert N hex chars string into uint32_T

Parameters
[in,out]bufferPointer to array of chars to convert into number.
[in,out]lengthLength of the conversion string.
Returns
Converted number.

Helper function to convert N hex chars string into uint32_t

Parameters
[in,out]bufferPointer to array of chars to convert into number.
[in,out]lengthLength of the conversion string.
Returns
Converted number.

◆ main()

int main ( void  )

This program provides an interactive console to read/write memory.

Note
This program requires the UART to be synthesized.
Returns
0 if execution was successful

◆ read_memory()

void read_memory ( void  )

Read from memory address

◆ setup_access()

void setup_access ( void  )

Configure memory access size

◆ write_memory()

void write_memory ( void  )

Write to memory address