changeset 317:06ee56829697

GPF: frame.c compiles
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Fri, 11 Apr 2014 05:37:27 +0000
parents 79080922d8e4
children 0c87c1f9dac5
files gsm-fw/gpf/frame/frame.c gsm-fw/gpf/frame/iram/Makefile gsm-fw/gpf/frame/xip/Makefile gsm-fw/gpf/inc/alert.h gsm-fw/gpf/inc/drvconf.h gsm-fw/gpf/inc/frm_glob.h gsm-fw/gpf/inc/frm_types.h gsm-fw/gpf/inc/glob_defs.h gsm-fw/gpf/inc/gpfconf.h gsm-fw/gpf/inc/gsi.h gsm-fw/gpf/inc/ipcapi.h gsm-fw/gpf/inc/os.h gsm-fw/gpf/inc/os_const.h gsm-fw/gpf/inc/os_types.h gsm-fw/gpf/inc/tstheader.h gsm-fw/gpf/inc/vsi.h
diffstat 16 files changed, 80 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/gsm-fw/gpf/frame/frame.c	Thu Apr 10 04:06:05 2014 +0000
+++ b/gsm-fw/gpf/frame/frame.c	Fri Apr 11 05:37:27 2014 +0000
@@ -25,9 +25,11 @@
 /*==== INCLUDES ===================================================*/
 
 #include <stdarg.h>
+#include <string.h>
+#include <stdio.h>
+
+#include "gpfconf.h"
 #include "typedefs.h"
-#include "string.h"
-#include "stdio.h"
 
 #include "glob_defs.h"
 #include "os.h"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gsm-fw/gpf/frame/iram/Makefile	Fri Apr 11 05:37:27 2014 +0000
@@ -0,0 +1,11 @@
+CC=	arm-elf-gcc
+CFLAGS=	-O2 -fno-builtin -mthumb-interwork
+CPPFLAGS=-I../../inc -DRUN_INT_RAM
+VPATH=	..
+
+OBJS=	frame.o
+
+all:	${OBJS}
+
+clean:
+	rm -f *.[oa] *errs
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gsm-fw/gpf/frame/xip/Makefile	Fri Apr 11 05:37:27 2014 +0000
@@ -0,0 +1,11 @@
+CC=	arm-elf-gcc
+CFLAGS=	-O2 -fno-builtin -mthumb-interwork -mthumb
+CPPFLAGS=-I../../inc -DRUN_FLASH
+VPATH=	..
+
+OBJS=	frame.o
+
+all:	${OBJS}
+
+clean:
+	rm -f *.[oa] *errs
--- a/gsm-fw/gpf/inc/alert.h	Thu Apr 10 04:06:05 2014 +0000
+++ b/gsm-fw/gpf/inc/alert.h	Fri Apr 11 05:37:27 2014 +0000
@@ -20,6 +20,8 @@
 #ifndef ALERT_H
 #define ALERT_H
 
+#include "gpfconf.h"
+
 #undef ALERT
 #undef E_ALERT
 
--- a/gsm-fw/gpf/inc/drvconf.h	Thu Apr 10 04:06:05 2014 +0000
+++ b/gsm-fw/gpf/inc/drvconf.h	Fri Apr 11 05:37:27 2014 +0000
@@ -22,6 +22,7 @@
 
 /*==== INCLUDES =============================================================*/
 #include "typedefs.h"
+#include "gpfconf.h"
 #include "gdi.h"
 #include "vsi.h"
 
--- a/gsm-fw/gpf/inc/frm_glob.h	Thu Apr 10 04:06:05 2014 +0000
+++ b/gsm-fw/gpf/inc/frm_glob.h	Fri Apr 11 05:37:27 2014 +0000
@@ -22,6 +22,7 @@
 
 /*==== INCLUDES =============================================================*/
 
+#include "gpfconf.h"
 #include "frm_types.h"
 
 /*==== CONSTANTS ============================================================*/
--- a/gsm-fw/gpf/inc/frm_types.h	Thu Apr 10 04:06:05 2014 +0000
+++ b/gsm-fw/gpf/inc/frm_types.h	Fri Apr 11 05:37:27 2014 +0000
@@ -22,6 +22,7 @@
 
 /*==== INCLUDES =============================================================*/
 
+#include "gpfconf.h"
 #include "pei.h"
 #include "gdi.h"
 
--- a/gsm-fw/gpf/inc/glob_defs.h	Thu Apr 10 04:06:05 2014 +0000
+++ b/gsm-fw/gpf/inc/glob_defs.h	Fri Apr 11 05:37:27 2014 +0000
@@ -20,6 +20,8 @@
 #ifndef GLOB_DEFS_H
 #define GLOB_DEFS_H
 
