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

Subversion Repositories potato

[/] [potato/] [trunk/] [benchmarks/] [hello/] [main.c] - Blame information for rev 60

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 38 skordal
// The Potato Processor Benchmark Applications
2
// (c) Kristian Klomsten Skordal 2015 <kristian.skordal@wafflemail.net>
3
// Report bugs and issues on <http://opencores.org/project,potato,bugtracker>
4
 
5
#include <stdint.h>
6
#include "../platform.h"
7
 
8
void exception_handler(uint32_t cause, void * epc, void * regbase)
9
{
10
        // Not used in this application
11
}
12
 
13
int main(void)
14
{
15
        const char * hello_string = "Hello world\n\r";
16
        volatile uint32_t * uart = IO_ADDRESS(UART_BASE);
17
 
18
        for(int i = 0; hello_string[i] != 0; ++i)
19
        {
20
                while(uart[UART_STATUS >> 2] & (1 << 3));
21
                uart[UART_TX >> 2] = hello_string[i] & 0x000000ff;
22
        }
23
 
24
        return 0;
25
}
26
 

powered by: WebSVN 2.1.0

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