summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac2
-rw-r--r--src/Makefile25
-rw-r--r--src/Makefile.proto380
-rw-r--r--src/ao_adc_fake.c27
-rw-r--r--src/ao_main.c43
-rw-r--r--src/cc1111/Makefile.cc111127
-rw-r--r--src/cc1111/_bp.c (renamed from src/_bp.c)0
-rw-r--r--src/cc1111/ao_adc.c (renamed from src/ao_adc.c)0
-rw-r--r--src/cc1111/ao_beep.c (renamed from src/ao_beep.c)0
-rw-r--r--src/cc1111/ao_dbg.c (renamed from src/ao_dbg.c)0
-rw-r--r--src/cc1111/ao_dma.c (renamed from src/ao_dma.c)0
-rw-r--r--src/cc1111/ao_ignite.c (renamed from src/ao_ignite.c)0
-rw-r--r--src/cc1111/ao_intflash.c (renamed from src/ao_intflash.c)0
-rw-r--r--src/cc1111/ao_led.c (renamed from src/ao_led.c)0
-rw-r--r--src/cc1111/ao_packet.c (renamed from src/ao_packet.c)0
-rw-r--r--src/cc1111/ao_packet_master.c (renamed from src/ao_packet_master.c)0
-rw-r--r--src/cc1111/ao_packet_slave.c (renamed from src/ao_packet_slave.c)0
-rw-r--r--src/cc1111/ao_radio.c (renamed from src/ao_radio.c)0
-rw-r--r--src/cc1111/ao_reboot.c (renamed from src/ao_reboot.c)0
-rw-r--r--src/cc1111/ao_romconfig.c (renamed from src/ao_romconfig.c)0
-rw-r--r--src/cc1111/ao_serial.c (renamed from src/ao_serial.c)0
-rw-r--r--src/cc1111/ao_spi.c (renamed from src/ao_spi.c)0
-rw-r--r--src/cc1111/ao_timer.c (renamed from src/ao_timer.c)0
-rw-r--r--src/cc1111/ao_usb.c (renamed from src/ao_usb.c)0
-rw-r--r--src/cc1111/ao_usb.h (renamed from src/ao_usb.h)0
-rw-r--r--src/cc1111/cc1111.h (renamed from src/cc1111.h)0
-rw-r--r--src/core/altitude.h (renamed from src/altitude.h)0
-rw-r--r--src/core/ao.h (renamed from src/ao.h)0
-rw-r--r--src/core/ao_cmd.c (renamed from src/ao_cmd.c)0
-rw-r--r--src/core/ao_config.c (renamed from src/ao_config.c)0
-rw-r--r--src/core/ao_convert.c (renamed from src/ao_convert.c)0
-rw-r--r--src/core/ao_convert_test.c (renamed from src/ao_convert_test.c)0
-rw-r--r--src/core/ao_ee_fake.c (renamed from src/ao_ee_fake.c)0
-rw-r--r--src/core/ao_flight.c (renamed from src/ao_flight.c)0
-rw-r--r--src/core/ao_flight_nano.c (renamed from src/ao_flight_nano.c)0
-rw-r--r--src/core/ao_gps_print.c (renamed from src/ao_gps_print.c)0
-rw-r--r--src/core/ao_gps_report.c (renamed from src/ao_gps_report.c)0
-rw-r--r--src/core/ao_host.h (renamed from src/ao_host.h)0
-rw-r--r--src/core/ao_kalman.c (renamed from src/ao_kalman.c)0
-rw-r--r--src/core/ao_log.c (renamed from src/ao_log.c)0
-rw-r--r--src/core/ao_log_big.c (renamed from src/ao_log_big.c)0
-rw-r--r--src/core/ao_log_telem.c (renamed from src/ao_log_telem.c)0
-rw-r--r--src/core/ao_log_tiny.c (renamed from src/ao_log_tiny.c)0
-rw-r--r--src/core/ao_monitor.c (renamed from src/ao_monitor.c)0
-rw-r--r--src/core/ao_mutex.c (renamed from src/ao_mutex.c)0
-rw-r--r--src/core/ao_panic.c (renamed from src/ao_panic.c)0
-rw-r--r--src/core/ao_pins.h (renamed from src/ao_pins.h)0
-rw-r--r--src/core/ao_product.c (renamed from src/ao_product.c)0
-rw-r--r--src/core/ao_report.c (renamed from src/ao_report.c)0
-rw-r--r--src/core/ao_rssi.c (renamed from src/ao_rssi.c)0
-rw-r--r--src/core/ao_sample.c (renamed from src/ao_sample.c)0
-rw-r--r--src/core/ao_state.c (renamed from src/ao_state.c)0
-rw-r--r--src/core/ao_stdio.c (renamed from src/ao_stdio.c)0
-rw-r--r--src/core/ao_storage.c (renamed from src/ao_storage.c)0
-rw-r--r--src/core/ao_task.c (renamed from src/ao_task.c)0
-rw-r--r--src/core/ao_telem.h (renamed from src/ao_telem.h)0
-rw-r--r--src/core/ao_telemetry.c (renamed from src/ao_telemetry.c)0
-rw-r--r--src/drivers/ao_25lc1024.c (renamed from src/ao_ee.c)2
-rw-r--r--src/drivers/ao_25lc1024.h (renamed from src/25lc1024.h)0
-rw-r--r--src/drivers/ao_at45db161d.c (renamed from src/ao_flash.c)2
-rw-r--r--src/drivers/ao_at45db161d.h (renamed from src/at45db161d.h)0
-rw-r--r--src/drivers/ao_btm.c (renamed from src/ao_btm.c)0
-rw-r--r--src/drivers/ao_companion.c (renamed from src/ao_companion.c)0
-rw-r--r--src/drivers/ao_gps_sirf.c (renamed from src/ao_gps_sirf.c)0
-rw-r--r--src/drivers/ao_gps_skytraq.c (renamed from src/ao_gps_skytraq.c)0
-rw-r--r--src/drivers/ao_m25.c (renamed from src/ao_m25.c)0
-rw-r--r--src/product/Makefile.telebt97
-rw-r--r--src/product/Makefile.teledongle96
-rw-r--r--src/product/Makefile.telemetrum111
-rw-r--r--src/product/Makefile.telemini100
-rw-r--r--src/product/Makefile.telenano99
-rw-r--r--src/product/ao_telebt.c (renamed from src/ao_telebt.c)0
-rw-r--r--src/product/ao_teledongle.c (renamed from src/ao_teledongle.c)0
-rw-r--r--src/product/ao_telemetrum.c (renamed from src/ao_telemetrum.c)0
-rw-r--r--src/product/ao_telemini.c (renamed from src/ao_telemini.c)0
-rw-r--r--src/product/ao_telenano.c (renamed from src/ao_telenano.c)0
-rw-r--r--src/product/ao_teleterra.c (renamed from src/ao_teleterra.c)0
-rw-r--r--src/product/ao_test.c (renamed from src/ao_test.c)0
-rw-r--r--src/product/ao_tidongle.c (renamed from src/ao_tidongle.c)0
-rw-r--r--src/telebt-v0.0/Makefile10
-rw-r--r--src/telebt-v0.0/Makefile.defs8
-rw-r--r--src/telebt-v0.1/Makefile20
-rw-r--r--src/telebt-v0.1/Makefile.defs8
-rw-r--r--src/teledongle-v0.1/Makefile9
-rw-r--r--src/teledongle-v0.1/Makefile.defs9
-rw-r--r--src/teledongle-v0.2/Makefile9
-rw-r--r--src/teledongle-v0.2/Makefile.defs9
-rw-r--r--src/telemetrum-v0.1-sirf/Makefile17
-rw-r--r--src/telemetrum-v0.1-sirf/Makefile.defs12
-rw-r--r--src/telemetrum-v0.1-sky/Makefile17
-rw-r--r--src/telemetrum-v0.1-sky/Makefile.defs12
-rw-r--r--src/telemetrum-v1.0/Makefile17
-rw-r--r--src/telemetrum-v1.0/Makefile.defs13
-rw-r--r--src/telemetrum-v1.1/Makefile17
-rw-r--r--src/telemetrum-v1.1/Makefile.defs13
-rw-r--r--src/telemini-v1.0/Makefile9
-rw-r--r--src/telemini-v1.0/Makefile.defs9
-rw-r--r--src/telenano-v0.1/Makefile10
-rw-r--r--src/telenano-v0.1/Makefile.defs9
-rw-r--r--src/test/Makefile20
-rw-r--r--src/test/ao_flight_test.c (renamed from src/ao_flight_test.c)0
-rw-r--r--src/test/ao_gps_test.c (renamed from src/ao_gps_test.c)0
-rw-r--r--src/test/ao_gps_test_skytraq.c (renamed from src/ao_gps_test_skytraq.c)0
-rw-r--r--src/tidongle/Makefile93
-rw-r--r--src/tidongle/Makefile.defs9
-rw-r--r--src/util/ao-make-product.5c (renamed from src/ao-make-product.5c)0
-rwxr-xr-xsrc/util/check-stack (renamed from src/check-stack)0
-rwxr-xr-xsrc/util/gps-cksum (renamed from src/gps-cksum)0
-rw-r--r--src/util/make-altitude (renamed from src/make-altitude)0
-rw-r--r--src/util/make-kalman (renamed from src/make-kalman)2
-rwxr-xr-xsrc/util/sirf-cksum (renamed from src/sirf-cksum)0
-rw-r--r--src/util/skytraq-cksum (renamed from src/skytraq-cksum)0
112 files changed, 781 insertions, 591 deletions
diff --git a/configure.ac b/configure.ac
index f9002508..da9d9991 100644
--- a/configure.ac
+++ b/configure.ac
@@ -19,7 +19,7 @@ dnl Process this file with autoconf to create configure.
AC_PREREQ(2.57)
AC_INIT([altos], 1.0)
-AC_CONFIG_SRCDIR([src/ao.h])
+AC_CONFIG_SRCDIR([src/core/ao.h])
AM_INIT_AUTOMAKE([foreign dist-bzip2])
AM_MAINTAINER_MODE
diff --git a/src/Makefile b/src/Makefile
index 018f0c5c..4e40c2bf 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -2,7 +2,13 @@
# AltOS build
#
#
-CC=sdcc
+
+vpath make-altitude util
+vpath make-kalman util
+vpath kalman.5c kalman
+vpath kalman_filter.5c kalman
+vpath load_csv.5c kalman
+vpath matrix.5c kalman
include Version
@@ -14,7 +20,7 @@ SUBDIRS=\
telemetrum-v0.1-sky telemetrum-v0.1-sirf \
tidongle test
-all: all-recursive
+all: all-local all-recursive
RECURSIVE_TARGETS = all-recursive clean-recursive install-recursive
@@ -27,8 +33,21 @@ $(RECURSIVE_TARGETS):
distclean: clean
-clean: clean-recursive
+clean: clean-local clean-recursive
install: install-recursive
uninstall:
+
+all-recursive: all-local
+
+all-local: altitude.h ao_kalman.h
+
+altitude.h: make-altitude
+ nickle $< > $@
+
+ao_kalman.h: make-kalman kalman.5c kalman_filter.5c load_csv.5c matrix.5c
+ sh $< kalman > $@
+
+clean-local:
+ rm -f altitude.h ao_kalman.h \ No newline at end of file
diff --git a/src/Makefile.proto b/src/Makefile.proto
deleted file mode 100644
index 8f98d354..00000000
--- a/src/Makefile.proto
+++ /dev/null
@@ -1,380 +0,0 @@
-#
-# AltOS build
-#
-#
-vpath %.c ..
-vpath %.h ..
-vpath make-altitude ..
-vpath make-kalman ..
-vpath kalman.5c ../kalman
-vpath kalman_filter.5c ../kalman
-vpath load_csv.5c ../kalman
-vpath matrix.5c ../kalman
-vpath ao-make-product.5c ..
-
-CC=sdcc
-
-ifndef VERSION
-include ../Version
-endif
-
-CFLAGS=--model-small --debug --opt-code-speed -DCODESIZE=$(CODESIZE)
-
-CODESIZE ?= 0x8000
-
-LDFLAGS=--out-fmt-ihx --code-loc 0x0000 --code-size $(CODESIZE) \
- --xram-loc 0xf000 --xram-size 0xda2 --iram-size 0xff
-
-INC = \
- ao.h \
- ao_pins.h \
- cc1111.h \
- altitude.h \
- ao_kalman.h \
- 25lc1024.h
-
-#
-# Common AltOS sources
-#
-ALTOS_SRC = \
- ao_cmd.c \
- ao_dma.c \
- ao_mutex.c \
- ao_panic.c \
- ao_task.c \
- ao_timer.c \
- ao_romconfig.c \
- _bp.c
-
-#
-# Shared AltOS drivers
-#
-ALTOS_DRIVER_SRC = \
- ao_config.c \
- ao_led.c \
- ao_radio.c \
- ao_stdio.c
-
-BEEP_DRIVER_SRC = \
- ao_beep.c
-
-USB_DRIVER_SRC = \
- ao_usb.c
-
-TELE_COMMON_SRC = \
- ao_packet.c
-
-#
-# Receiver code
-#
-TELE_RECEIVER_SRC =\
- ao_monitor.c \
- ao_gps_print.c \
- ao_packet_master.c \
- ao_state.c \
- ao_rssi.c
-
-#
-# Shared Tele drivers (on TeleMetrum, TeleTerra, TeleDongle)
-#
-
-TELE_DRIVER_SRC = \
- ao_convert.c
-
-#
-# Serial port driver
-#
-SERIAL_DRIVER_SRC = \
- ao_serial.c
-
-#
-# Spi bus driver
-#
-SPI_DRIVER_SRC = \
- ao_spi.c
-
-#
-# Debug dongle driver (only on TI)
-#
-DBG_SRC = \
- ao_dbg.c
-
-#
-# Drivers only on TeleMetrum
-#
-TM_DRIVER_SRC = \
- ao_adc.c \
- ao_gps_report.c \
- ao_ignite.c \
- ao_packet_slave.c \
- $(BEEP_DRIVER_SRC) \
- $(USB_DRIVER_SRC)
-
-#
-# 25LC1024 driver source
-EE_DRIVER_SRC = \
- ao_storage.c \
- ao_ee.c
-
-#
-# AT45DB161D driver source
-
-FLASH_DRIVER_SRC = \
- ao_storage.c \
- ao_flash.c
-
-#
-# Numonyx M25P80 driver source
-#
-
-M25_DRIVER_SRC = \
- ao_storage.c \
- ao_m25.c
-
-#
-# SiRF driver source
-#
-SIRF_DRIVER_SRC = \
- ao_gps_sirf.c
-
-#
-# Skytraq driver source
-#
-SKY_DRIVER_SRC = \
- ao_gps_skytraq.c
-
-
-#
-# BTM-182 driver source
-#
-BTM_DRIVER_SRC = \
- ao_btm.c
-
-#
-# Companion port driver source
-#
-COMPANION_SRC = \
- ao_companion.c
-
-#
-# Tasks run on TeleMetrum
-#
-TM_TASK_SRC = \
- ao_flight.c \
- ao_sample.c \
- ao_kalman.c \
- ao_log.c \
- ao_log_big.c \
- ao_report.c \
- ao_telemetry.c
-
-TM_MAIN_SRC = \
- ao_telemetrum.c
-
-#
-# Base sources for TeleMetrum
-#
-TM_BASE_SRC = \
- $(ALTOS_SRC) \
- $(ALTOS_DRIVER_SRC) \
- $(TELE_DRIVER_SRC) \
- $(SERIAL_DRIVER_SRC) \
- $(TELE_COMMON_SRC) \
- $(TM_DRIVER_SRC) \
- $(TM_TASK_SRC) \
- $(TM_MAIN_SRC)
-
-#
-# Sources for TeleMini
-TMINI_DRIVER_SRC = \
- ao_adc.c \
- ao_ignite.c \
- ao_config.c \
- ao_storage.c \
- ao_packet_slave.c \
- ao_intflash.c
-
-TMINI_TASK_SRC = \
- ao_flight.c \
- ao_sample.c \
- ao_kalman.c \
- ao_log.c \
- ao_log_tiny.c \
- ao_report.c \
- ao_telemetry.c
-
-TMINI_MAIN_SRC = \
- ao_telemini.c
-
-TMINI_BASE_SRC = \
- $(ALTOS_SRC) \
- $(ALTOS_DRIVER_SRC) \
- $(TELE_DRIVER_SRC) \
- $(TELE_COMMON_SRC) \
- $(TMINI_DRIVER_SRC) \
- $(TMINI_TASK_SRC) \
- $(TMINI_MAIN_SRC)
-
-#
-# Sources for TeleNano
-TNANO_DRIVER_SRC = \
- ao_adc.c \
- ao_config.c \
- ao_storage.c \
- ao_packet_slave.c \
- ao_intflash.c
-
-TNANO_TASK_SRC = \
- ao_flight_nano.c \
- ao_sample.c \
- ao_kalman.c \
- ao_log.c \
- ao_log_tiny.c \
- ao_report.c \
- ao_telemetry.c
-
-TNANO_MAIN_SRC = \
- ao_telenano.c
-
-TNANO_BASE_SRC = \
- $(ALTOS_SRC) \
- $(ALTOS_DRIVER_SRC) \
- $(TELE_DRIVER_SRC) \
- $(TELE_COMMON_SRC) \
- $(TNANO_DRIVER_SRC) \
- $(TNANO_TASK_SRC) \
- $(TNANO_MAIN_SRC)
-
-#
-# Sources for TeleBluetooth
-#
-
-TBT_MAIN_SRC = \
- ao_telebt.c
-
-TBT_BASE_SRC = \
- $(ALTOS_SRC) \
- $(ALTOS_DRIVER_SRC) \
- $(TELE_RECEIVER_SRC) \
- $(TELE_COMMON_SRC) \
- $(SERIAL_DRIVER_SRC) \
- $(USB_DRIVER_SRC) \
- $(BTM_DRIVER_SRC) \
- $(DBG_SRC) \
- $(TBT_MAIN_SRC)
-
-TBT_V_0_1_SRC = \
- $(TBT_BASE_SRC) \
- $(SPI_DRIVER_SRC) \
- $(M25_DRIVER_SRC) \
- $(BEEP_DRIVER_SRC) \
- ao_log_telem.c
-
-#
-# TI Dongle sources
-#
-TI_MAIN_SRC = \
- ao_tidongle.c
-
-#
-# All sources for the TI debug dongle
-#
-TI_SRC = \
- $(ALTOS_SRC) \
- $(ALTOS_DRIVER_SRC) \
- $(TELE_RECEIVER_SRC) \
- $(TELE_COMMON_SRC) \
- $(USB_DRIVER_SRC) \
- $(TI_MAIN_SRC) \
- $(DBG_SRC)
-
-TT_MAIN_SRC = \
- ao_teleterra.c
-#
-# All sources for TeleTerra
-#
-TT_SRC = \
- $(ALTOS_SRC) \
- $(ALTOS_DRIVER_SRC) \
- $(TELE_RECEIVER_SRC) \
- $(TELE_DRIVER_SRC) \
- $(TELE_COMMON_SRC) \
- $(USB_DRIVER_SRC) \
- $(TT_MAIN_SRC)
-
-
-#
-# Sources for TeleDongle
-#
-
-TD_MAIN_SRC = \
- ao_teledongle.c
-
-TD_SRC = \
- $(ALTOS_SRC) \
- $(ALTOS_DRIVER_SRC) \
- $(TELE_RECEIVER_SRC) \
- $(TELE_COMMON_SRC) \
- $(USB_DRIVER_SRC) \
- $(TD_MAIN_SRC)
-
-include Makefile.defs
-
-CFLAGS += $(PRODUCT_DEF) -I.
-
-NICKLE=nickle
-CHECK_STACK=sh ../check-stack
-
-REL=$(SRC:.c=.rel) ao_product.rel
-ADB=$(REL:.rel=.adb)
-ASM=$(REL:.rel=.asm)
-LNK=$(REL:.rel=.lnk)
-LST=$(REL:.rel=.lst)
-RST=$(REL:.rel=.rst)
-SYM=$(REL:.rel=.sym)
-
-PCDB=$(PROG:.ihx=.cdb)
-PLNK=$(PROG:.ihx=.lnk)
-PMAP=$(PROG:.ihx=.map)
-PMEM=$(PROG:.ihx=.mem)
-PAOM=$(PROG:.ihx=)
-
-V=0
-# The user has explicitly enabled quiet compilation.
-ifeq ($(V),0)
-quiet = @printf " $1 $2 $@\n"; $($1)
-endif
-# Otherwise, print the full command line.
-quiet ?= $($1)
-
-%.rel : %.c $(INC)
- $(call quiet,CC,$(PRODUCT_DEF)) $(CFLAGS) -c -o$@ $<
-
-all: ../$(PROG)
-
-../$(PROG): $(REL) Makefile Makefile.defs ../Makefile.proto
- $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(REL) && cp $(PROG) $(PMAP) ..
- $(call quiet,CHECK_STACK) ../ao.h $(PMEM)
-
-../altitude.h: make-altitude
- nickle $< > $@
-
-../ao_kalman.h: make-kalman kalman.5c kalman_filter.5c load_csv.5c matrix.5c
- sh $< > $@
-
-ao_product.h: ao-make-product.5c ../Version
- $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
-
-$(REL): ao_product.h
-
-distclean: clean
-
-clean:
- rm -f $(ADB) $(ASM) $(LNK) $(LST) $(REL) $(RST) $(SYM)
- rm -f $(PCDB) $(PLNK) $(PMAP) $(PMEM) $(PAOM)
- rm -f ao_product.h
- rm -f ../$(PROG)
-
-install:
-
-uninstall:
diff --git a/src/ao_adc_fake.c b/src/ao_adc_fake.c
deleted file mode 100644
index 6ca88d4e..00000000
--- a/src/ao_adc_fake.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright © 2009 Keith Packard <keithp@keithp.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
- */
-
-#include "ao.h"
-
-volatile __xdata struct ao_adc ao_adc_ring[AO_ADC_RING];
-volatile __data uint8_t ao_adc_head;
-
-/* Stub for systems which have no ADC */
-void
-ao_adc_poll(void)
-{
-}
diff --git a/src/ao_main.c b/src/ao_main.c
deleted file mode 100644
index 25acccfc..00000000
--- a/src/ao_main.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright © 2009 Keith Packard <keithp@keithp.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
- */
-
-#include "ao.h"
-
-void
-main(void)
-{
- ao_clock_init();
-
- /* Turn on the red LED until the system is stable */
- ao_led_init();
- ao_led_on(AO_LED_RED);
-
- ao_timer_init();
- ao_adc_init();
- ao_beep_init();
- ao_cmd_init();
- ao_ee_init();
- ao_flight_init();
- ao_log_init();
- ao_report_init();
- ao_usb_init();
- ao_serial_init();
- ao_gps_init();
- ao_telemetry_init();
- ao_radio_init();
- ao_start_scheduler();
-}
diff --git a/src/cc1111/Makefile.cc1111 b/src/cc1111/Makefile.cc1111
new file mode 100644
index 00000000..8de4a9b2
--- /dev/null
+++ b/src/cc1111/Makefile.cc1111
@@ -0,0 +1,27 @@
+CC=sdcc
+
+CFLAGS=--model-small --debug --opt-code-speed -DCODESIZE=$(CODESIZE)
+
+CFLAGS += $(PRODUCT_DEF) -I. -I.. -I../core -I../cc1111 -I../driver -I../product
+
+CODESIZE ?= 0x8000
+
+LDFLAGS=--out-fmt-ihx --code-loc 0x0000 --code-size $(CODESIZE) \
+ --xram-loc 0xf000 --xram-size 0xda2 --iram-size 0xff
+
+REL=$(SRC:.c=.rel) ao_product.rel
+ADB=$(REL:.rel=.adb)
+ASM=$(REL:.rel=.asm)
+LNK=$(REL:.rel=.lnk)
+LST=$(REL:.rel=.lst)
+RST=$(REL:.rel=.rst)
+SYM=$(REL:.rel=.sym)
+
+PCDB=$(PROG:.ihx=.cdb)
+PLNK=$(PROG:.ihx=.lnk)
+PMAP=$(PROG:.ihx=.map)
+PMEM=$(PROG:.ihx=.mem)
+PAOM=$(PROG:.ihx=)
+
+%.rel : %.c $(INC)
+ $(call quiet,CC,$(PRODUCT_DEF)) $(CFLAGS) -c -o$@ $<
diff --git a/src/_bp.c b/src/cc1111/_bp.c
index 6bf135bc..6bf135bc 100644
--- a/src/_bp.c
+++ b/src/cc1111/_bp.c
diff --git a/src/ao_adc.c b/src/cc1111/ao_adc.c
index 786dfd11..786dfd11 100644
--- a/src/ao_adc.c
+++ b/src/cc1111/ao_adc.c
diff --git a/src/ao_beep.c b/src/cc1111/ao_beep.c
index 3642f4c6..3642f4c6 100644
--- a/src/ao_beep.c
+++ b/src/cc1111/ao_beep.c
diff --git a/src/ao_dbg.c b/src/cc1111/ao_dbg.c
index d4c9567f..d4c9567f 100644
--- a/src/ao_dbg.c
+++ b/src/cc1111/ao_dbg.c
diff --git a/src/ao_dma.c b/src/cc1111/ao_dma.c
index 6052964a..6052964a 100644
--- a/src/ao_dma.c
+++ b/src/cc1111/ao_dma.c
diff --git a/src/ao_ignite.c b/src/cc1111/ao_ignite.c
index 5238beb4..5238beb4 100644
--- a/src/ao_ignite.c
+++ b/src/cc1111/ao_ignite.c
diff --git a/src/ao_intflash.c b/src/cc1111/ao_intflash.c
index d76d954e..d76d954e 100644
--- a/src/ao_intflash.c
+++ b/src/cc1111/ao_intflash.c
diff --git a/src/ao_led.c b/src/cc1111/ao_led.c
index 5beed58d..5beed58d 100644
--- a/src/ao_led.c
+++ b/src/cc1111/ao_led.c
diff --git a/src/ao_packet.c b/src/cc1111/ao_packet.c
index f627e02b..f627e02b 100644
--- a/src/ao_packet.c
+++ b/src/cc1111/ao_packet.c
diff --git a/src/ao_packet_master.c b/src/cc1111/ao_packet_master.c
index b0fdf5a8..b0fdf5a8 100644
--- a/src/ao_packet_master.c
+++ b/src/cc1111/ao_packet_master.c
diff --git a/src/ao_packet_slave.c b/src/cc1111/ao_packet_slave.c
index 9f14052a..9f14052a 100644
--- a/src/ao_packet_slave.c
+++ b/src/cc1111/ao_packet_slave.c
diff --git a/src/ao_radio.c b/src/cc1111/ao_radio.c
index 00816b33..00816b33 100644
--- a/src/ao_radio.c
+++ b/src/cc1111/ao_radio.c
diff --git a/src/ao_reboot.c b/src/cc1111/ao_reboot.c
index 8c47b893..8c47b893 100644
--- a/src/ao_reboot.c
+++ b/src/cc1111/ao_reboot.c
diff --git a/src/ao_romconfig.c b/src/cc1111/ao_romconfig.c
index f3fe61b1..f3fe61b1 100644
--- a/src/ao_romconfig.c
+++ b/src/cc1111/ao_romconfig.c
diff --git a/src/ao_serial.c b/src/cc1111/ao_serial.c
index 82370c64..82370c64 100644
--- a/src/ao_serial.c
+++ b/src/cc1111/ao_serial.c
diff --git a/src/ao_spi.c b/src/cc1111/ao_spi.c
index fbe613c7..fbe613c7 100644
--- a/src/ao_spi.c
+++ b/src/cc1111/ao_spi.c
diff --git a/src/ao_timer.c b/src/cc1111/ao_timer.c
index c977fbc8..c977fbc8 100644
--- a/src/ao_timer.c
+++ b/src/cc1111/ao_timer.c
diff --git a/src/ao_usb.c b/src/cc1111/ao_usb.c
index 08cb7390..08cb7390 100644
--- a/src/ao_usb.c
+++ b/src/cc1111/ao_usb.c
diff --git a/src/ao_usb.h b/src/cc1111/ao_usb.h
index 6633dafc..6633dafc 100644
--- a/src/ao_usb.h
+++ b/src/cc1111/ao_usb.h
diff --git a/src/cc1111.h b/src/cc1111/cc1111.h
index e52aa79f..e52aa79f 100644
--- a/src/cc1111.h
+++ b/src/cc1111/cc1111.h
diff --git a/src/altitude.h b/src/core/altitude.h
index a278bbc6..a278bbc6 100644
--- a/src/altitude.h
+++ b/src/core/altitude.h
diff --git a/src/ao.h b/src/core/ao.h
index 8ac9ac3d..8ac9ac3d 100644
--- a/src/ao.h
+++ b/src/core/ao.h
diff --git a/src/ao_cmd.c b/src/core/ao_cmd.c
index 1442ebea..1442ebea 100644
--- a/src/ao_cmd.c
+++ b/src/core/ao_cmd.c
diff --git a/src/ao_config.c b/src/core/ao_config.c
index 0c10e608..0c10e608 100644
--- a/src/ao_config.c
+++ b/src/core/ao_config.c
diff --git a/src/ao_convert.c b/src/core/ao_convert.c
index 0969f107..0969f107 100644
--- a/src/ao_convert.c
+++ b/src/core/ao_convert.c
diff --git a/src/ao_convert_test.c b/src/core/ao_convert_test.c
index e2c28b73..e2c28b73 100644
--- a/src/ao_convert_test.c
+++ b/src/core/ao_convert_test.c
diff --git a/src/ao_ee_fake.c b/src/core/ao_ee_fake.c
index b0c1d61e..b0c1d61e 100644
--- a/src/ao_ee_fake.c
+++ b/src/core/ao_ee_fake.c
diff --git a/src/ao_flight.c b/src/core/ao_flight.c
index 85c1825b..85c1825b 100644
--- a/src/ao_flight.c
+++ b/src/core/ao_flight.c
diff --git a/src/ao_flight_nano.c b/src/core/ao_flight_nano.c
index 2e332b12..2e332b12 100644
--- a/src/ao_flight_nano.c
+++ b/src/core/ao_flight_nano.c
diff --git a/src/ao_gps_print.c b/src/core/ao_gps_print.c
index fcdedd30..fcdedd30 100644
--- a/src/ao_gps_print.c
+++ b/src/core/ao_gps_print.c
diff --git a/src/ao_gps_report.c b/src/core/ao_gps_report.c
index e57f8744..e57f8744 100644
--- a/src/ao_gps_report.c
+++ b/src/core/ao_gps_report.c
diff --git a/src/ao_host.h b/src/core/ao_host.h
index 65c25fe5..65c25fe5 100644
--- a/src/ao_host.h
+++ b/src/core/ao_host.h
diff --git a/src/ao_kalman.c b/src/core/ao_kalman.c
index ee01949e..ee01949e 100644
--- a/src/ao_kalman.c
+++ b/src/core/ao_kalman.c
diff --git a/src/ao_log.c b/src/core/ao_log.c
index 6d3ad535..6d3ad535 100644
--- a/src/ao_log.c
+++ b/src/core/ao_log.c
diff --git a/src/ao_log_big.c b/src/core/ao_log_big.c
index 74d94c4b..74d94c4b 100644
--- a/src/ao_log_big.c
+++ b/src/core/ao_log_big.c
diff --git a/src/ao_log_telem.c b/src/core/ao_log_telem.c
index 1b472efe..1b472efe 100644
--- a/src/ao_log_telem.c
+++ b/src/core/ao_log_telem.c
diff --git a/src/ao_log_tiny.c b/src/core/ao_log_tiny.c
index d5a3b99f..d5a3b99f 100644
--- a/src/ao_log_tiny.c
+++ b/src/core/ao_log_tiny.c
diff --git a/src/ao_monitor.c b/src/core/ao_monitor.c
index 69eb58e8..69eb58e8 100644
--- a/src/ao_monitor.c
+++ b/src/core/ao_monitor.c
diff --git a/src/ao_mutex.c b/src/core/ao_mutex.c
index c82a7d57..c82a7d57 100644
--- a/src/ao_mutex.c
+++ b/src/core/ao_mutex.c
diff --git a/src/ao_panic.c b/src/core/ao_panic.c
index fdada201..fdada201 100644
--- a/src/ao_panic.c
+++ b/src/core/ao_panic.c
diff --git a/src/ao_pins.h b/src/core/ao_pins.h
index e1f5459f..e1f5459f 100644
--- a/src/ao_pins.h
+++ b/src/core/ao_pins.h
diff --git a/src/ao_product.c b/src/core/ao_product.c
index fb59580b..fb59580b 100644
--- a/src/ao_product.c
+++ b/src/core/ao_product.c
diff --git a/src/ao_report.c b/src/core/ao_report.c
index 3cf558e1..3cf558e1 100644
--- a/src/ao_report.c
+++ b/src/core/ao_report.c
diff --git a/src/ao_rssi.c b/src/core/ao_rssi.c
index e3964d2d..e3964d2d 100644
--- a/src/ao_rssi.c
+++ b/src/core/ao_rssi.c
diff --git a/src/ao_sample.c b/src/core/ao_sample.c
index b2b8e9f6..b2b8e9f6 100644
--- a/src/ao_sample.c
+++ b/src/core/ao_sample.c
diff --git a/src/ao_state.c b/src/core/ao_state.c
index ed197aa5..ed197aa5 100644
--- a/src/ao_state.c
+++ b/src/core/ao_state.c
diff --git a/src/ao_stdio.c b/src/core/ao_stdio.c
index c0138a30..c0138a30 100644
--- a/src/ao_stdio.c
+++ b/src/core/ao_stdio.c
diff --git a/src/ao_storage.c b/src/core/ao_storage.c
index 6ffca0e5..6ffca0e5 100644
--- a/src/ao_storage.c
+++ b/src/core/ao_storage.c
diff --git a/src/ao_task.c b/src/core/ao_task.c
index f5850fa4..f5850fa4 100644
--- a/src/ao_task.c
+++ b/src/core/ao_task.c
diff --git a/src/ao_telem.h b/src/core/ao_telem.h
index 1a8da291..1a8da291 100644
--- a/src/ao_telem.h
+++ b/src/core/ao_telem.h
diff --git a/src/ao_telemetry.c b/src/core/ao_telemetry.c
index c7338a58..c7338a58 100644
--- a/src/ao_telemetry.c
+++ b/src/core/ao_telemetry.c
diff --git a/src/ao_ee.c b/src/drivers/ao_25lc1024.c
index a2fe8dc1..738f8ce6 100644
--- a/src/ao_ee.c
+++ b/src/drivers/ao_25lc1024.c
@@ -16,7 +16,7 @@
*/
#include "ao.h"
-#include "25lc1024.h"
+#include "ao_25lc1024.h"
#define EE_BLOCK_SIZE ((uint16_t) (256))
#define EE_BLOCK_SHIFT 8
diff --git a/src/25lc1024.h b/src/drivers/ao_25lc1024.h
index 44e52387..44e52387 100644
--- a/src/25lc1024.h
+++ b/src/drivers/ao_25lc1024.h
diff --git a/src/ao_flash.c b/src/drivers/ao_at45db161d.c
index bb40f6f7..aee9877a 100644
--- a/src/ao_flash.c
+++ b/src/drivers/ao_at45db161d.c
@@ -16,7 +16,7 @@
*/
#include "ao.h"
-#include "at45db161d.h"
+#include "ao_at45db161d.h"
/* Total bytes of available storage */
__pdata uint32_t ao_storage_total;
diff --git a/src/at45db161d.h b/src/drivers/ao_at45db161d.h
index 9ee6f1b6..9ee6f1b6 100644
--- a/src/at45db161d.h
+++ b/src/drivers/ao_at45db161d.h
diff --git a/src/ao_btm.c b/src/drivers/ao_btm.c
index 44155ec1..44155ec1 100644
--- a/src/ao_btm.c
+++ b/src/drivers/ao_btm.c
diff --git a/src/ao_companion.c b/src/drivers/ao_companion.c
index 4c8f4269..4c8f4269 100644
--- a/src/ao_companion.c
+++ b/src/drivers/ao_companion.c
diff --git a/src/ao_gps_sirf.c b/src/drivers/ao_gps_sirf.c
index f2abbf84..f2abbf84 100644
--- a/src/ao_gps_sirf.c
+++ b/src/drivers/ao_gps_sirf.c
diff --git a/src/ao_gps_skytraq.c b/src/drivers/ao_gps_skytraq.c
index 7ac26946..7ac26946 100644
--- a/src/ao_gps_skytraq.c
+++ b/src/drivers/ao_gps_skytraq.c
diff --git a/src/ao_m25.c b/src/drivers/ao_m25.c
index d7208273..d7208273 100644
--- a/src/ao_m25.c
+++ b/src/drivers/ao_m25.c
diff --git a/src/product/Makefile.telebt b/src/product/Makefile.telebt
new file mode 100644
index 00000000..99730b9f
--- /dev/null
+++ b/src/product/Makefile.telebt
@@ -0,0 +1,97 @@
+#
+# TeleBT build file
+#
+# Define TELEBT_VER, TELEBT_DEF, TELEBT_INC and TELEBT_SRC
+# and include this file
+
+vpath %.c ..:../core:../cc1111:../drivers:../product
+vpath %.h ..:../core:../cc1111:../drivers:../product
+vpath ao-make-product.5c ../util
+
+ifndef VERSION
+include ../Version
+endif
+
+INC = \
+ ao.h \
+ ao_pins.h \
+ cc1111.h \
+ ao_product.h \
+ $(TELEBT_INC)
+
+CORE_SRC = \
+ ao_cmd.c \
+ ao_config.c \
+ ao_gps_print.c \
+ ao_monitor.c \
+ ao_mutex.c \
+ ao_panic.c \
+ ao_rssi.c \
+ ao_state.c \
+ ao_stdio.c \
+ ao_task.c
+
+CC1111_SRC = \
+ ao_dbg.c \
+ ao_dma.c \
+ ao_led.c \
+ ao_packet.c \
+ ao_packet_master.c \
+ ao_radio.c \
+ ao_romconfig.c \
+ ao_serial.c \
+ ao_timer.c \
+ ao_usb.c \
+ _bp.c
+
+DRIVER_SRC = \
+ ao_btm.c
+
+PRODUCT_SRC = \
+ ao_telebt.c
+
+SRC = \
+ $(CORE_SRC) \
+ $(CC1111_SRC) \
+ $(DRIVER_SRC) \
+ $(PRODUCT_SRC) \
+ $(TELEBT_SRC)
+
+PROG = telebt-v$(TELEBT_VER)-$(VERSION).ihx
+PRODUCT=TeleBT-v$(TELEBT_VER)
+PRODUCT_DEF=-DTELEBT_V_$(TELEBT_DEF)
+IDPRODUCT=0x000e
+
+include ../cc1111/Makefile.cc1111
+
+NICKLE=nickle
+CHECK_STACK=sh ../util/check-stack
+
+V=0
+# The user has explicitly enabled quiet compilation.
+ifeq ($(V),0)
+quiet = @printf " $1 $2 $@\n"; $($1)
+endif
+# Otherwise, print the full command line.
+quiet ?= $($1)
+
+all: ../$(PROG)
+
+../$(PROG): $(REL) Makefile
+ $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(REL) && cp $(PROG) $(PMAP) ..
+ $(call quiet,CHECK_STACK) ../core/ao.h $(PMEM)
+
+ao_product.h: ao-make-product.5c ../Version
+ $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
+
+distclean: clean
+
+clean:
+ rm -f $(ADB) $(ASM) $(LNK) $(LST) $(REL) $(RST) $(SYM)
+ rm -f $(PROG) $(PCDB) $(PLNK) $(PMAP) $(PMEM) $(PAOM)
+ rm -f ao_product.h
+ rm -f ../$(PROG) ../$(PMAP)
+
+install:
+
+uninstall:
diff --git a/src/product/Makefile.teledongle b/src/product/Makefile.teledongle
new file mode 100644
index 00000000..f32c037f
--- /dev/null
+++ b/src/product/Makefile.teledongle
@@ -0,0 +1,96 @@
+#
+# TeleDongle build file
+#
+# The various teledongle versions differ only
+# in minor pin variations
+# so the per-board makefiles simply define
+# TD_VER, TD_DEF and include
+# this file
+
+vpath %.c ..:../core:../cc1111:../drivers:../product
+vpath %.h ..:../core:../cc1111:../drivers:../product
+vpath ao-make-product.5c ../util
+
+ifndef VERSION
+include ../Version
+endif
+
+INC = \
+ ao.h \
+ ao_pins.h \
+ cc1111.h \
+ ao_product.h
+
+CORE_SRC = \
+ ao_cmd.c \
+ ao_config.c \
+ ao_gps_print.c \
+ ao_monitor.c \
+ ao_mutex.c \
+ ao_panic.c \
+ ao_rssi.c \
+ ao_state.c \
+ ao_stdio.c \
+ ao_task.c
+
+CC1111_SRC = \
+ ao_dbg.c \
+ ao_dma.c \
+ ao_led.c \
+ ao_packet.c \
+ ao_packet_master.c \
+ ao_radio.c \
+ ao_romconfig.c \
+ ao_timer.c \
+ ao_usb.c \
+ _bp.c
+
+DRIVER_SRC =
+
+PRODUCT_SRC = \
+ ao_teledongle.c
+
+SRC = \
+ $(CORE_SRC) \
+ $(CC1111_SRC) \
+ $(DRIVER_SRC) \
+ $(PRODUCT_SRC)
+
+PROG = teledongle-v$(TD_VER)-$(VERSION).ihx
+PRODUCT=TeleDongle-v$(TD_VER)
+PRODUCT_DEF=-DTELEDONGLE_V_$(TD_DEF)
+IDPRODUCT=0x000c
+
+include ../cc1111/Makefile.cc1111
+
+NICKLE=nickle
+CHECK_STACK=sh ../util/check-stack
+
+V=0
+# The user has explicitly enabled quiet compilation.
+ifeq ($(V),0)
+quiet = @printf " $1 $2 $@\n"; $($1)
+endif
+# Otherwise, print the full command line.
+quiet ?= $($1)
+
+all: ../$(PROG)
+
+../$(PROG): $(REL) Makefile
+ $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(REL) && cp $(PROG) $(PMAP) ..
+ $(call quiet,CHECK_STACK) ../core/ao.h $(PMEM)
+
+ao_product.h: ao-make-product.5c ../Version
+ $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
+
+distclean: clean
+
+clean:
+ rm -f $(ADB) $(ASM) $(LNK) $(LST) $(REL) $(RST) $(SYM)
+ rm -f $(PROG) $(PCDB) $(PLNK) $(PMAP) $(PMEM) $(PAOM)
+ rm -f ao_product.h
+ rm -f ../$(PROG) ../$(PMAP)
+
+install:
+
+uninstall:
diff --git a/src/product/Makefile.telemetrum b/src/product/Makefile.telemetrum
new file mode 100644
index 00000000..fd958aea
--- /dev/null
+++ b/src/product/Makefile.telemetrum
@@ -0,0 +1,111 @@
+#
+# TeleMetrum build file
+#
+# The various telemetrum versions differ only
+# in which flash and GPS drivers are included,
+# so the per-board makefiles simply define
+# TM_VER, TM_DEF, TM_INC and TM_SRC and include
+# this file
+
+vpath %.c ..:../core:../cc1111:../drivers:../product
+vpath %.h ..:../core:../cc1111:../drivers:../product
+vpath ao-make-product.5c ../util
+
+ifndef VERSION
+include ../Version
+endif
+
+INC = \
+ ao.h \
+ ao_pins.h \
+ cc1111.h \
+ altitude.h \
+ ao_kalman.h \
+ ao_product.h \
+ $(TM_INC)
+
+CORE_SRC = \
+ ao_cmd.c \
+ ao_config.c \
+ ao_convert.c \
+ ao_gps_report.c \
+ ao_mutex.c \
+ ao_panic.c \
+ ao_stdio.c \
+ ao_storage.c \
+ ao_task.c \
+ ao_flight.c \
+ ao_sample.c \
+ ao_kalman.c \
+ ao_log.c \
+ ao_log_big.c \
+ ao_report.c \
+ ao_telemetry.c
+
+CC1111_SRC = \
+ ao_adc.c \
+ ao_beep.c \
+ ao_dbg.c \
+ ao_dma.c \
+ ao_ignite.c \
+ ao_led.c \
+ ao_packet.c \
+ ao_packet_slave.c \
+ ao_radio.c \
+ ao_romconfig.c \
+ ao_serial.c \
+ ao_spi.c \
+ ao_timer.c \
+ ao_usb.c \
+ _bp.c
+
+DRIVER_SRC = \
+ $(TM_SRC)
+
+PRODUCT_SRC = \
+ ao_telemetrum.c
+
+SRC = \
+ $(CORE_SRC) \
+ $(CC1111_SRC) \
+ $(DRIVER_SRC) \
+ $(PRODUCT_SRC)
+
+PROG = telemetrum-v$(TM_VER)-$(VERSION).ihx
+PRODUCT=TeleMetrum-v$(TM_VER)
+PRODUCT_DEF=-DTELEMETRUM_V_$(TM_DEF)
+IDPRODUCT=0x000b
+
+include ../cc1111/Makefile.cc1111
+
+NICKLE=nickle
+CHECK_STACK=sh ../util/check-stack
+
+V=0
+# The user has explicitly enabled quiet compilation.
+ifeq ($(V),0)
+quiet = @printf " $1 $2 $@\n"; $($1)
+endif
+# Otherwise, print the full command line.
+quiet ?= $($1)
+
+all: ../$(PROG)
+
+../$(PROG): $(REL) Makefile
+ $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(REL) && cp $(PROG) $(PMAP) ..
+ $(call quiet,CHECK_STACK) ../core/ao.h $(PMEM)
+
+ao_product.h: ao-make-product.5c ../Version
+ $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
+
+distclean: clean
+
+clean:
+ rm -f $(ADB) $(ASM) $(LNK) $(LST) $(REL) $(RST) $(SYM)
+ rm -f $(PROG) $(PCDB) $(PLNK) $(PMAP) $(PMEM) $(PAOM)
+ rm -f ao_product.h
+ rm -f ../$(PROG) ../$(PMAP)
+
+install:
+
+uninstall:
diff --git a/src/product/Makefile.telemini b/src/product/Makefile.telemini
new file mode 100644
index 00000000..3bd14226
--- /dev/null
+++ b/src/product/Makefile.telemini
@@ -0,0 +1,100 @@
+#
+# TeleMini build file
+#
+# Define TELEMINI_VER and TELEMINI_DEF and then
+# include this file
+
+vpath %.c ..:../core:../cc1111:../drivers:../product
+vpath %.h ..:../core:../cc1111:../drivers:../product
+vpath ao-make-product.5c ../util
+
+ifndef VERSION
+include ../Version
+endif
+
+INC = \
+ ao.h \
+ ao_pins.h \
+ cc1111.h \
+ ao_product.h
+
+CORE_SRC = \
+ ao_cmd.c \
+ ao_config.c \
+ ao_convert.c \
+ ao_flight.c \
+ ao_kalman.c \
+ ao_log.c \
+ ao_log_tiny.c \
+ ao_mutex.c \
+ ao_panic.c \
+ ao_report.c \
+ ao_sample.c \
+ ao_stdio.c \
+ ao_storage.c \
+ ao_task.c \
+ ao_telemetry.c
+
+CC1111_SRC = \
+ ao_adc.c \
+ ao_dma.c \
+ ao_ignite.c \
+ ao_intflash.c \
+ ao_led.c \
+ ao_packet.c \
+ ao_packet_slave.c \
+ ao_radio.c \
+ ao_romconfig.c \
+ ao_timer.c \
+ _bp.c
+
+DRIVER_SRC =
+
+PRODUCT_SRC = \
+ ao_telemini.c
+
+SRC = \
+ $(CORE_SRC) \
+ $(CC1111_SRC) \
+ $(DRIVER_SRC) \
+ $(PRODUCT_SRC)
+
+PROG = telemini-v$(TELEMINI_VER)-$(VERSION).ihx
+PRODUCT=TeleMini-v$(TELEMINI_VER)
+PRODUCT_DEF=-DTELEMINI_V_$(TELEMINI_DEF)
+IDPRODUCT=0x000a
+CODESIZE=0x6700
+
+include ../cc1111/Makefile.cc1111
+
+NICKLE=nickle
+CHECK_STACK=sh ../util/check-stack
+
+V=0
+# The user has explicitly enabled quiet compilation.
+ifeq ($(V),0)
+quiet = @printf " $1 $2 $@\n"; $($1)
+endif
+# Otherwise, print the full command line.
+quiet ?= $($1)
+
+all: ../$(PROG)
+
+../$(PROG): $(REL) Makefile
+ $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(REL) && cp $(PROG) $(PMAP) ..
+ $(call quiet,CHECK_STACK) ../core/ao.h $(PMEM)
+
+ao_product.h: ao-make-product.5c ../Version
+ $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
+
+distclean: clean
+
+clean:
+ rm -f $(ADB) $(ASM) $(LNK) $(LST) $(REL) $(RST) $(SYM)
+ rm -f $(PROG) $(PCDB) $(PLNK) $(PMAP) $(PMEM) $(PAOM)
+ rm -f ao_product.h
+ rm -f ../$(PROG) ../$(PMAP)
+
+install:
+
+uninstall:
diff --git a/src/product/Makefile.telenano b/src/product/Makefile.telenano
new file mode 100644
index 00000000..72043044
--- /dev/null
+++ b/src/product/Makefile.telenano
@@ -0,0 +1,99 @@
+#
+# TeleNano build file
+#
+# Define TELENANO_VER and TELENANO_DEF and then
+# include this file
+
+vpath %.c ..:../core:../cc1111:../drivers:../product
+vpath %.h ..:../core:../cc1111:../drivers:../product
+vpath ao-make-product.5c ../util
+
+ifndef VERSION
+include ../Version
+endif
+
+INC = \
+ ao.h \
+ ao_pins.h \
+ cc1111.h \
+ ao_product.h
+
+CORE_SRC = \
+ ao_cmd.c \
+ ao_config.c \
+ ao_convert.c \
+ ao_flight_nano.c \
+ ao_kalman.c \
+ ao_log.c \
+ ao_log_tiny.c \
+ ao_mutex.c \
+ ao_panic.c \
+ ao_report.c \
+ ao_sample.c \
+ ao_stdio.c \
+ ao_storage.c \
+ ao_task.c \
+ ao_telemetry.c
+
+CC1111_SRC = \
+ ao_adc.c \
+ ao_dma.c \
+ ao_intflash.c \
+ ao_led.c \
+ ao_packet.c \
+ ao_packet_slave.c \
+ ao_radio.c \
+ ao_romconfig.c \
+ ao_timer.c \
+ _bp.c
+
+DRIVER_SRC =
+
+PRODUCT_SRC = \
+ ao_telenano.c
+
+SRC = \
+ $(CORE_SRC) \
+ $(CC1111_SRC) \
+ $(DRIVER_SRC) \
+ $(PRODUCT_SRC)
+
+PROG = telenano-v$(TELENANO_VER)-$(VERSION).ihx
+PRODUCT=TeleNano-v$(TELENANO_VER)
+PRODUCT_DEF=-DTELENANO_V_$(TELENANO_DEF)
+IDPRODUCT=0x000a
+CODESIZE=0x6700
+
+include ../cc1111/Makefile.cc1111
+
+NICKLE=nickle
+CHECK_STACK=sh ../util/check-stack
+
+V=0
+# The user has explicitly enabled quiet compilation.
+ifeq ($(V),0)
+quiet = @printf " $1 $2 $@\n"; $($1)
+endif
+# Otherwise, print the full command line.
+quiet ?= $($1)
+
+all: ../$(PROG)
+
+../$(PROG): $(REL) Makefile
+ $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(REL) && cp $(PROG) $(PMAP) ..
+ $(call quiet,CHECK_STACK) ../core/ao.h $(PMEM)
+
+ao_product.h: ao-make-product.5c ../Version
+ $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
+
+distclean: clean
+
+clean:
+ rm -f $(ADB) $(ASM) $(LNK) $(LST) $(REL) $(RST) $(SYM)
+ rm -f $(PROG) $(PCDB) $(PLNK) $(PMAP) $(PMEM) $(PAOM)
+ rm -f ao_product.h
+ rm -f ../$(PROG) ../$(PMAP)
+
+install:
+
+uninstall:
diff --git a/src/ao_telebt.c b/src/product/ao_telebt.c
index 85565172..85565172 100644
--- a/src/ao_telebt.c
+++ b/src/product/ao_telebt.c
diff --git a/src/ao_teledongle.c b/src/product/ao_teledongle.c
index 008b200a..008b200a 100644
--- a/src/ao_teledongle.c
+++ b/src/product/ao_teledongle.c
diff --git a/src/ao_telemetrum.c b/src/product/ao_telemetrum.c
index f560740a..f560740a 100644
--- a/src/ao_telemetrum.c
+++ b/src/product/ao_telemetrum.c
diff --git a/src/ao_telemini.c b/src/product/ao_telemini.c
index fa23de01..fa23de01 100644
--- a/src/ao_telemini.c
+++ b/src/product/ao_telemini.c
diff --git a/src/ao_telenano.c b/src/product/ao_telenano.c
index d91983d0..d91983d0 100644
--- a/src/ao_telenano.c
+++ b/src/product/ao_telenano.c
diff --git a/src/ao_teleterra.c b/src/product/ao_teleterra.c
index d696b914..d696b914 100644
--- a/src/ao_teleterra.c
+++ b/src/product/ao_teleterra.c
diff --git a/src/ao_test.c b/src/product/ao_test.c
index 14c2eb75..14c2eb75 100644
--- a/src/ao_test.c
+++ b/src/product/ao_test.c
diff --git a/src/ao_tidongle.c b/src/product/ao_tidongle.c
index 3b7c2733..3b7c2733 100644
--- a/src/ao_tidongle.c
+++ b/src/product/ao_tidongle.c
diff --git a/src/telebt-v0.0/Makefile b/src/telebt-v0.0/Makefile
index d8867b19..e89639ab 100644
--- a/src/telebt-v0.0/Makefile
+++ b/src/telebt-v0.0/Makefile
@@ -1 +1,9 @@
-include ../Makefile.proto
+#
+# TeleBT v0.0 build
+#
+
+TELEBT_VER=0.0
+TELEBT_DEF=0_0
+
+include ../product/Makefile.telebt
+
diff --git a/src/telebt-v0.0/Makefile.defs b/src/telebt-v0.0/Makefile.defs
deleted file mode 100644
index f0bb5e0c..00000000
--- a/src/telebt-v0.0/Makefile.defs
+++ /dev/null
@@ -1,8 +0,0 @@
-PROG = telebt-v0.0-$(VERSION).ihx
-
-SRC = \
- $(TBT_BASE_SRC)
-
-PRODUCT=TeleBT-v0.0
-PRODUCT_DEF=-DTELEBT_V_0_0
-IDPRODUCT=0x000e
diff --git a/src/telebt-v0.1/Makefile b/src/telebt-v0.1/Makefile
index d8867b19..a34e8912 100644
--- a/src/telebt-v0.1/Makefile
+++ b/src/telebt-v0.1/Makefile
@@ -1 +1,19 @@
-include ../Makefile.proto
+#
+# TeleBT v0.1 build
+#
+
+TELEBT_VER=0.1
+TELEBT_DEF=0_1
+
+TELEBT_INC = \
+ ao_25lc1024.h
+
+TELEBT_SRC = \
+ ao_beep.c \
+ ao_log_telem.c \
+ ao_spi.c \
+ ao_storage.c \
+ ao_m25.c
+
+include ../product/Makefile.telebt
+
diff --git a/src/telebt-v0.1/Makefile.defs b/src/telebt-v0.1/Makefile.defs
deleted file mode 100644
index 50657c83..00000000
--- a/src/telebt-v0.1/Makefile.defs
+++ /dev/null
@@ -1,8 +0,0 @@
-PROG = telebt-v0.1-$(VERSION).ihx
-
-SRC = \
- $(TBT_V_0_1_SRC)
-
-PRODUCT=TeleBT-v0.1
-PRODUCT_DEF=-DTELEBT_V_0_1
-IDPRODUCT=0x000e
diff --git a/src/teledongle-v0.1/Makefile b/src/teledongle-v0.1/Makefile
index d8867b19..48425107 100644
--- a/src/teledongle-v0.1/Makefile
+++ b/src/teledongle-v0.1/Makefile
@@ -1 +1,8 @@
-include ../Makefile.proto
+#
+# TeleDongle v0.2 build
+#
+
+TD_VER=0.1
+TD_DEF=0_1
+
+include ../product/Makefile.teledongle
diff --git a/src/teledongle-v0.1/Makefile.defs b/src/teledongle-v0.1/Makefile.defs
deleted file mode 100644
index ceb80b7a..00000000
--- a/src/teledongle-v0.1/Makefile.defs
+++ /dev/null
@@ -1,9 +0,0 @@
-PROG = teledongle-v0.1-$(VERSION).ihx
-
-SRC = \
- $(TD_SRC) \
- $(DBG_SRC)
-
-PRODUCT=TeleDongle-v0.1
-PRODUCT_DEF=-DTELEDONGLE_V_0_1
-IDPRODUCT=0x000c
diff --git a/src/teledongle-v0.2/Makefile b/src/teledongle-v0.2/Makefile
index d8867b19..ce4ab437 100644
--- a/src/teledongle-v0.2/Makefile
+++ b/src/teledongle-v0.2/Makefile
@@ -1 +1,8 @@
-include ../Makefile.proto
+#
+# TeleDongle v0.2 build
+#
+
+TD_VER=0.2
+TD_DEF=0_2
+
+include ../product/Makefile.teledongle \ No newline at end of file
diff --git a/src/teledongle-v0.2/Makefile.defs b/src/teledongle-v0.2/Makefile.defs
deleted file mode 100644
index ea9713b6..00000000
--- a/src/teledongle-v0.2/Makefile.defs
+++ /dev/null
@@ -1,9 +0,0 @@
-PROG = teledongle-v0.2-$(VERSION).ihx
-
-SRC = \
- $(TD_SRC) \
- $(DBG_SRC)
-
-PRODUCT=TeleDongle-v0.2
-PRODUCT_DEF=-DTELEDONGLE_V_0_2
-IDPRODUCT=0x000c
diff --git a/src/telemetrum-v0.1-sirf/Makefile b/src/telemetrum-v0.1-sirf/Makefile
index d8867b19..00cdc9c5 100644
--- a/src/telemetrum-v0.1-sirf/Makefile
+++ b/src/telemetrum-v0.1-sirf/Makefile
@@ -1 +1,16 @@
-include ../Makefile.proto
+#
+# TeleMetrum v0.1 with SkyTraq GPS build
+#
+
+TM_VER=0.1
+TM_DEF=0_1
+
+TM_INC = \
+ ao_25lc1024.h
+
+TM_SRC = \
+ ao_gps_sirf.c \
+ ao_25lc1024.c
+
+include ../product/Makefile.telemetrum
+
diff --git a/src/telemetrum-v0.1-sirf/Makefile.defs b/src/telemetrum-v0.1-sirf/Makefile.defs
deleted file mode 100644
index ac8dcdb9..00000000
--- a/src/telemetrum-v0.1-sirf/Makefile.defs
+++ /dev/null
@@ -1,12 +0,0 @@
-PROG = telemetrum-v0.1-sirf-$(VERSION).ihx
-
-SRC = \
- $(TM_BASE_SRC) \
- $(SPI_DRIVER_SRC) \
- $(EE_DRIVER_SRC) \
- $(SIRF_DRIVER_SRC) \
- $(DBG_SRC)
-
-PRODUCT=TeleMetrum-v0.1-SiRF
-PRODUCT_DEF=-DTELEMETRUM_V_0_1
-IDPRODUCT=0x000b
diff --git a/src/telemetrum-v0.1-sky/Makefile b/src/telemetrum-v0.1-sky/Makefile
index d8867b19..e3c61db6 100644
--- a/src/telemetrum-v0.1-sky/Makefile
+++ b/src/telemetrum-v0.1-sky/Makefile
@@ -1 +1,16 @@
-include ../Makefile.proto
+#
+# TeleMetrum v0.1 with SkyTraq GPS build
+#
+
+TM_VER=0.1
+TM_DEF=0_1
+
+TM_INC = \
+ ao_25lc1024.h
+
+TM_SRC = \
+ ao_gps_skytraq.c \
+ ao_25lc1024.c
+
+include ../product/Makefile.telemetrum
+
diff --git a/src/telemetrum-v0.1-sky/Makefile.defs b/src/telemetrum-v0.1-sky/Makefile.defs
deleted file mode 100644
index e032d1eb..00000000
--- a/src/telemetrum-v0.1-sky/Makefile.defs
+++ /dev/null
@@ -1,12 +0,0 @@
-PROG = telemetrum-v0.1-sky-$(VERSION).ihx
-
-SRC = \
- $(TM_BASE_SRC) \
- $(SPI_DRIVER_SRC) \
- $(EE_DRIVER_SRC) \
- $(SKY_DRIVER_SRC) \
- $(DBG_SRC)
-
-PRODUCT=TeleMetrum-v0.1
-PRODUCT_DEF=-DTELEMETRUM_V_0_1
-IDPRODUCT=0x000b
diff --git a/src/telemetrum-v1.0/Makefile b/src/telemetrum-v1.0/Makefile
index d8867b19..4aae84c8 100644
--- a/src/telemetrum-v1.0/Makefile
+++ b/src/telemetrum-v1.0/Makefile
@@ -1 +1,16 @@
-include ../Makefile.proto
+#
+# TeleMetrum v1.0 build
+#
+
+TM_VER=1.0
+TM_DEF=1_0
+
+TM_INC = \
+ ao_at45db161d.h
+
+TM_SRC = \
+ ao_companion.c \
+ ao_gps_skytraq.c \
+ ao_at45db161d.c
+
+include ../product/Makefile.telemetrum
diff --git a/src/telemetrum-v1.0/Makefile.defs b/src/telemetrum-v1.0/Makefile.defs
deleted file mode 100644
index 5eefc392..00000000
--- a/src/telemetrum-v1.0/Makefile.defs
+++ /dev/null
@@ -1,13 +0,0 @@
-PROG = telemetrum-v1.0-$(VERSION).ihx
-
-SRC = \
- $(TM_BASE_SRC) \
- $(SPI_DRIVER_SRC) \
- $(FLASH_DRIVER_SRC) \
- $(SKY_DRIVER_SRC) \
- $(COMPANION_SRC) \
- $(DBG_SRC)
-
-PRODUCT=TeleMetrum-v1.0
-PRODUCT_DEF=-DTELEMETRUM_V_1_0
-IDPRODUCT=0x000b
diff --git a/src/telemetrum-v1.1/Makefile b/src/telemetrum-v1.1/Makefile
index d8867b19..4bea03db 100644
--- a/src/telemetrum-v1.1/Makefile
+++ b/src/telemetrum-v1.1/Makefile
@@ -1 +1,16 @@
-include ../Makefile.proto
+#
+# AltOS build
+#
+#
+
+TM_VER=1.1
+TM_DEF=1_1
+
+TM_INC =
+
+TM_SRC = \
+ ao_companion.c \
+ ao_gps_skytraq.c \
+ ao_m25.c
+
+include ../product/Makefile.telemetrum
diff --git a/src/telemetrum-v1.1/Makefile.defs b/src/telemetrum-v1.1/Makefile.defs
deleted file mode 100644
index 3c8b8793..00000000
--- a/src/telemetrum-v1.1/Makefile.defs
+++ /dev/null
@@ -1,13 +0,0 @@
-PROG = telemetrum-v1.1-$(VERSION).ihx
-
-SRC = \
- $(TM_BASE_SRC) \
- $(SPI_DRIVER_SRC) \
- $(M25_DRIVER_SRC) \
- $(SKY_DRIVER_SRC) \
- $(COMPANION_SRC) \
- $(DBG_SRC)
-
-PRODUCT=TeleMetrum-v1.1
-PRODUCT_DEF=-DTELEMETRUM_V_1_1
-IDPRODUCT=0x000b
diff --git a/src/telemini-v1.0/Makefile b/src/telemini-v1.0/Makefile
index d8867b19..4f1c8b51 100644
--- a/src/telemini-v1.0/Makefile
+++ b/src/telemini-v1.0/Makefile
@@ -1 +1,8 @@
-include ../Makefile.proto
+#
+# TeleMini build file
+#
+
+TELEMINI_VER=1.0
+TELEMINI_DEF=1_0
+
+include ../product/Makefile.telemini
diff --git a/src/telemini-v1.0/Makefile.defs b/src/telemini-v1.0/Makefile.defs
deleted file mode 100644
index 0e91f2fc..00000000
--- a/src/telemini-v1.0/Makefile.defs
+++ /dev/null
@@ -1,9 +0,0 @@
-PROG = telemini-v1.0-$(VERSION).ihx
-
-SRC = \
- $(TMINI_BASE_SRC)
-
-PRODUCT=TeleMini-v1.0
-PRODUCT_DEF=-DTELEMINI_V_1_0
-IDPRODUCT=0x000a
-CODESIZE=0x6700
diff --git a/src/telenano-v0.1/Makefile b/src/telenano-v0.1/Makefile
index d8867b19..2714c1e9 100644
--- a/src/telenano-v0.1/Makefile
+++ b/src/telenano-v0.1/Makefile
@@ -1 +1,9 @@
-include ../Makefile.proto
+#
+# TeleNano build file
+#
+
+TELENANO_VER=0.1
+TELENANO_DEF=0_1
+
+include ../product/Makefile.telenano
+
diff --git a/src/telenano-v0.1/Makefile.defs b/src/telenano-v0.1/Makefile.defs
deleted file mode 100644
index 34cf69d1..00000000
--- a/src/telenano-v0.1/Makefile.defs
+++ /dev/null
@@ -1,9 +0,0 @@
-PROG = telenano-v0.1-$(VERSION).ihx
-
-SRC = \
- $(TNANO_BASE_SRC)
-
-PRODUCT=TeleNano-v0.1
-PRODUCT_DEF=-DTELENANO_V_0_1
-IDPRODUCT=0x000a
-CODESIZE=0x6700
diff --git a/src/test/Makefile b/src/test/Makefile
index 33203ffd..333850e4 100644
--- a/src/test/Makefile
+++ b/src/test/Makefile
@@ -1,9 +1,8 @@
-vpath % ..
-vpath % ../kalman
+vpath % ..:../core:../drivers
PROGS=ao_flight_test ao_flight_test_baro ao_flight_test_accel ao_gps_test ao_gps_test_skytraq ao_convert_test
-CFLAGS=-I.. -I.
+CFLAGS=-I.. -I. -I../core -I../drivers -O0 -g
all: $(PROGS)
@@ -13,22 +12,19 @@ clean:
install:
ao_flight_test: ao_flight_test.c ao_host.h ao_flight.c ao_sample.c ao_kalman.c altitude.h ao_kalman.h
- cc -g -o $@ $<
+ cc $(CFLAGS) -o $@ $<
ao_flight_test_baro: ao_flight_test.c ao_host.h ao_flight.c ao_sample.c ao_kalman.c altitude.h ao_kalman.h
- cc -g -o $@ -DHAS_ACCEL=0 ../ao_flight_test.c
+ cc $(CFLAGS) -o $@ -DHAS_ACCEL=0 ao_flight_test.c
ao_flight_test_accel: ao_flight_test.c ao_host.h ao_flight.c ao_sample.c ao_kalman.c altitude.h ao_kalman.h
- cc -g -o $@ -DFORCE_ACCEL=1 ../ao_flight_test.c
+ cc $(CFLAGS) -o $@ -DFORCE_ACCEL=1 ao_flight_test.c
ao_gps_test: ao_gps_test.c ao_gps_sirf.c ao_gps_print.c ao_host.h
- cc -g -o $@ $<
+ cc $(CFLAGS) -o $@ $<
ao_gps_test_skytraq: ao_gps_test_skytraq.c ao_gps_skytraq.c ao_gps_print.c ao_host.h
- cc -g -o $@ $<
+ cc $(CFLAGS) -o $@ $<
ao_convert_test: ao_convert_test.c ao_convert.c altitude.h
- cc -g -o $@ $<
-
-../ao_kalman.h: make-kalman kalman.5c kalman_filter.5c load_csv.5c matrix.5c
- sh $< > $@
+ cc $(CFLAGS) -o $@ $<
diff --git a/src/ao_flight_test.c b/src/test/ao_flight_test.c
index 56733c89..56733c89 100644
--- a/src/ao_flight_test.c
+++ b/src/test/ao_flight_test.c
diff --git a/src/ao_gps_test.c b/src/test/ao_gps_test.c
index 93d7a9ab..93d7a9ab 100644
--- a/src/ao_gps_test.c
+++ b/src/test/ao_gps_test.c
diff --git a/src/ao_gps_test_skytraq.c b/src/test/ao_gps_test_skytraq.c
index a78fae0f..a78fae0f 100644
--- a/src/ao_gps_test_skytraq.c
+++ b/src/test/ao_gps_test_skytraq.c
diff --git a/src/tidongle/Makefile b/src/tidongle/Makefile
index d8867b19..fc8df1f4 100644
--- a/src/tidongle/Makefile
+++ b/src/tidongle/Makefile
@@ -1 +1,92 @@
-include ../Makefile.proto
+#
+# TIDongle build file
+#
+
+vpath %.c ..:../core:../cc1111:../drivers:../product
+vpath %.h ..:../core:../cc1111:../drivers:../product
+vpath ao-make-product.5c ../util
+
+ifndef VERSION
+include ../Version
+endif
+
+INC = \
+ ao.h \
+ ao_pins.h \
+ cc1111.h \
+ ao_product.h
+
+CORE_SRC = \
+ ao_cmd.c \
+ ao_config.c \
+ ao_gps_print.c \
+ ao_monitor.c \
+ ao_mutex.c \
+ ao_panic.c \
+ ao_rssi.c \
+ ao_state.c \
+ ao_stdio.c \
+ ao_task.c
+
+CC1111_SRC = \
+ ao_dbg.c \
+ ao_dma.c \
+ ao_led.c \
+ ao_packet.c \
+ ao_packet_master.c \
+ ao_radio.c \
+ ao_romconfig.c \
+ ao_timer.c \
+ ao_usb.c \
+ _bp.c
+
+DRIVER_SRC =
+
+PRODUCT_SRC = \
+ ao_tidongle.c
+
+SRC = \
+ $(CORE_SRC) \
+ $(CC1111_SRC) \
+ $(DRIVER_SRC) \
+ $(PRODUCT_SRC)
+
+PROG = tidongle-$(VERSION).ihx
+PRODUCT=TIDongle
+PRODUCT_DEF=-DTIDONGLE
+IDPRODUCT=0x000a
+
+include ../cc1111/Makefile.cc1111
+
+NICKLE=nickle
+CHECK_STACK=sh ../util/check-stack
+
+V=0
+# The user has explicitly enabled quiet compilation.
+ifeq ($(V),0)
+quiet = @printf " $1 $2 $@\n"; $($1)
+endif
+# Otherwise, print the full command line.
+quiet ?= $($1)
+
+all: ../$(PROG)
+
+../$(PROG): $(REL) Makefile
+ $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(REL) && cp $(PROG) $(PMAP) ..
+ $(call quiet,CHECK_STACK) ../core/ao.h $(PMEM)
+
+ao_product.h: ao-make-product.5c ../Version
+ $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
+
+distclean: clean
+
+clean:
+ rm -f $(ADB) $(ASM) $(LNK) $(LST) $(REL) $(RST) $(SYM)
+ rm -f $(PROG) $(PCDB) $(PLNK) $(PMAP) $(PMEM) $(PAOM)
+ rm -f ao_product.h
+ rm -f ../$(PROG) ../$(PMAP)
+
+install:
+
+uninstall:
+
diff --git a/src/tidongle/Makefile.defs b/src/tidongle/Makefile.defs
deleted file mode 100644
index 0e13cb20..00000000
--- a/src/tidongle/Makefile.defs
+++ /dev/null
@@ -1,9 +0,0 @@
-PROG = tidongle-$(VERSION).ihx
-
-SRC = \
- $(TI_SRC)
-
-PRODUCT=TIDongle
-
-PRODUCT_DEF=-DTIDONGLE
-IDPRODUCT=0x000a
diff --git a/src/ao-make-product.5c b/src/util/ao-make-product.5c
index 5f2eb8e8..5f2eb8e8 100644
--- a/src/ao-make-product.5c
+++ b/src/util/ao-make-product.5c
diff --git a/src/check-stack b/src/util/check-stack
index 1e8044e0..1e8044e0 100755
--- a/src/check-stack
+++ b/src/util/check-stack
diff --git a/src/gps-cksum b/src/util/gps-cksum
index a08153bf..a08153bf 100755
--- a/src/gps-cksum
+++ b/src/util/gps-cksum
diff --git a/src/make-altitude b/src/util/make-altitude
index 716aa8a8..716aa8a8 100644
--- a/src/make-altitude
+++ b/src/util/make-altitude
diff --git a/src/make-kalman b/src/util/make-kalman
index 9ac35134..f78f30a9 100644
--- a/src/make-kalman
+++ b/src/util/make-kalman
@@ -1,6 +1,6 @@
#!/bin/sh
-cd ../kalman
+cd $1 >&/dev/null
SIGMA_BOTH="-M 2 -H 6 -A 2"
SIGMA_BARO="-M 2 -H 6 -A 2"
diff --git a/src/sirf-cksum b/src/util/sirf-cksum
index b905f318..b905f318 100755
--- a/src/sirf-cksum
+++ b/src/util/sirf-cksum
diff --git a/src/skytraq-cksum b/src/util/skytraq-cksum
index ab0464a7..ab0464a7 100644
--- a/src/skytraq-cksum
+++ b/src/util/skytraq-cksum