+#include "gpfconf.h"
+
 #define GUARD_PATTERN        0xAFFEDEAD
 
 #ifdef _ESF_SUPPORT_
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gsm-fw/gpf/inc/gpfconf.h	Fri Apr 11 05:37:27 2014 +0000
@@ -0,0 +1,38 @@
+/*
+ * This header file is a FreeCalypso addition; ditto for the
+ * #include "gpfconf.h" lines which had to be added near the beginning
+ * of just about every original GPF header file.
+ *
+ * In their original form, GPF sources and headers required all of the
+ * library compile-time configuration settings (i.e., those config
+ * settings which affect the library build, rather than stuff set in
+ * the separately-linked configuration module) to be given as -D arguments
+ * on the compilation command line.  It would have been fine if these
+ * -D definitions were needed only for the build of GPF libs themselves,
+ * but the #ifdef logic in the header files means that these -D defs
+ * were also needed for every user of these GPF headers as well!
+ *
+ * This bizarre quirk of the GPF headers is fully consistent with TI's
+ * general approach of supplying an insanely long list of -I's and -D's
+ * on the cl470 compilation command line for every single module,
+ * first through BuSyB-generated makefiles, then later through SBuild
+ * voodoo.  Needless to say, we wish no part of that lunacy in FreeCalypso.
+ *
+ * Because of the nature of the preprocessor definitions needed for GPF
+ * (some are totally fixed, others may be tweaked for debugging, but
+ * none are of the target/feature-dependent sort), I decided to create
+ * this gpfconf.h header file instead of adding this junk to the
+ * config.h mechanism.
+ */
+
+/* the following two are needed unquestionably */
+#define	_TARGET_	1
+#define	_NUCLEUS_	1
+
+/*
+ * GPF build configuration settings like debug and memory supervision
+ * are selected here.  For now I'm setting the "official" configuration
+ * to match that of the GPF libs in the Leonardo semi-src, the one that
+ * runs on the GTA02 modem as leo2moko production-quality firmware.
+ */
+#define	NU_DEBUG	1
--- a/gsm-fw/gpf/inc/gsi.h	Thu Apr 10 04:06:05 2014 +0000
+++ b/gsm-fw/gpf/inc/gsi.h	Fri Apr 11 05:37:27 2014 +0000
@@ -24,7 +24,8 @@
 
 /*==== INCLUDES =============================================================*/
 
-#include <gdi.h>
+#include "gpfconf.h"
+#include "gdi.h"
 
 /*==== DEFINITIONS ==========================================================*/
 
--- a/gsm-fw/gpf/inc/ipcapi.h	Thu Apr 10 04:06:05 2014 +0000
+++ b/gsm-fw/gpf/inc/ipcapi.h	Fri Apr 11 05:37:27 2014 +0000
@@ -23,7 +23,7 @@
 #include "cms.h"
 
 #undef EXPORT
-#include <typedefs.h>
+#include "typedefs.h"
 
 /* define extra function codes for driver ipc */
 #define IPC_SELF        10
--- a/gsm-fw/gpf/inc/os.h	Thu Apr 10 04:06:05 2014 +0000
+++ b/gsm-fw/gpf/inc/os.h	Fri Apr 11 05:37:27 2014 +0000
@@ -20,6 +20,7 @@
 #ifndef __OS_H__
 #define __OS_H__
 
+#include "gpfconf.h"
 #include "os_const.h"
 
 /*==== CONSTANTS ===================================================*/
--- a/gsm-fw/gpf/inc/os_const.h	Thu Apr 10 04:06:05 2014 +0000
+++ b/gsm-fw/gpf/inc/os_const.h	Fri Apr 11 05:37:27 2014 +0000
@@ -22,6 +22,7 @@
 
 /*==== INCLUDES =============================================================*/
 
+#include "gpfconf.h"
 
 /*==== CONSTS ===============================================================*/
 
--- a/gsm-fw/gpf/inc/os_types.h	Thu Apr 10 04:06:05 2014 +0000
+++ b/gsm-fw/gpf/inc/os_types.h	Fri Apr 11 05:37:27 2014 +0000
@@ -22,7 +22,8 @@
 
 /*==== INCLUDES =============================================================*/
 
-#include "nucleus.h"
+#include "gpfconf.h"
+#include "../../nucleus/nucleus.h"
 #include "os.h"
 #include "glob_defs.h"
 
--- a/gsm-fw/gpf/inc/tstheader.h	Thu Apr 10 04:06:05 2014 +0000
+++ b/gsm-fw/gpf/inc/tstheader.h	Fri Apr 11 05:37:27 2014 +0000
@@ -22,6 +22,7 @@
 
 /*==== INCLUDES =============================================================*/
 
+#include "gpfconf.h"
 #include "tools.h" 
 
 /*==== CONSTS ===============================================================*/
--- a/gsm-fw/gpf/inc/vsi.h	Thu Apr 10 04:06:05 2014 +0000
+++ b/gsm-fw/gpf/inc/vsi.h	Fri Apr 11 05:37:27 2014 +0000
@@ -23,6 +23,7 @@
 /*==== INCLUDES =============================================================*/
 
 #include <stddef.h>
+#include "gpfconf.h"
 #include "header.h"
 #include "gdi.h"
 #include "drvconf.h"