FreeCalypso > hg > freecalypso-tools
diff target-utils/calversion/main.c @ 441:1dcc9e4b71fd
target-utils/calversion: program written, compiles
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Wed, 26 Dec 2018 06:40:02 +0000 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/target-utils/calversion/main.c Wed Dec 26 06:40:02 2018 +0000 @@ -0,0 +1,18 @@ +#include "types.h" + +main() +{ + uart_select_init(); + printf("Calypso version ID program running\n"); + print_boot_rom_info(); + printf("Device ID code: 0x%04X\n", *(volatile u16 *)0xFFFEF000); + printf("Device version code: 0x%04X\n", *(volatile u16 *)0xFFFEF002); + printf("ARM ID code: 0x%04X\n", *(volatile u16 *)0xFFFFFE00); + printf("cDSP ID code: 0x%04X\n", *(volatile u16 *)0xFFFFFE02); + dsp_power_on(); + for (;;) { + putchar('='); + if (command_entry()) + command_dispatch(); + } +}