changeset 317:c71e3156170a

frbl/reconst: boot.c passes compilation
author Mychaela Falconia <falcon@freecalypso.org>
date Wed, 04 Mar 2020 23:58:05 +0000
parents 2ceb1f263e19
children 4e1d7ce0ee71
files .hgignore frbl/reconst/Makefile frbl/reconst/boot.c
diffstat 3 files changed, 16 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/.hgignore	Wed Mar 04 23:41:51 2020 +0000
+++ b/.hgignore	Wed Mar 04 23:58:05 2020 +0000
@@ -25,6 +25,9 @@
 ^dspanal/char2coff$
 ^dspanal/patchanal$
 
+^frbl/reconst/[A-Za-z_0-9]*\.disasm$
+^frbl/reconst/[A-Za-z_0-9]*\.obj$
+
 ^leo-obj/.*\.ctypes$
 ^leo-obj/.*\.disasm$
 ^leo-obj/.*\.symtab$
--- a/frbl/reconst/Makefile	Wed Mar 04 23:41:51 2020 +0000
+++ b/frbl/reconst/Makefile	Wed Mar 04 23:58:05 2020 +0000
@@ -1,11 +1,14 @@
 CFLAGS=	-mn -mt -mw -me -pw2
 CPPFLAGS=-DTOOL_CHOICE=0 -D_TMS470 -I. -Iinc
-OBJS=	boot.obj
+OBJS=	boot.disasm
 
 all:	${OBJS}
 
 %.obj:	%.c
 	./cl470 -q -c ${CFLAGS} ${CPPFLAGS} $<
 
+%.disasm:	%.obj
+	tiobjd $< disasm > $@
+
 clean:
-	rm -f *.obj
+	rm -f *.obj *.disasm
--- a/frbl/reconst/boot.c	Wed Mar 04 23:41:51 2020 +0000
+++ b/frbl/reconst/boot.c	Wed Mar 04 23:58:05 2020 +0000
@@ -95,17 +95,17 @@
 
     hardware_init(&chip_id_code);
 
-    uart = UART_MODEM;
+    uart = UART_BASE_MODEM;
     uart_init(0, 0x07); // baudrate = 115200kbps
-    uart = UART_IRDA;
+    uart = UART_BASE_IRDA;
     uart_init(0, 0x07); // baudrate = 115200kbps
 
 #ifdef TESTBOOT
     while (1) {
-        uart = UART_MODEM;
+        uart = UART_BASE_MODEM;
         if ((REGISTER_8_READ(uart + UART_LSR) & STAT_RXRDY))
             break;
-        uart = UART_IRDA;
+        uart = UART_BASE_IRDA;
         if ((REGISTER_8_READ(uart + UART_LSR) & STAT_RXRDY))
             break;
     }
@@ -118,11 +118,11 @@
 #endif
 
     while (1) {
-        uart = UART_MODEM;
+        uart = UART_BASE_MODEM;
         putchar(PROTO_HELLO);
         if ((REGISTER_8_READ(uart + UART_LSR) & STAT_RXRDY))
             break;
-        uart = UART_IRDA;
+        uart = UART_BASE_IRDA;
         putchar(PROTO_HELLO);
         if ((REGISTER_8_READ(uart + UART_LSR) & STAT_RXRDY))
             break;
@@ -211,6 +211,8 @@
   #error Unknown target hardware selected
 #endif
 
+/* FreeCalypso reconstruction: definition missing from TCS211 target.h */
+#define	CHIP_ID_CODE	0xFFFEF000
 
 void hardware_init(uint16 *chip_id_code)
 {