FreeCalypso > hg > freecalypso-sw
annotate target-utils/helloapp/main.c @ 114:17b0511b243c
nuc-fw: continuing lowest-level BSP integration
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Thu, 24 Oct 2013 02:47:14 +0000 |
parents | be293e656a6f |
children | a7b0b426f9ca |
rev | line source |
---|---|
1
da98dc08f575
loadagent: beginning to lay the foundation
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1 #include "types.h" |
da98dc08f575
loadagent: beginning to lay the foundation
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2 #include "romvars.h" |
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 extern struct boot_rom_vars rom_vars; |
da98dc08f575
loadagent: beginning to lay the foundation
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
5 |
11
40f607bb0a2c
target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
5
diff
changeset
|
6 extern char *uart_name; |
2
ddda170fa6f4
loadagent.elf compiled and linked, no printf yet
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
1
diff
changeset
|
7 |
ddda170fa6f4
loadagent.elf compiled and linked, no printf yet
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
1
diff
changeset
|
8 main() |
ddda170fa6f4
loadagent.elf compiled and linked, no printf yet
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
1
diff
changeset
|
9 { |
ddda170fa6f4
loadagent.elf compiled and linked, no printf yet
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
1
diff
changeset
|
10 uart_select_init(); |
20
be293e656a6f
helloapp isn't quite loadagent
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
14
diff
changeset
|
11 printf("Hello-world demo app running\n"); |
2
ddda170fa6f4
loadagent.elf compiled and linked, no printf yet
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
1
diff
changeset
|
12 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
|
13 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
|
14 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
|
15 rom_vars.clktcxo_13mhz ? 13 : 26); |
14
f0501c4a8790
helloapp (proto-loadagent) compiles with r8/r16/r32 implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
11
diff
changeset
|
16 for (;;) { |
f0501c4a8790
helloapp (proto-loadagent) compiles with r8/r16/r32 implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
11
diff
changeset
|
17 putchar('='); |
f0501c4a8790
helloapp (proto-loadagent) compiles with r8/r16/r32 implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
11
diff
changeset
|
18 if (command_entry()) |
f0501c4a8790
helloapp (proto-loadagent) compiles with r8/r16/r32 implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
11
diff
changeset
|
19 command_dispatch(); |
f0501c4a8790
helloapp (proto-loadagent) compiles with r8/r16/r32 implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
11
diff
changeset
|
20 } |
2
ddda170fa6f4
loadagent.elf compiled and linked, no printf yet
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
1
diff
changeset
|
21 } |