Line 32... |
Line 32... |
#include <stdio.h>
|
#include <stdio.h>
|
|
|
int main(void)
|
int main(void)
|
{
|
{
|
printf("board: %s (id=%d)\n",board_name(io.board_id),io.board_id);
|
printf("board: %s (id=%d)\n",board_name(io.board_id),io.board_id);
|
printf("build: darkriscv fw build %s\n",BUILD);
|
printf("build: %s for %s\n",BUILD,ARCH);
|
|
|
printf("core0: darkriscv@%d.%dMHz with %s%s%s\n",
|
for(int i=0;i!=threads;i++)
|
|
{
|
|
printf("core0/thread%d: darkriscv@%d.%dMHz rv32%s%s%s\n",
|
|
i,
|
io.board_cm, // board clock MHz
|
io.board_cm, // board clock MHz
|
io.board_ck, // board clock kHz
|
io.board_ck, // board clock kHz
|
ARCH, // architecture
|
check4rv32i()?"i":"e", // architecture
|
threads>1?"+MT":"", // MT support
|
threads>1?"+MT":"", // MT support
|
mac(1000,16,16)==1256?"+MAC":""); // MAC support
|
mac(1000,16,16)==1256?"+MAC":""); // MAC support
|
|
}
|
|
|
threads = 0; // prepare for the next restart
|
threads = 0; // prepare for the next restart
|
|
|
printf("uart0: 115200 bps (div=%d)\n",io.uart.baud);
|
printf("uart0: 115200 bps (div=%d)\n",io.uart.baud);
|
printf("timr0: periodic timer=%dHz (io.timer=%d)\n",(io.board_cm*1000000u+io.board_ck*10000u)/(io.timer+1),io.timer);
|
printf("timr0: frequency=%dHz (io.timer=%d)\n",(io.board_cm*1000000u+io.board_ck*10000u)/(io.timer+1),io.timer);
|
printf("\n");
|
printf("\n");
|
|
|
printf("Welcome to DarkRISCV!\n");
|
printf("Welcome to DarkRISCV!\n");
|
|
|
usleep(10);
|
|
|
|
// main loop
|
// main loop
|
|
|
while(1)
|
while(1)
|
{
|
{
|
char buffer[64];
|
char buffer[64];
|