FreeCalypso > hg > freecalypso-sw
changeset 14:f0501c4a8790
helloapp (proto-loadagent) compiles with r8/r16/r32 implemented
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Fri, 03 May 2013 06:52:36 +0000 |
parents | f4fc449a64ea |
children | d60806c703aa |
files | target-utils/helloapp/Makefile target-utils/helloapp/cmdtab.c target-utils/helloapp/main.c |
diffstat | 3 files changed, 21 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/target-utils/helloapp/Makefile Fri May 03 06:42:03 2013 +0000 +++ b/target-utils/helloapp/Makefile Fri May 03 06:52:36 2013 +0000 @@ -5,8 +5,8 @@ OBJCOPY=arm-elf-objcopy PROG= helloapp -OBJS= crt0.o main.o mygetchar.o -LIBS= ../libprintf/libprintf.a ../libcommon/libcommon.a +OBJS= crt0.o cmdtab.o main.o mygetchar.o +LIBS= ../libcommon/libcommon.a ../libprintf/libprintf.a LDS= ../env/iram.lds TC_LIBS=`${CC} -print-file-name=libc.a` \ @@ -18,7 +18,8 @@ ln -s $< . ${PROG}.elf: ${OBJS} ${LIBS} ${LDS} - ${LD} -N --defsym stack_bottom=0x83FFFC -T ${LDS} -o $@ ${OBJS} ${LIBS}\ + ${LD} -N --defsym stack_bottom=0x83FFFC -T ${LDS} -o $@ ${OBJS} \ + --start-group ${LIBS} --end-group \ --start-group ${TC_LIBS} --end-group ${PROG}.srec: ${PROG}.elf
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/target-utils/helloapp/cmdtab.c Fri May 03 06:52:36 2013 +0000 @@ -0,0 +1,12 @@ +#include "cmdtab.h" + +extern void cmd_r8(); +extern void cmd_r16(); +extern void cmd_r32(); + +struct cmdtab cmdtab[] = { + {"r8", cmd_r8}, + {"r16", cmd_r16}, + {"r32", cmd_r32}, + {0, 0} +};
--- a/target-utils/helloapp/main.c Fri May 03 06:42:03 2013 +0000 +++ b/target-utils/helloapp/main.c Fri May 03 06:52:36 2013 +0000 @@ -5,8 +5,6 @@ #include "types.h" #include "romvars.h" -#include <stdio.h> - extern struct boot_rom_vars rom_vars; extern char *uart_name; @@ -19,7 +17,9 @@ uart_name, rom_vars.baud_rate_code); printf("TCXO clock input autodetected to be %d MHz\n", rom_vars.clktcxo_13mhz ? 13 : 26); - /* interactive command mode to be implemented */ - while (1) - ; + for (;;) { + putchar('='); + if (command_entry()) + command_dispatch(); + } }