Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
a48a561fdThis file is pinned to the selected release. Download the original to open it in your design tool.
// Copyright 2023 ETH Zurich and University of Bologna.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
//
// Nicole Narr <narrn@student.ethz.ch>
// Christopher Reinwardt <creinwar@student.ethz.ch>
// Paul Scheffler <paulsc@iis.ee.ethz.ch>
#include "regs/cheshire.h"
#include "dif/clint.h"
#include "dif/uart.h"
#include "params.h"
#include "util.h"
int main(void) {
char str[] = "Hello World!\r\n";
uint32_t rtc_freq = CHS_REGS->rtc_freq.f.ref_freq;
uint64_t reset_freq = clint_get_core_freq(rtc_freq, 2500);
uart_init(&__uart_base_addr__, reset_freq, __BOOT_BAUDRATE);
uart_write_str(&__uart_base_addr__, str, sizeof(str) - 1);
uart_write_flush(&__uart_base_addr__);
return 0;
}