diff options
-rw-r--r-- | bsp/env/coreplexip-e31-arty/init.c | 8 | ||||
-rw-r--r-- | software/hello/hello.c | 2 |
2 files changed, 7 insertions, 3 deletions
diff --git a/bsp/env/coreplexip-e31-arty/init.c b/bsp/env/coreplexip-e31-arty/init.c index 05b2b3e..84ae09e 100644 --- a/bsp/env/coreplexip-e31-arty/init.c +++ b/bsp/env/coreplexip-e31-arty/init.c @@ -6,12 +6,16 @@ #include "platform.h" #include "encoding.h" +#define CPU_FREQ 65000000 +#define XSTR(x) #x +#define STR(x) XSTR(x) + extern int main(int argc, char** argv); extern void trap_entry(); static unsigned long get_cpu_freq() { - return 65000000; + return CPU_FREQ; } unsigned long get_timer_freq() @@ -83,7 +87,7 @@ void _init() #ifndef NO_INIT uart_init(115200); - printf("core freq at %d Hz\n", get_cpu_freq()); + puts("core freq at " STR(CPU_FREQ) " Hz\n"); write_csr(mtvec, &trap_entry); #endif diff --git a/software/hello/hello.c b/software/hello/hello.c index 85c5d87..befc6ee 100644 --- a/software/hello/hello.c +++ b/software/hello/hello.c @@ -2,7 +2,7 @@ int main() { - printf("hello world!\n"); + puts("hello world!\n"); return 0; } |