annotate target-utils/helloapp/main.c @ 12:165040ce4929

terget-utils: command entry implemented
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Wed, 01 May 2013 20:01:41 +0000
parents 40f607bb0a2c
children f0501c4a8790
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
da98dc08f575 loadagent: beginning to lay the foundation
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1 /*
da98dc08f575 loadagent: beginning to lay the foundation
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
2 * FreeCalypso loadagent main() function lives here
da98dc08f575 loadagent: beginning to lay the foundation
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
3 */
da98dc08f575 loadagent: beginning to lay the foundation
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
4
da98dc08f575 loadagent: beginning to lay the foundation
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
5 #include "types.h"
da98dc08f575 loadagent: beginning to lay the foundation
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
6 #include "romvars.h"
da98dc08f575 loadagent: beginning to lay the foundation
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
7
da98dc08f575 loadagent: beginning to lay the foundation
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
8 #include <stdio.h>
da98dc08f575 loadagent: beginning to lay the foundation
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
9
da98dc08f575 loadagent: beginning to lay the foundation
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
10 extern struct boot_rom_vars rom_vars;
da98dc08f575 loadagent: beginning to lay the foundation
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
11
11
40f607bb0a2c target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 5
diff changeset
12 extern char *uart_name;
2
ddda170fa6f4 loadagent.elf compiled and linked, no printf yet
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 1
diff changeset
13
ddda170fa6f4 loadagent.elf compiled and linked, no printf yet
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 1
diff changeset
14 main()
ddda170fa6f4 loadagent.elf compiled and linked, no printf yet
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 1
diff changeset
15 {
ddda170fa6f4 loadagent.elf compiled and linked, no printf yet
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 1
diff changeset
16 uart_select_init();
ddda170fa6f4 loadagent.elf compiled and linked, no printf yet
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 1
diff changeset
17 printf("FreeCalypso loadagent running\n");
ddda170fa6f4 loadagent.elf compiled and linked, no printf yet
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 1
diff changeset
18 printf("Loaded via UART %d (%s) at baud rate #%d\n", rom_vars.uart_id,
ddda170fa6f4 loadagent.elf compiled and linked, no printf yet
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 1
diff changeset
19 uart_name, rom_vars.baud_rate_code);
ddda170fa6f4 loadagent.elf compiled and linked, no printf yet
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 1
diff changeset
20 printf("TCXO clock input autodetected to be %d MHz\n",
ddda170fa6f4 loadagent.elf compiled and linked, no printf yet
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 1
diff changeset
21 rom_vars.clktcxo_13mhz ? 13 : 26);
ddda170fa6f4 loadagent.elf compiled and linked, no printf yet
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 1
diff changeset
22 /* interactive command mode to be implemented */
ddda170fa6f4 loadagent.elf compiled and linked, no printf yet
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 1
diff changeset
23 while (1)
ddda170fa6f4 loadagent.elf compiled and linked, no printf yet
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 1
diff changeset
24 ;
ddda170fa6f4 loadagent.elf compiled and linked, no printf yet
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 1
diff changeset
25 }