changeset 68:838717193e09

eliminated the use of bootloader.lib binary blob
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 01 Oct 2016 21:54:10 +0000
parents 41779e8ae4da
children 50a15a54801e
files components/bootloader configs/classic scripts/mk-component.sh src/cs/system/bootloader/src/boot.c src/cs/system/bootloader/src/cmdboot.c src/cs/system/bootloader/src/command.c src/cs/system/bootloader/src/convert.c src/cs/system/bootloader/src/optboot.c src/cs/system/bootloader/src/serial.c src/cs/system/bootloader/src/start.c
diffstat 10 files changed, 112 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/bootloader	Sat Oct 01 21:54:10 2016 +0000
@@ -0,0 +1,76 @@
+# Building bootloader.lib
+
+SRCDIR=$SRC/cs/system/bootloader/src
+
+# Assembly modules
+
+ASMFLAGS=-me
+ASMFLAGS="$ASMFLAGS -dBOARD=41"
+ASMFLAGS="$ASMFLAGS -dCHIPSET=10"
+ASMFLAGS="$ASMFLAGS -dLONG_JUMP=3"
+ASMFLAGS="$ASMFLAGS -dTOOL_CHOICE=0"
+ASMFLAGS="$ASMFLAGS -dR2D_ASM=0"
+ASMFLAGS="$ASMFLAGS -dR2D_LCD_TEST=0"
+ASMFLAGS="$ASMFLAGS -dTI_PROFILER=0"
+ASMFLAGS="$ASMFLAGS -dTI_NUC_MONITOR=0"
+ASMFLAGS="$ASMFLAGS -dL1_GPRS=$GPRS"
+ASMFLAGS="$ASMFLAGS -dOP_WCP=0"
+ASMFLAGS="$ASMFLAGS -dWCP_PROF=0"
+
+asm_file $SRCDIR/bootloader.s
+
+ASMFLAGS="-mt -me"
+ASMFLAGS="$ASMFLAGS -dBOARD=41"
+ASMFLAGS="$ASMFLAGS -dCHIPSET=10"
+ASMFLAGS="$ASMFLAGS -dLONG_JUMP=3"
+ASMFLAGS="$ASMFLAGS -dTOOL_CHOICE=0"
+ASMFLAGS="$ASMFLAGS -dR2D_ASM=0"
+ASMFLAGS="$ASMFLAGS -dR2D_LCD_TEST=0"
+ASMFLAGS="$ASMFLAGS -dTI_PROFILER=0"
+ASMFLAGS="$ASMFLAGS -dTI_NUC_MONITOR=0"
+ASMFLAGS="$ASMFLAGS -dL1_GPRS=$GPRS"
+ASMFLAGS="$ASMFLAGS -dOP_WCP=0"
+ASMFLAGS="$ASMFLAGS -dWCP_PROF=0"
+
+asm_file $SRCDIR/branch_in_RAM.s
+
+# C modules
+
+CFLAGS="-mn -mt -mw -me -pw2"
+CPPFLAGS="-DTOOL_CHOICE=0 -D_TMS470"
+
+# Includes
+
+CPPFLAGS="$CPPFLAGS -I$SRC/cs/os/nucleus"
+CPPFLAGS="$CPPFLAGS -I.."
+CPPFLAGS="$CPPFLAGS -I../config"
+CPPFLAGS="$CPPFLAGS -I$SRC/$GPF/inc"
+CPPFLAGS="$CPPFLAGS -I$SRC/$GPF/frame/cust_os"
+CPPFLAGS="$CPPFLAGS -I$SRC/cs/system"
+CPPFLAGS="$CPPFLAGS -I$SRC/cs/riviera"
+CPPFLAGS="$CPPFLAGS -I$SRC/cs/riviera/rv"
+CPPFLAGS="$CPPFLAGS -I$SRC/cs/drivers/drv_core"
+CPPFLAGS="$CPPFLAGS -I$SRC/cs/drivers/drv_core/abb"
+CPPFLAGS="$CPPFLAGS -I$SRC/cs/drivers/drv_core/armio"
+CPPFLAGS="$CPPFLAGS -I$SRC/cs/drivers/drv_core/clkm"
+CPPFLAGS="$CPPFLAGS -I$SRC/cs/drivers/drv_core/conf"
+CPPFLAGS="$CPPFLAGS -I$SRC/cs/drivers/drv_core/dma"
+CPPFLAGS="$CPPFLAGS -I$SRC/cs/drivers/drv_core/dsp_dwnld"
+CPPFLAGS="$CPPFLAGS -I$SRC/cs/drivers/drv_core/inth"
+CPPFLAGS="$CPPFLAGS -I$SRC/cs/drivers/drv_core/memif"
+CPPFLAGS="$CPPFLAGS -I$SRC/cs/drivers/drv_core/rhea"
+CPPFLAGS="$CPPFLAGS -I$SRC/cs/drivers/drv_core/security"
+CPPFLAGS="$CPPFLAGS -I$SRC/cs/drivers/drv_core/spi"
+CPPFLAGS="$CPPFLAGS -I$SRC/cs/drivers/drv_core/timer"
+CPPFLAGS="$CPPFLAGS -I$SRC/cs/drivers/drv_core/uart"
+CPPFLAGS="$CPPFLAGS -I$SRC/cs/drivers/drv_core/ulpd"
+CPPFLAGS="$CPPFLAGS -I$SRC/cs/drivers/drv_app"
+CPPFLAGS="$CPPFLAGS -I$SRC/cs/services"
+
+cfile_plain $SRCDIR/cmdboot.c
+cfile_plain $SRCDIR/command.c
+cfile_plain $SRCDIR/convert.c
+cfile_plain $SRCDIR/optboot.c
+cfile_plain $SRCDIR/serial.c
+cfile_plain $SRCDIR/start.c
+cfile_plain $SRCDIR/boot.c
--- a/configs/classic	Sat Oct 01 20:10:35 2016 +0000
+++ b/configs/classic	Sat Oct 01 21:54:10 2016 +0000
@@ -120,7 +120,7 @@
 
 # eyesores
 blob_lib_custom "$MAIN_blob" main
