annotate target-utils/pln-ppb-test/main.c @ 996:162d2cf394e2

fc-loadtool help: document new commands for sector lock/unlock
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 03 Dec 2023 23:00:04 +0000
parents d50df222c274
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 /*
984
cec20c461b3a target-utils/pln-ppb-test: skeleton started
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
2 * main() function for our little test program
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 */
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4
985
d50df222c274 pln-ppb-test: set up Calypso MEMIF
Mychaela Falconia <falcon@freecalypso.org>
parents: 984
diff changeset
5 #include "types.h"
d50df222c274 pln-ppb-test: set up Calypso MEMIF
Mychaela Falconia <falcon@freecalypso.org>
parents: 984
diff changeset
6
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 main()
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 {
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 uart_select_init();
984
cec20c461b3a target-utils/pln-ppb-test: skeleton started
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
10 printf("PL-N flash PPB test program running\n");
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 print_boot_rom_info();
985
d50df222c274 pln-ppb-test: set up Calypso MEMIF
Mychaela Falconia <falcon@freecalypso.org>
parents: 984
diff changeset
12 /* Calypso MEMIF setup: support memory on any chip select */
d50df222c274 pln-ppb-test: set up Calypso MEMIF
Mychaela Falconia <falcon@freecalypso.org>
parents: 984
diff changeset
13 *(volatile u16 *)0xfffffb00 = 0x00A4;
d50df222c274 pln-ppb-test: set up Calypso MEMIF
Mychaela Falconia <falcon@freecalypso.org>
parents: 984
diff changeset
14 *(volatile u16 *)0xfffffb02 = 0x00A4;
d50df222c274 pln-ppb-test: set up Calypso MEMIF
Mychaela Falconia <falcon@freecalypso.org>
parents: 984
diff changeset
15 *(volatile u16 *)0xfffffb04 = 0x00A4;
d50df222c274 pln-ppb-test: set up Calypso MEMIF
Mychaela Falconia <falcon@freecalypso.org>
parents: 984
diff changeset
16 *(volatile u16 *)0xfffffb06 = 0x00A4;
d50df222c274 pln-ppb-test: set up Calypso MEMIF
Mychaela Falconia <falcon@freecalypso.org>
parents: 984
diff changeset
17 *(volatile u16 *)0xfffffb0a = 0x00A4;
d50df222c274 pln-ppb-test: set up Calypso MEMIF
Mychaela Falconia <falcon@freecalypso.org>
parents: 984
diff changeset
18 *(volatile u16 *)0xfffef006 = 0x0008;
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 for (;;) {
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 putchar('=');
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 if (command_entry())
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 command_dispatch();
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 }
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 }