diff nuc-fw/cfgmagic/post-target @ 113:3b2e941043d8

nuc-fw/bsp: niq32.c compiles
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Sun, 20 Oct 2013 21:12:41 +0000
parents 45911ad957fd
children 1e41550feec5
line wrap: on
line diff
--- a/nuc-fw/cfgmagic/post-target	Sun Oct 20 08:43:41 2013 +0000
+++ b/nuc-fw/cfgmagic/post-target	Sun Oct 20 21:12:41 2013 +0000
@@ -44,11 +44,9 @@
 
 case "$DBB_type" in
 	751992*)
-		# This is the only Calypso variant we currently work with,
-		# and we have no authoritative knowledge of the correct
-		# CHIPSET number - only a current best guess.
 		CHIPSET=10
-		# let's hope for the best
+		# Thanks to the Sotovik find, we now have authoritative
+		# knowledge that this number is correct.
 		;;
 	*)
 		echo "Error: unknown DBB_type=$DBB_type" 1>&2
@@ -77,6 +75,38 @@
 esac
 export_to_c	ANALOG
 
+if [ -z "$RF_type" ]
+then
+	echo "Error: target.$TARGET failed to define RF_type" 1>&2
+	exit 1
+fi
+
+case "$RF_type" in
+	Rita*)
+		RF_FAM=12
+		;;
+	*)
+		echo "Error: unknown RF_type=$RF_type" 1>&2
+		exit 1
+		;;
+esac
+export_to_c	RF_FAM
+
+# !!! Dirty hack !!!
+#
+# All targets which we currently support or have realistic prospects of
+# supporting are derived from TI's D-sample and/or Leonardo reference designs.
+# TI's voodoo BOARD number for D-sample is 41, and Leonardo apparently
+# shared D-sample's number instead of having its own.
+# My initial hope was to keep those BOARD conditionals out of our code,
+# but they are sprinkled so liberally throughout TI's code that it's
+# too much extra work to reshape them into something cleaner.
+# So for now let's export a #define BOARD 41 for all targets
+# and leave it be.
+
+BOARD=41
+export_to_c	BOARD
+
 # Ensure that device_class is set - various feature configurations
 # will certainly depend on it.
 if [ -z "$device_class" ]