-blob_lib_std bootloader
+build_lib bootloader
 lib_link_magic '(CONST_BOOT_LIB (.const, .text, .text:v$3) BSS_BOOT_LIB (.bss))'
 
 # Nucleus and TI's compiler stuff
--- a/scripts/mk-component.sh	Sat Oct 01 20:10:35 2016 +0000
+++ b/scripts/mk-component.sh	Sat Oct 01 21:54:10 2016 +0000
@@ -49,6 +49,20 @@
 	echo >> $BUILD_DIR/$LIBNAME/Makefile
 }
 
+asm_file() {
+	if [ $# != 1 ]
+	then
+		echo "Error: asm_file takes 1 argument" 1>&2
+		exit 1
+	fi
+	objname=`basename "$1" .s`.obj
+	helpers/makeline dep $objname "$1" >> $BUILD_DIR/$LIBNAME/Makefile
+	helpers/makeline cmd ../../toolwrap/asm470 ${ASMFLAGS} "$1" '$@' \
+		>> $BUILD_DIR/$LIBNAME/Makefile
+	echo >> $BUILD_DIR/$LIBNAME/Makefile
+	OBJS="$OBJS $objname"
+}
+
 cfile_plain() {
 	if [ $# != 1 ]
 	then
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/cs/system/bootloader/src/boot.c	Sat Oct 01 21:54:10 2016 +0000
@@ -0,0 +1,1 @@
+/* dummy C source file */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/cs/system/bootloader/src/cmdboot.c	Sat Oct 01 21:54:10 2016 +0000
@@ -0,0 +1,1 @@
+/* dummy C source file */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/cs/system/bootloader/src/command.c	Sat Oct 01 21:54:10 2016 +0000
@@ -0,0 +1,1 @@
+/* dummy C source file */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/cs/system/bootloader/src/convert.c	Sat Oct 01 21:54:10 2016 +0000
@@ -0,0 +1,1 @@
+/* dummy C source file */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/cs/system/bootloader/src/optboot.c	Sat Oct 01 21:54:10 2016 +0000
@@ -0,0 +1,1 @@
+/* dummy C source file */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/cs/system/bootloader/src/serial.c	Sat Oct 01 21:54:10 2016 +0000
@@ -0,0 +1,1 @@
+/* dummy C source file */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/cs/system/bootloader/src/start.c	Sat Oct 01 21:54:10 2016 +0000
@@ -0,0 +1,15 @@
+void sta_dummy_function_0(void)
+{
+}
+
+void sta_dummy_function_1(void)
+{
+}
+
+void sta_dummy_function_2(void)
+{
+}
+
+void sta_select_application(void)
+{
+}