src/easymega-v1.0/easymega-v1.0-$(VERSION).ihx \
src/easymega-v2.0/easymega-v2.0-$(VERSION).ihx \
src/easymini-v1.0/easymini-v1.0-$(VERSION).ihx \
- src/easymotor-v2/easymotor-v2-$(VERSION).ihx \
+ src/easymini-v2.0/easymini-v2.0-$(VERSION).ihx \
+ src/easymini-v3.0/easymini-v3.0-$(VERSION).ihx \
+ src/easymotor-v3/easymotor-v3-$(VERSION).ihx \
src/easytimer-v1/easytimer-v1-$(VERSION).ihx \
src/telebt-v3.0/telebt-v3.0-$(VERSION).ihx \
src/telebt-v4.0/telebt-v4.0-$(VERSION).ihx \
gcc-i686-linux-gnu gcc-aarch64-linux-gnu \
gcc-arm-linux-gnueabi gcc-arm-linux-gnueabihf
+ - make sure jsign is installed so we can sign Windows installers
+
- make sure ~/web/altusmetrum has no pending pullable commits
git checkout master
cp src/chaoskey-v1.0/{*.elf,*.ihx,*.bin,*.map} \
src/easymega-v[1-2].0/{*.elf,*.ihx,*.map} \
- src/easymini-v[1-2].0/{*.elf,*.ihx,*.map} \
- src/easymotor-v2/{*.elf,*.ihx,*.map} \
+ src/easymini-v[1-3].0/{*.elf,*.ihx,*.map} \
+ src/easymotor-v3/{*.elf,*.ihx,*.map} \
src/easytimer-v1/{*.elf,*.ihx,*.map} \
src/telebt-v[3-4].0/{*.elf,*.ihx,*.map} \
src/teledongle-v3.0/{*.elf,*.ihx,*.map} \
return true;
if (product.startsWith("EasyMotor-v2"))
return true;
+ if (product.startsWith("EasyMotor-v3"))
+ return true;
}
throw new AltosUnknownProduct(product);
}
return AltosAdxl375.X_AXIS;
if (product.startsWith("EasyMotor-v2"))
return AltosAdxl375.X_AXIS;
+ if (product.startsWith("EasyMotor-v3"))
+ return AltosAdxl375.X_AXIS;
}
throw new AltosUnknownProduct(product);
return (voltage - base) / (max - base) * full_scale_pressure;
}
+ static double easy_motor_3_adc(double raw) {
+ return raw / 32767.0;
+ }
+
+ static double easy_motor_3_voltage(int sensor) {
+ double supply = 3.3;
+
+ return easy_motor_3_adc(sensor) * supply * 15.6 / 10.0;
+ }
+
static double easy_motor_2_motor_pressure(int sensor, double ground_sensor) {
double supply = 3.3;
double ground_voltage = easy_mini_2_adc(ground_sensor) * supply * 15.6 / 10.0;
return motor_pressure(voltage) - motor_pressure(ground_voltage);
}
+ static double easy_motor_3_motor_pressure(int sensor, double ground_sensor) {
+ double supply = 3.3;
+ double ground_voltage = easy_motor_3_adc(ground_sensor) * supply * 15.6 / 10.0;
+ double voltage = easy_motor_3_adc(sensor) * supply * 15.6 / 10.0;
+
+ return motor_pressure(voltage) - motor_pressure(ground_voltage);
+ }
+
public static double radio_to_frequency(int freq, int setting, int cal, int channel) {
double f;
public void set_log_format(int log_format) {
cal_data().set_log_format(log_format);
+ if (cal_data().device_type == AltosLib.MISSING)
+ cal_data().set_device_type(AltosLib.product_id_from_log_format(log_format));
switch (log_format) {
case AltosLib.AO_LOG_FORMAT_TELEGPS:
set_state(AltosLib.ao_flight_stateless);
case AltosLib.AO_LOG_SENSOR:
AltosConfigData config_data = eeprom.config_data();
- listener.set_battery_voltage(AltosConvert.easy_mini_2_voltage(v_batt()));
- double pa = AltosConvert.easy_motor_2_motor_pressure(motor_pres(), cal_data.ground_motor_pressure);
+ listener.set_battery_voltage(AltosConvert.easy_motor_3_voltage(v_batt()));
+ double pa = AltosConvert.easy_motor_3_motor_pressure(motor_pres(), cal_data.ground_motor_pressure);
listener.set_motor_pressure(pa);
int accel_along = accel_along();
}
}
+ public static int product_id_from_log_format(int log_format) {
+ switch (log_format){
+ case AO_LOG_FORMAT_UNKNOWN:
+ return product_altusmetrum;
+ case AO_LOG_FORMAT_FULL:
+ return product_telemetrum;
+ case AO_LOG_FORMAT_TINY:
+ return product_telemini;
+ case AO_LOG_FORMAT_TELEMETRY:
+ return product_altusmetrum;
+ case AO_LOG_FORMAT_TELESCIENCE:
+ return product_telescience;
+ case AO_LOG_FORMAT_TELEMEGA_OLD:
+ return product_telemega;
+ case AO_LOG_FORMAT_EASYMINI1:
+ return product_easymini;
+ case AO_LOG_FORMAT_TELEMETRUM:
+ return product_telemetrum;
+ case AO_LOG_FORMAT_TELEMINI2:
+ return product_telemini;
+ case AO_LOG_FORMAT_TELEGPS:
+ return product_telegps;
+ case AO_LOG_FORMAT_TELEMEGA:
+ return product_telemega;
+ case AO_LOG_FORMAT_DETHERM:
+ return product_altusmetrum;
+ case AO_LOG_FORMAT_TELEMINI3:
+ return product_telemini;
+ case AO_LOG_FORMAT_TELEFIRETWO:
+ return product_altusmetrum;
+ case AO_LOG_FORMAT_EASYMINI2:
+ return product_easymini;
+ case AO_LOG_FORMAT_TELEMEGA_3:
+ return product_telemega;
+ case AO_LOG_FORMAT_EASYMEGA_2:
+ return product_easymega;
+ case AO_LOG_FORMAT_TELESTATIC:
+ return product_altusmetrum;
+ case AO_LOG_FORMAT_MICROPEAK2:
+ return product_altusmetrum;
+ case AO_LOG_FORMAT_TELEMEGA_4:
+ return product_telemega;
+ case AO_LOG_FORMAT_EASYMOTOR:
+ return product_easymotor;
+ case AO_LOG_FORMAT_TELEMEGA_5:
+ return product_telemega;
+ case AO_LOG_FORMAT_NONE:
+ return product_altusmetrum;
+ default:
+ return product_altusmetrum;
+ }
+ }
+
public static String igniter_name(int i) {
return String.format("Igniter %c", 'A' + i);
}
+# location of code signing key, et al
JAVAROOT=classes
AM_JAVACFLAGS=$(JAVAC_VERSION_FLAGS) -encoding UTF-8 -Xlint:deprecation -Xlint:unchecked
FIRMWARE_EMINI_1_0=$(top_srcdir)/src/easymini-v1.0/easymini-v1.0-$(VERSION).ihx
FIRMWARE_EMINI_2_0=$(top_srcdir)/src/easymini-v2.0/easymini-v2.0-$(VERSION).ihx
-FIRMWARE_EMINI=$(FIRMWARE_EMINI_1_0) $(FIRMWARE_EMINI_2_0)
+FIRMWARE_EMINI_3_0=$(top_srcdir)/src/easymini-v3.0/easymini-v3.0-$(VERSION).ihx
+FIRMWARE_EMINI=$(FIRMWARE_EMINI_1_0) $(FIRMWARE_EMINI_2_0) $(FIRMWARE_EMINI_3_0)
FIRMWARE_EMEGA_1_0=$(top_srcdir)/src/easymega-v1.0/easymega-v1.0-$(VERSION).ihx
FIRMWARE_EMEGA_2_0=$(top_srcdir)/src/easymega-v2.0/easymega-v2.0-$(VERSION).ihx
FIRMWARE_EMEGA=$(FIRMWARE_EMEGA_1_0) $(FIRMWARE_EMEGA_2_0)
-FIRMWARE_EMOTOR_2=$(top_srcdir)/src/easymotor-v2/easymotor-v2-$(VERSION).ihx
-FIRMWARE_EMOTOR=$(FIRMWARE_EMOTOR_2)
+FIRMWARE_EMOTOR_3=$(top_srcdir)/src/easymotor-v3/easymotor-v3-$(VERSION).ihx
+FIRMWARE_EMOTOR=$(FIRMWARE_EMOTOR_3)
FIRMWARE_ETIMER_1=$(top_srcdir)/src/easytimer-v1/easytimer-v1-$(VERSION).ihx
FIRMWARE_ETIMER=$(FIRMWARE_ETIMER_1)
ALTUSMETRUM_DOC=$(top_srcdir)/doc/altusmetrum.pdf
ALTOS_DOC=$(top_srcdir)/doc/altos.pdf
TELEMETRY_DOC=$(top_srcdir)/doc/telemetry.pdf
+MOTORTEST_DOC=$(top_srcdir)/doc/motortest.pdf
TEMPLATE_DOC=\
$(top_srcdir)/doc/telemetrum-outline.pdf \
$(top_srcdir)/doc/easymini-outline.pdf \
$(top_srcdir)/doc/telemini-v1-outline.pdf \
$(top_srcdir)/doc/telemini-v3-outline.pdf
-DOC=$(ALTUSMETRUM_DOC) $(ALTOS_DOC) $(TELEMETRY_DOC) $(TEMPLATE_DOC)
+DOC=$(ALTUSMETRUM_DOC) $(ALTOS_DOC) $(TELEMETRY_DOC) $(MOTORTEST_DOC) $(TEMPLATE_DOC)
# Distribution targets
LINUX_DIST=Altos-Linux-$(VERSION).tar.bz2
$(WINDOWS_DIST): $(WINDOWS_FILES) altos-windows.nsi Instdrv/NSIS/Includes/java.nsh
-rm -f $@
makensis -Oaltos-windows.log "-XOutFile $@" "-DVERSION=$(VERSION)" altos-windows.nsi || (cat altos-windows.log && exit 1)
+ if [ "$(HAVE_WINDOWS_KEY)" = "yes" ]; then \
+ jsign --keystore "$(WINDOWSKEYFILE)" --alias 1 \
+ --storetype PKCS12 --storepass `cat "$(WINDOWSKEYPASSFILE)"` \
+ --tsaurl http://ts.ssl.com --tsmode RFC3161 $@ ; \
+ fi
File "../src/telemega-v5.0/telemega-v5.0-${VERSION}.ihx"
File "../src/easymini-v1.0/easymini-v1.0-${VERSION}.ihx"
File "../src/easymini-v2.0/easymini-v2.0-${VERSION}.ihx"
+ File "../src/easymini-v3.0/easymini-v3.0-${VERSION}.ihx"
File "../src/easymega-v1.0/easymega-v1.0-${VERSION}.ihx"
File "../src/easymega-v2.0/easymega-v2.0-${VERSION}.ihx"
- File "../src/easymotor-v2/easymotor-v2-${VERSION}.ihx"
+ File "../src/easymotor-v3/easymotor-v3-${VERSION}.ihx"
File "../src/easytimer-v1/easytimer-v1-${VERSION}.ihx"
File "../src/telelco-v2.0/telelco-v2.0-${VERSION}.ihx"
File "../src/telefireeight-v1.0/telefireeight-v1.0-${VERSION}.ihx"
File "../doc/altusmetrum.pdf"
File "../doc/altos.pdf"
File "../doc/telemetry.pdf"
+ File "../doc/motortest.pdf"
File "../doc/telemetrum-outline.pdf"
File "../doc/telemega-outline.pdf"
File "../doc/easymini-outline.pdf"
AltosUIFlightSeries flight_series;
+ boolean enable_axis(int product_id, String label) {
+ switch (product_id) {
+ case AltosLib.product_easymotor:
+ return(label.equals(AltosUIFlightSeries.motor_pressure_name) ||
+ label.equals(AltosUIFlightSeries.accel_name));
+ default:
+ return true;
+ }
+ }
+
AltosUITimeSeries[] setup(AltosFlightStats stats, AltosUIFlightSeries flight_series) {
AltosCalData cal_data = flight_series.cal_data();
+ int product_id = cal_data.device_type;
AltosUIAxis height_axis, speed_axis, accel_axis, voltage_axis, temperature_axis, nsat_axis, dbm_axis;
AltosUIAxis pressure_axis, thrust_axis;
flight_series.register_marker(AltosUIFlightSeries.state_name,
state_color,
- true,
+ enable_axis(product_id, AltosUIFlightSeries.state_name),
plot,
true);
flight_series.register_axis(AltosUIFlightSeries.accel_name,
accel_color,
- true,
+ enable_axis(product_id, AltosUIFlightSeries.accel_name),
accel_axis);
flight_series.register_axis(AltosUIFlightSeries.vert_accel_name,
vert_accel_color,
- true,
+ enable_axis(product_id, AltosUIFlightSeries.vert_accel_name),
accel_axis);
flight_series.register_axis(AltosUIFlightSeries.kalman_accel_name,
flight_series.register_axis(AltosUIFlightSeries.speed_name,
speed_color,
- true,
+ enable_axis(product_id, AltosUIFlightSeries.speed_name),
speed_axis);
flight_series.register_axis(AltosUIFlightSeries.kalman_speed_name,
kalman_speed_color,
- true,
+ enable_axis(product_id, AltosUIFlightSeries.kalman_speed_name),
speed_axis);
flight_series.register_axis(AltosUIFlightSeries.pressure_name,
flight_series.register_axis(AltosUIFlightSeries.height_name,
height_color,
- true,
+ enable_axis(product_id, AltosUIFlightSeries.height_name),
height_axis);
flight_series.register_axis(AltosUIFlightSeries.altitude_name,
flight_series.register_axis(AltosUIFlightSeries.thrust_name,
accel_color,
- true,
+ enable_axis(product_id, AltosUIFlightSeries.thrust_name),
thrust_axis);
for (int channel = 0; channel < 8; channel++) {
flight_series.register_axis(AltosUIFlightSeries.motor_pressure_name,
motor_pressure_color,
- true,
+ enable_axis(product_id, AltosUIFlightSeries.motor_pressure_name),
motor_pressure_axis);
flight_series.check_axes();
flush_preferences();
AltosUILib.set_fonts(font_size);
for (AltosFontListener l : font_listeners) {
- System.out.printf("notifying %s of font size change\n", l);
l.font_size_changed(font_size);
}
- System.out.printf("all fonts changed\n");
}
}
public static void register_font_listener(AltosFontListener l) {
- System.out.printf("register font listener\n");
synchronized (backend) {
font_listeners.add(l);
}
}
public static void unregister_font_listener(AltosFontListener l) {
- System.out.printf("unregister font listener\n");
synchronized (backend) {
font_listeners.remove(l);
}
}
static void
-ao_pressure(int16_t value, int16_t max_adc, double ref, double r1, double r2)
+ao_pressure(int16_t value, int16_t max_adc, double ref, double r1, double r2, double sensor_range)
{
printf(" pressure %5d", value);
if (r1 && r2 && ref) {
if (volts < 0.5) volts = 0.5;
if (volts > 4.5) volts = 4.5;
- double psi = (volts - 0.5) / 4.0 * 2500.0;
+ double psi = (volts - 0.5) / 4.0 * sensor_range;
double pa = psi_to_pa(psi);
printf(" %9.3f kPa", pa / 1000.0);
}
double sense_r1 = 0.0, sense_r2 = 0.0;
double batt_r1 = 0.0, batt_r2 = 0.0;
double adc_ref = 0.0;
+ double pressure_sensor = 0.0;
int16_t max_adc = 0;
switch (eeprom->log_format) {
break;
case AO_LOG_FORMAT_TELEFIRETWO:
len = 32;
+ pressure_sensor = 2500.0;
max_adc = 4095;
adc_ref = 3.3;
sense_r1 = batt_r1 = 5600;
break;
case AO_LOG_FORMAT_TELEMEGA_4:
len = 32;
- break;
max_adc= 4095;
adc_ref = 3.3;
batt_r1 = 5600;
sense_r1 = 100e3;
sense_r2 = 27e3;
break;
+ case AO_LOG_FORMAT_EASYMOTOR:
+ len = 16;
+ max_adc = 32767;
+ adc_ref = 3.3;
+ pressure_sensor = 1600.0;
+ batt_r1 = 5600;
+ batt_r2 = 10000;
+ sense_r1 = 5600;
+ sense_r2 = 10000;
+ break;
}
if (arg_len)
len = arg_len;
struct ao_log_metrum *log_metrum;
struct ao_log_gps *log_gps;
struct ao_log_firetwo *log_firetwo;
+ struct ao_log_motor *log_motor;
if (!csum && !ao_csum_valid(&eeprom->data[pos], len)) {
if (verbose)
case AO_LOG_SENSOR:
ao_pressure(log_firetwo->u.sensor.pressure,
max_adc, adc_ref,
- sense_r1, sense_r2);
+ sense_r1, sense_r2,
+ pressure_sensor);
ao_thrust(log_firetwo->u.sensor.thrust,
max_adc, adc_ref,
sense_r1, sense_r2);
break;
}
break;
+ case AO_LOG_FORMAT_EASYMOTOR:
+ log_motor = (struct ao_log_motor *) &eeprom->data[pos];
+ switch (log_motor->type) {
+ case AO_LOG_FLIGHT:
+ printf(" serial %5u flight %5u ground_accel %6d",
+ eeprom->serial_number,
+ log_motor->u.flight.flight,
+ log_motor->u.flight.ground_accel);
+ printf(" along %6d aross %6d through %6d",
+ log_motor->u.flight.ground_accel_along,
+ log_motor->u.flight.ground_accel_across,
+ log_motor->u.flight.ground_accel_through);
+ ao_volts("ground pressure",
+ log_motor->u.flight.ground_motor_pressure,
+ max_adc, adc_ref,
+ sense_r1, sense_r2);
+ break;
+ case AO_LOG_STATE:
+ ao_state(log_motor->u.state.state,
+ log_motor->u.state.reason);
+ break;
+ case AO_LOG_SENSOR:
+ ao_volts("pressure",
+ log_motor->u.sensor.pressure,
+ max_adc, adc_ref,
+ sense_r1, sense_r2);
+ ao_volts("v_batt",
+ log_motor->u.sensor.v_batt,
+ max_adc,
+ adc_ref, batt_r1, batt_r2);
+ printf(" accel %6d",
+ log_motor->u.sensor.accel);
+ printf(" along %6d aross %6d through %6d",
+ log_motor->u.sensor.accel_along,
+ log_motor->u.sensor.accel_across,
+ log_motor->u.sensor.accel_through);
+ break;
+ }
+ break;
case AO_LOG_FORMAT_DETHERM:
break;
}
.\"
.TH AO-LOAD 1 "ao-elftohex" ""
.SH NAME
-ao-elftohex \- convert a program to IHX format
+ao-elftohex \- convert programs to IHX format
.SH SYNOPSIS
.B "ao-elftohex"
[\--output-\fIoutput.ihx\fP]
[\--verbose]
-\fIinput.elf\fP
+\fIinput.elf ...\fP
.SH DESCRIPTION
.I ao-elftohex
-reads the specified .elf file and writes out a .ihx version.
+reads the specified .elf files and writes out a .ihx version.
.SH OPTIONS
.TP
\--output=\fIoutput.ihx\fP
.TP
\--verbose
Dumps some debug information.
+.TP
+\--nosym
+Excluded symbol table information from the resulting file. This
+information is a non-standard extension supported by the Altus Metrum
+tools.
.SH AUTHOR
Keith Packard
static const struct option options[] = {
{ .name = "verbose", .has_arg = 1, .val = 'v' },
{ .name = "output", .has_arg = 1, .val = 'o' },
+ { .name = "nosym", .has_arg = 0, .val = 'n' },
{ 0, 0, 0, 0},
};
{
char *input = NULL;
char *output = NULL;
- struct ao_hex_image *image;
- struct ao_sym *file_symbols;
+ struct ao_hex_image *full_image = NULL;
+ struct ao_sym *file_symbols = NULL;
int num_file_symbols;
FILE *file;
int c;
+ int i;
+ int nosym = 0;
- while ((c = getopt_long(argc, argv, "v:o:", options, NULL)) != -1) {
+ while ((c = getopt_long(argc, argv, "nv:o:", options, NULL)) != -1) {
switch (c) {
case 'o':
output = optarg;
case 'v':
ao_verbose = (int) strtol(optarg, NULL, 0);
break;
+ case 'n':
+ nosym = 1;
+ break;
default:
usage(argv[0]);
break;
}
}
- input = argv[optind];
- if (input == NULL)
+ if (optind >= argc)
usage(argv[0]);
- if (ends_with (input, ".ihx"))
- image = ao_hex_load(input, &file_symbols, &num_file_symbols);
- else
- image = ao_load_elf(input, &file_symbols, &num_file_symbols);
+ for (i = optind; i < argc; i++) {
+ struct ao_hex_image *image;
- if (!image)
- usage(argv[0]);
+ input = argv[i];
+
+ free(file_symbols);
+ num_file_symbols = 0;
+ if (ends_with (input, ".ihx"))
+ image = ao_hex_load(input, &file_symbols, &num_file_symbols);
+ else
+ image = ao_load_elf(input, &file_symbols, &num_file_symbols);
+
+ if (!image) {
+ fprintf(stderr, "Failed to load %s\n", input);
+ usage(argv[0]);
+ }
+
+ if (nosym) {
+ free(file_symbols);
+ file_symbols = NULL;
+ num_file_symbols = 0;
+ }
+
+ if (full_image) {
+ full_image = ao_hex_image_cat(full_image, image);
+ if (!full_image) {
+ fprintf(stderr, "Can't merge image %s\n", input);
+ usage(argv[0]);
+ }
+ } else
+ full_image = image;
+ }
if (!output)
file = stdout;
}
}
- if (!ao_hex_save(file, image, file_symbols, num_file_symbols)) {
+ if (!ao_hex_save(file, full_image, file_symbols, num_file_symbols)) {
fprintf(stderr, "%s: failed to write hex file\n", output ? output : "<stdout>");
if (output)
unlink(output);
#define AO_LOG_FORMAT_TELESTATIC 17 /* 32 byte typed telestatic records */
#define AO_LOG_FORMAT_MICROPEAK2 18 /* 2-byte baro values with header */
#define AO_LOG_FORMAT_TELEMEGA_4 19 /* 32 byte typed telemega records with 32 bit gyro cal and Bmx160 */
+#define AO_LOG_FORMAT_EASYMOTOR 20 /* 16 byte typed easymotor records with pressure sensor and adxl375 */
#define AO_LOG_FORMAT_NONE 127 /* No log at all */
enum ao_pyro_flag {
} u;
};
+struct ao_log_motor {
+ char type; /* 0 */
+ uint8_t csum; /* 1 */
+ uint16_t tick; /* 2 */
+ union { /* 4 */
+ /* AO_LOG_FLIGHT */
+ struct {
+ uint16_t flight; /* 4 */
+ int16_t ground_accel; /* 6 */
+ int16_t ground_accel_along; /* 8 */
+ int16_t ground_accel_across; /* 10 */
+ int16_t ground_accel_through; /* 12 */
+ int16_t ground_motor_pressure; /* 14 */
+ } flight; /* 16 */
+ /* AO_LOG_STATE */
+ struct {
+ uint16_t state; /* 4 */
+ uint16_t reason; /* 6 */
+ } state;
+ /* AO_LOG_SENSOR */
+ struct {
+ uint16_t pressure; /* 4 */
+ uint16_t v_batt; /* 6 */
+ int16_t accel; /* 8 */
+ int16_t accel_across; /* 10 */
+ int16_t accel_along; /* 12 */
+ int16_t accel_through; /* 14 */
+ } sensor; /* 16 */
+ } u;
+};
+
struct ao_eeprom {
struct ao_config config;
struct ao_ms5607_prom ms5607_prom;
dnl Process this file with autoconf to create configure.
AC_PREREQ(2.57)
-AC_INIT([altos], 1.9.11)
+AC_INIT([altos], 1.9.12)
ANDROID_VERSION=35
AC_CONFIG_SRCDIR([src/kernel/ao.h])
AM_INIT_AUTOMAKE([foreign dist-bzip2])
AM_MAINTAINER_MODE
-RELEASE_DATE=2022-05-29
+RELEASE_DATE=2022-10-28
AC_SUBST(RELEASE_DATE)
DOC_DATE=`LC_ALL=C date -d $RELEASE_DATE +'%d %b %Y'`
HAVE_GOOGLE_KEY="no"
fi
+AC_ARG_WITH(windows-key, AS_HELP_STRING([--with-windows-key=PATH],
+ [Set the file containing the Windows installer signing key (defaults to ~/altusmetrumllc/ssl.com/altus_metrum,_llc.p12)]),
+ [WINDOWSKEYFILE="$withval"], [WINDOWSKEYFILE=$HOME/altusmetrumllc/ssl.com/altus_metrum,_llc.p12])
+
+AC_ARG_WITH(windows-key-pass, AS_HELP_STRING([--with-windows-key-pass=PATH],
+ [Set the file containing the Windows installer signing key password (defaults to ~/altusmetrumllc/ssl.com/password)]),
+ [WINDOWSKEYPASSFILE="$withval"], [WINDOWSKEYPASSFILE=$HOME/altusmetrumllc/ssl.com/password])
+
+AC_CHECK_PROG(jsign, jsign, "yes", "no")
+
+if test -s "$WINDOWSKEYFILE" -a -s "$WINDOWSKEYPASSFILE" -a "$jsign" = yes; then
+ HAVE_WINDOWS_KEY="yes"
+else
+ HAVE_WINDOWS_KEY="no"
+fi
+
WARN_CFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs"
AC_SUBST(WARN_CFLAGS)
AM_CONDITIONAL(FAKETIME, [test x$FAKETIME = xyes])
AC_SUBST(GOOGLEKEY)
+AC_SUBST(WINDOWSKEYFILE)
+AC_SUBST(WINDOWSKEYPASSFILE)
+AC_SUBST(HAVE_WINDOWS_KEY)
AC_PROG_CC
AC_PROG_INSTALL
echo " jcommon.....................: ${JCOMMON}"
echo " JVM include.................: ${JVM_INCLUDE}"
echo " AltosDroid maps API key.....: ${HAVE_GOOGLE_KEY}"
+echo " Windows installer key.......: ${HAVE_WINDOWS_KEY}"
if test x${ANDROID_SDK} != "xno"; then
echo ""
echo " Android path"
endif
RELNOTES_INC=\
+ release-notes-1.9.12.inc \
release-notes-1.9.11.inc \
release-notes-1.9.10.inc \
release-notes-1.9.9.inc \
NAR #87103, TRA #12201
[verse]
- Keith Packard, KD7SQG
+ Keith Packard, K7WQ
NAR #88757, TRA #12200
[appendix]
== Release Notes
+ :leveloffset: 2
+ include::release-notes-1.9.12.adoc[]
+
+ <<<<
:leveloffset: 2
include::release-notes-1.9.11.adoc[]
NAR #87103, TRA #12201
[verse]
- Keith Packard, KD7SQG
+ Keith Packard, K7WQ
NAR #88757, TRA #12200
== Using MicroPeak
=== Power Switch and Battery
In addition to the circuit board itself, EasyMotor needs
- a power switch and battery to operate. Unlike most other
- Altus Metrum products, EasyMotor does not work with
- single-cell LiPo batteries. That's because commonly
- available inexpensive pressure sensors need 5V, which is
- more than a single-cell LiPo provides. Any battery that
- provides from 6.5 to about 15 volts should work. Good
- choices are the common 9V alkaline battery, or the very
- small and light A23 12V alkaline batteries.
+ a power switch and battery to operate. Like many Altus
+ Metrum products, EasyMotor requires a single-cell LiPo
+ battery, and has an on-board charging circuit. The 5V
+ needed for inexpensive pressure sensors is generated
+ onboard using a switching regulator to boost the voltage.
Because he often mounts EasyMotor to the motor's forward
bulkhead instead of to the airframe itself, Bdale often
by the sensor. Very inexpensive sensors that have a
“1/8 NPT” threaded input, a “Buick-style” 3-pin connector,
and typically ship with a short cable and mating
- connector, are readily available on eBay and AliExpress.
+ connector, are readily available through various vendors
+ including Amazon, eBay, and AliExpress.
To log in-flight chamber pressure, a typical approach
might be to drill a 1/8" sampling hole all the way
NPT” pipe tap. Fill the touch hole with grease, screw in
the pressure sensor, and attach the sensor leads to
EasyMotor.
+
+ If you aren't up for machining closures yourself,
+ link:http://lokiresearch.com[Loki Research] sells
+ 54mm and 75mm "experimental bulkheads" with threaded
+ sensor ports that can be used with snap ring cases.
can always be improved… If you have questions that aren't answered in this
manual, or just need a little help figuring things out, we strongly suggest
joining the Altus Metrum user email list, which you can do by visiting
-https://lists.gag.com/mailman/listinfo/altusmetrum.
+https://lists.gag.com/mailman3.
data 100 times per second throughout the flight.
After flight, AltosUI can be used to download the flight data,
- then export it to a comma separated values (CSV) file. Such a
- file can easily be loaded into a spreadsheet for analysis.
+ view a quick graph of acceleration and pressure with pan and
+ zoom capabilities, then export it to a comma separated values
+ (CSV) file. Such a file can easily be loaded into a spreadsheet
+ for analysis.
--- /dev/null
+= Release Notes for Version 1.9.12
+include::release-head.adoc[]
+:doctype: article
+
+ Version 1.9.12
+
+ == AltOS
+
+ * Add EasyMini v3.0 and EasyMotor v3.0 support
+
+ * Fix TeleMetrum v2.0 configuration. Saving config would
+ crash the board.
+
+ == AltosUI
+
+ * Add EasyMotor log parsing and graphing.
[appendix]
== Release Notes
+ :leveloffset: 2
+ include::release-notes-1.9.12.adoc[]
+
+ <<<<
:leveloffset: 2
include::release-notes-1.9.11.adoc[]
endif::telemini[]
ifdef::easymini[]
- |EasyMini v1.0
- |MS5607 30km (100k')
- |-
- |-
- |-
- |1MB
- |-
- |3.7-12V
-
- |EasyMini v2.0
+ |EasyMini v1.0-v3.0
|MS5607 30km (100k')
|-
|-
endif::easytimer[]
ifdef::easymotor[]
- |EasyMotor v2.0
+ |EasyMotor v3.0
|-
|ADXL375 200g
|-
|-
- |-
+ |8MB
|-
|6.5-15V
endif::easymotor[]
NAR #87103, TRA #12201
[verse]
- Keith Packard, KD7SQG
+ Keith Packard, K7WQ
NAR #88757, TRA #12200
[appendix]
== Release Notes
+ :leveloffset: 2
+ include::release-notes-1.9.12.adoc[]
+
+ <<<<
:leveloffset: 2
include::release-notes-1.9.11.adoc[]
NAR #87103, TRA #12201
[verse]
- Keith Packard, KD7SQG
+ Keith Packard, K7WQ
NAR #88757, TRA #12200
+# location of code signing key, et al
+
JAVAROOT=classes
AM_JAVACFLAGS=$(JAVAC_VERSION_FLAGS) -encoding UTF-8 -Xlint:deprecation -Xlint:unchecked
$(WINDOWS_DIST): $(WINDOWS_FILES) micropeak-windows.nsi
-rm -f $@
makensis -Omicropeak-windows.log "-XOutFile $@" "-DVERSION=$(VERSION)" micropeak-windows.nsi || (cat micropeak-windows.log && exit 1)
+ if [ "$(HAVE_WINDOWS_KEY)" = "yes" ]; then \
+ jsign --keystore "$(WINDOWSKEYFILE)" --alias 1 \
+ --storetype PKCS12 --storepass `cat "$(WINDOWSKEYPASSFILE)"` \
+ --tsaurl http://ts.ssl.com --tsmode RFC3161 $@ ; \
+ fi
Manifest.txt: Makefile
echo 'Main-Class: org.altusmetrum.micropeak.MicroPeak' > $@
ARMM3DIRS=\
easymega-v1.0 easymega-v1.0/flash-loader \
easymega-v2.0 easymega-v2.0/flash-loader \
- easymotor-v2 easymotor-v2/flash-loader \
+ easymotor-v3 easymotor-v3/flash-loader \
easytimer-v1 easytimer-v1/flash-loader \
telemega-v0.1 telemega-v0.1/flash-loader \
telemega-v1.0 telemega-v1.0/flash-loader \
chaoskey-v1.0 chaoskey-v1.0/flash-loader \
telemini-v3.0 telemini-v3.0/flash-loader \
easymini-v2.0 easymini-v2.0/flash-loader \
+ easymini-v3.0 easymini-v3.0/flash-loader \
micropeak-v2.0
AVRDIRS=\
static word32 key[16/4];
static roundkey rkk;
-static word32 iv[16/4];
+static word32 iv[32/4];
void
ao_aes_set_mode(enum ao_aes_mode mode)
#define DEBUG 0
#if DEBUG
-#define PRINTD(l, ...) do { if (DEBUG & (l)) { printf ("\r%5u %s: ", ao_tick_count, __func__); printf(__VA_ARGS__); flush(); } } while(0)
+#define PRINTD(l, ...) do { if (DEBUG & (l)) { printf ("\r%5lu %s: ", ao_tick_count, __func__); printf(__VA_ARGS__); flush(); } } while(0)
#else
#define PRINTD(l,...)
#endif
ao_spi_duplex(d, d, 2, AO_ADXL375_SPI_INDEX);
ao_adxl375_stop();
- PRINTD(DEBUG_LOW, "read %x = %x\n", addr, d);
+ PRINTD(DEBUG_LOW, "read %x = %x\n", addr, d[1]);
return d[1];
}
ao_adxl375_stop();
#if DEBUG & DEBUG_LOW
- d[0] = addr | AO_ADXL375_READ
+ d[0] = addr | AO_ADXL375_READ;
d[1] = 0;
ao_adxl375_start();
ao_spi_duplex(d, d, 2, AO_ADXL375_SPI_INDEX);
#define AO_ADXL375_DATA_FORMAT_SETTINGS(self_test) ( \
AO_ADXL375_DATA_FORMAT_FIXED | \
(self_test << AO_ADXL375_DATA_FORMAT_SELF_TEST) | \
- (AO_ADXL375_DATA_FORMAT_SPI_4_WIRE << AO_ADXL375_DATA_FORMAT_SPI_4_WIRE) | \
+ (AO_ADXL375_DATA_FORMAT_SPI_4_WIRE << AO_ADXL375_DATA_FORMAT_SPI) | \
(0 << AO_ADXL375_DATA_FORMAT_INT_INVERT) | \
(0 << AO_ADXL375_DATA_FORMAT_JUSTIFY))
# define AO_ADXL375_DATA_FORMAT_FIXED 0x0b /* these bits must be set to 1 */
# define AO_ADXL375_DATA_FORMAT_SELF_TEST 7
# define AO_ADXL375_DATA_FORMAT_SPI 6
-# define AO_ADXL375_DATA_FORMAT_SPI_3_WIRE 0
-# define AO_ADXL375_DATA_FORMAT_SPI_4_WIRE 1
+# define AO_ADXL375_DATA_FORMAT_SPI_3_WIRE 1
+# define AO_ADXL375_DATA_FORMAT_SPI_4_WIRE 0
# define AO_ADXL375_DATA_FORMAT_INT_INVERT 5
# define AO_ADXL375_DATA_FORMAT_JUSTIFY 2
#define AO_ADXL375_DATAX0 0x32
PROGNAME=easymini-v1.0
PROG=$(PROGNAME)-$(VERSION).elf
HEX=$(PROGNAME)-$(VERSION).ihx
+FLASH_PROG=flash-loader/$(PROGNAME)-altos-flash-$(VERSION).elf
+BOTH_HEX=$(PROGNAME)-combined-$(VERSION).ihx
SRC=$(ALTOS_SRC) ao_easymini.c
OBJ=$(SRC:.c=.o)
-all: $(PROG) $(HEX)
+all: $(PROG) $(HEX) $(BOTH_HEX)
$(PROG): Makefile $(OBJ) altos.ld
$(call quiet,CC) $(LDFLAGS) -o $(PROG) $(OBJ) $(LIBS)
+$(BOTH_HEX): $(PROG) $(FLASH_PROG)
+ ../../ao-tools/ao-elftohex/ao-elftohex -n --output=$@ $(FLASH_PROG) $(PROG)
+
+$(FLASH_PROG): FRC
+ +cd flash-loader && make
+
+FRC:
+
$(OBJ): $(INC)
load: $(PROG)
/* System clock frequency */
#define AO_LPC_SYSCLK 24000000
+/* Beeper is on pio0_14 ct32b1_mat1 */
+#define BEEPER_PORT 0
+#define BEEPER_PIN 14
+#define BEEPER_TIMER 1
+#define BEEPER_OUTPUT 1
+
#define HAS_USB 1
#define HAS_USB_CONNECT 0
PROGNAME=easymini-v3.0
PROG=$(PROGNAME)-$(VERSION).elf
HEX=$(PROGNAME)-$(VERSION).ihx
+FLASH_PROG=flash-loader/$(PROGNAME)-altos-flash-$(VERSION).elf
+BOTH_HEX=$(PROGNAME)-combined-$(VERSION).ihx
SRC=$(ALTOS_SRC) ao_easymini.c
OBJ=$(SRC:.c=.o)
-all: $(PROG) $(HEX)
+all: $(PROG) $(HEX) $(BOTH_HEX)
$(PROG): Makefile $(OBJ) altos.ld
$(call quiet,CC) $(LDFLAGS) -o $(PROG) $(OBJ) $(LIBS)
+$(BOTH_HEX): $(PROG) $(FLASH_PROG)
+ ../../ao-tools/ao-elftohex/ao-elftohex -n --output=$@ $(FLASH_PROG) $(PROG)
+
+$(FLASH_PROG): FRC
+ +cd flash-loader && make
+
$(OBJ): $(INC)
load: $(PROG)
install:
uninstall:
+
+FRC:
--- /dev/null
+#
+# AltOS build
+#
+#
+
+include ../lpc/Makefile.defs
+
+INC = \
+ ao.h \
+ ao_arch.h \
+ ao_arch_funcs.h \
+ ao_pins.h \
+ ao_product.h \
+ ao_adxl375.h \
+ lpc.h
+
+#
+# Common AltOS sources
+#
+
+ALTOS_SRC = \
+ ao_interrupt.c \
+ ao_boot_chain.c \
+ ao_romconfig.c \
+ ao_product.c \
+ ao_mutex.c \
+ ao_panic.c \
+ ao_stdio.c \
+ ao_storage.c \
+ ao_report.c \
+ ao_flight.c \
+ ao_kalman.c \
+ ao_sample.c \
+ ao_data.c \
+ ao_convert_volt.c \
+ ao_task.c \
+ ao_log.c \
+ ao_log_motor.c \
+ ao_cmd.c \
+ ao_config.c \
+ ao_timer_lpc.c \
+ ao_exti_lpc.c \
+ ao_spi_lpc.c \
+ ao_adc_lpc.c \
+ ao_usb_lpc.c \
+ ao_m25.c \
+ ao_adxl375.c \
+ ao_beep_lpc.c
+
+PRODUCT=EasyMotor-v3
+PRODUCT_DEF=-DEASYMOTOR_V_3
+IDPRODUCT=0x002c
+
+CFLAGS = $(PRODUCT_DEF) $(LPC_CFLAGS)
+
+PROGNAME=easymotor-v3
+PROG=$(PROGNAME)-$(VERSION).elf
+HEX=$(PROGNAME)-$(VERSION).ihx
+
+SRC=$(ALTOS_SRC) ao_easymotor.c
+OBJ=$(SRC:.c=.o)
+
+all: $(PROG) $(HEX)
+
+$(PROG): Makefile $(OBJ)
+ $(call quiet,CC) $(LDFLAGS) -o $(PROG) $(OBJ) $(LIBS)
+
+$(OBJ): $(INC)
+
+distclean: clean
+
+clean:
+ rm -f *.o $(PROGNAME)-*.elf $(PROGNAME)-*.ihx
+ rm -f ao_product.h
+
+install:
+
+uninstall:
--- /dev/null
+/*
+ * Copyright © 2022 Bdale Garbee <bdale@gag.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; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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>
+#include <ao_adxl375.h>
+#include <ao_log.h>
+#include <ao_exti.h>
+
+int
+main(void)
+{
+ ao_clock_init();
+ ao_task_init();
+ ao_timer_init();
+
+// ao_dma_init();
+ ao_spi_init();
+ ao_exti_init();
+
+ ao_adc_init();
+ ao_beep_init();
+ ao_cmd_init();
+ ao_usb_init();
+
+ ao_adxl375_init();
+
+ ao_storage_init();
+ ao_flight_init();
+ ao_log_init();
+ ao_report_init();
+ ao_config_init();
+
+ ao_start_scheduler();
+}
--- /dev/null
+/*
+ * Copyright © 2022 Bdale Garbee <bdale@gag.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; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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.
+ */
+
+#ifndef _AO_PINS_H_
+#define _AO_PINS_H_
+
+#define AO_STACK_SIZE 352
+#define SLEEP_HASH_SIZE 3
+#define AO_NUM_TASKS 6
+
+#define HAS_TASK_QUEUE 1
+#define IS_FLASH_LOADER 0
+
+/* Crystal on the board */
+#define AO_LPC_CLKIN 12000000
+
+/* Main clock frequency. 48MHz for USB so we don't use the USB PLL */
+#define AO_LPC_CLKOUT 48000000
+
+/* System clock frequency */
+#define AO_LPC_SYSCLK 24000000
+
+#define HAS_USB 1
+#define HAS_USB_CONNECT 0
+#define HAS_USB_VBUS 0
+#define HAS_USB_PULLUP 1
+#define AO_USB_PULLUP_PORT 0
+#define AO_USB_PULLUP_PIN 20
+
+#define PACKET_HAS_SLAVE 0
+
+#define HAS_SERIAL 0
+
+#define AO_CONFIG_DEFAULT_FLIGHT_LOG_MAX (1984 * 1024)
+#define AO_CONFIG_MAX_SIZE 1024
+#define LOG_ERASE_MARK 0x55
+#define LOG_MAX_ERASE 128
+#define AO_LOG_FORMAT AO_LOG_FORMAT_EASYMOTOR
+
+#define HAS_EEPROM 1
+#define USE_INTERNAL_FLASH 0
+#define USE_EEPROM_CONFIG 0
+#define USE_STORAGE_CONFIG 1
+#define AO_PA11_PA12_RMP 1
+#define HAS_BEEP 1
+#define HAS_BATTERY_REPORT 1
+#define HAS_PAD_REPORT 1
+
+/* Beeper is on pio0_1 ct32b0_mat2 */
+#define AO_LPC_BEEP_PORT 0
+#define AO_LPC_BEEP_PIN 1
+#define AO_LPC_BEEP_TIMER 0
+#define AO_LPC_BEEP_CHANNEL 2
+
+#define HAS_RADIO 0
+#define HAS_TELEMETRY 0
+#define HAS_APRS 0
+#define HAS_COMPANION 0
+
+#define LOW_LEVEL_DEBUG 0
+
+#define HAS_GPS 0
+#define HAS_FLIGHT 1
+#define HAS_LOG 1
+
+/*
+ * ADC
+ */
+#define HAS_ADC 1
+
+#define AO_NUM_ADC 2
+
+#define AO_ADC_0 1
+#define AO_ADC_1 1
+
+#define AO_DATA_RING 32
+
+struct ao_adc {
+ int16_t v_batt;
+ int16_t motor_pressure;
+};
+
+#define AO_ADC_DUMP(p) \
+ printf("tick: %5lu batt: %5d motor_pressure: %5d\n", \
+ (p)->tick, \
+ (p)->adc.v_batt, \
+ (p)->adc.motor_pressure);
+
+/*
+ * Voltage divider on ADC battery sampler
+ */
+#define AO_BATTERY_DIV_PLUS 56 /* 5.6k */
+#define AO_BATTERY_DIV_MINUS 100 /* 10k */
+
+/*
+ * Voltage divider on pressure sensor input
+ */
+#define AO_PRESSURE_DIV_PLUS 56 /* 5.6k 0.1% */
+#define AO_PRESSURE_DIV_MINUS 100 /* 10k 0.1% */
+
+/*
+ * ADC reference in decivolts
+ */
+#define AO_ADC_REFERENCE_DV 33
+
+/* SPI */
+
+#define HAS_SPI_0 1
+#define SPI_0_MODE ((0 << LPC_SSP_CR0_CPOL) | (0 << LPC_SSP_CR0_CPHA))
+#define SPI_SCK0_P0_6 1
+#define HAS_SPI_1 1
+#define SPI_SCK1_P1_15 1
+#define SPI_MISO1_P0_22 1
+#define SPI_MOSI1_P0_21 1
+#define SPI_1_MODE ((1 << LPC_SSP_CR0_CPOL) | (1 << LPC_SSP_CR0_CPHA))
+
+/*
+ * SPI Flash memory
+ */
+
+#define M25_MAX_CHIPS 1
+#define AO_M25_SPI_CS_PORT 0
+#define AO_M25_SPI_CS_MASK (1 << 3)
+#define AO_M25_SPI_BUS 0
+
+/* ADXL375 */
+
+#define HAS_ADXL375 1
+#define AO_ADXL375_SPI_INDEX 1
+#define AO_ADXL375_CS_PORT 0
+#define AO_ADXL375_CS_PIN 19
+
+#define AO_ADXL375_AXIS x
+#define AO_ADXL375_ACROSS_AXIS y
+#define AO_ADXL375_THROUGH_AXIS z
+#define AO_ADXL375_INVERT 0
+#define HAS_IMU 1
+#define USE_ADXL375_IMU 1
+
+/* Motor pressure */
+#define HAS_MOTOR_PRESSURE 1
+#define ao_data_motor_pressure(packet) ((packet)->adc.motor_pressure)
+
+typedef int16_t motor_pressure_t;
+
+#endif /* _AO_PINS_H_ */
--- /dev/null
+#
+# AltOS flash loader build
+#
+#
+
+TOPDIR=../..
+HARDWARE=easymotor-v3
+include $(TOPDIR)/lpc/Makefile-flash.defs
--- /dev/null
+/*
+ * Copyright © 2022 Bdale Garbee <bdale@gag.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; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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.
+ */
+
+#ifndef _AO_PINS_H_
+#define _AO_PINS_H_
+
+#include <ao_flash_lpc_pins.h>
+
+#define AO_BOOT_PIN 1
+#define AO_BOOT_APPLICATION_GPIO 0
+#define AO_BOOT_APPLICATION_PIN 2
+#define AO_BOOT_APPLICATION_VALUE 1
+#define AO_BOOT_APPLICATION_MODE AO_EXTI_MODE_PULL_UP
+
+#define HAS_USB_PULLUP 1
+#define AO_USB_PULLUP_PORT 0
+#define AO_USB_PULLUP_PIN 20
+
+#endif /* _AO_PINS_H_ */
return;
down = (int16_t) ao_cmd_decimal();
auto_cal = (up == 0 && ao_cmd_status != ao_cmd_success);
+ ao_cmd_status = ao_cmd_success;
if (auto_cal) {
up = ao_config_accel_calibrate_auto("up");
#if HAS_IMU
#define AO_LOG_FORMAT_TELESTATIC 17 /* 32 byte typed telestatic records */
#define AO_LOG_FORMAT_MICROPEAK2 18 /* 2-byte baro values with header */
#define AO_LOG_FORMAT_TELEMEGA_4 19 /* 32 byte typed telemega records with 32 bit gyro cal and Bmx160 */
-#define AO_LOG_FORMAT_EASYMOTOR 20 /* ? byte typed easymotor records with pressure sensor and adxl375 */
+#define AO_LOG_FORMAT_EASYMOTOR 20 /* 16 byte typed easymotor records with pressure sensor and adxl375 */
#define AO_LOG_FORMAT_TELEMEGA_5 21 /* 32 byte typed telemega records with 32 bit gyro cal, mpu6000 and mmc5983 */
#define AO_LOG_FORMAT_NONE 127 /* No log at all */
interval = min_interval[ao_config.radio_rate];
#endif
ao_telemetry_interval = interval;
+ if (interval) {
#if AO_SEND_MEGA
- if (interval > 1)
- ao_telemetry_mega_data_max = 1;
- else
- ao_telemetry_mega_data_max = 2;
- if (ao_telemetry_mega_data_max > cur)
- cur++;
- ao_telemetry_mega_data_cur = cur;
+ if (interval > 1)
+ ao_telemetry_mega_data_max = 1;
+ else
+ ao_telemetry_mega_data_max = 2;
+ if (ao_telemetry_mega_data_max > cur)
+ cur++;
+ ao_telemetry_mega_data_cur = cur;
#endif
#if AO_SEND_METRUM
- ao_telemetry_metrum_data_max = (int16_t) (AO_SEC_TO_TICKS(1) / interval);
- if (ao_telemetry_metrum_data_max > cur)
- cur++;
- ao_telemetry_metrum_data_cur = cur;
+ ao_telemetry_metrum_data_max = (int16_t) (AO_SEC_TO_TICKS(1) / interval);
+ if (ao_telemetry_metrum_data_max > cur)
+ cur++;
+ ao_telemetry_metrum_data_cur = cur;
#endif
#if HAS_COMPANION
- if (!ao_companion_setup.update_period)
- ao_companion_setup.update_period = AO_SEC_TO_TICKS(1);
- ao_telemetry_companion_max = (int16_t) (ao_companion_setup.update_period / interval);
- if (ao_telemetry_companion_max > cur)
- cur++;
- ao_telemetry_companion_cur = cur;
+ if (!ao_companion_setup.update_period)
+ ao_companion_setup.update_period = AO_SEC_TO_TICKS(1);
+ ao_telemetry_companion_max = (int16_t) (ao_companion_setup.update_period / interval);
+ if (ao_telemetry_companion_max > cur)
+ cur++;
+ ao_telemetry_companion_cur = cur;
#endif
#if HAS_GPS
- ao_telemetry_gps_max = (int16_t) (AO_SEC_TO_TICKS(1) / interval);
- if (ao_telemetry_gps_max > cur)
- cur++;
- ao_telemetry_loc_cur = cur;
- if (ao_telemetry_gps_max > cur)
- cur++;
- ao_telemetry_sat_cur = cur;
-#endif
-
- ao_telemetry_config_max = (int16_t) (AO_SEC_TO_TICKS(5) / interval);
- if (ao_telemetry_config_max > cur)
- cur++;
- ao_telemetry_config_cur = cur;
+ ao_telemetry_gps_max = (int16_t) (AO_SEC_TO_TICKS(1) / interval);
+ if (ao_telemetry_gps_max > cur)
+ cur++;
+ ao_telemetry_loc_cur = cur;
+ if (ao_telemetry_gps_max > cur)
+ cur++;
+ ao_telemetry_sat_cur = cur;
+#endif
+
+ ao_telemetry_config_max = (int16_t) (AO_SEC_TO_TICKS(5) / interval);
+ if (ao_telemetry_config_max > cur)
+ cur++;
+ ao_telemetry_config_cur = cur;
+ }
#ifndef SIMPLIFY
ao_telemetry_time =
CFLAGS = $(PRODUCT_DEF) $(LPC_CFLAGS)
-LDFLAGS=-nostartfiles $(CFLAGS) -L$(TOPDIR)/lpc -Taltos-loader.ld
+LDFLAGS=-Wl,--undefined=force_no_isp -nostartfiles $(CFLAGS) -L$(TOPDIR)/lpc -Taltos-loader.ld
PROGNAME=$(HARDWARE)-altos-flash
PROG=$(PROGNAME)-$(VERSION).elf
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-__flash = 0x0;
-__flash_size = 4K;
+__flash = 0x300;
+__flash_size = 4K - 0x300;
__ram = 0x10000000;
__ram_size = 4k;
__stack_size = 128;
INCLUDE registers.ld
-INCLUDE picolibc.ld
+/*
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
+ * Copyright © 2019 Keith Packard
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * 3. Neither the name of the copyright holder nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+ENTRY(_start)
+
+/*
+ * These values should be provided by the application. We'll include
+ * some phony values here to make things link for testing
+ */
+
+MEMORY
+{
+ low (rxai!w) : ORIGIN = 0x0, LENGTH = 0x2fc
+ no_isp (rxai!w): ORIGIN = 0x2fc, LENGTH = 4
+ flash (rxai!w) : ORIGIN = DEFINED(__flash) ? __flash : 0x10000000, LENGTH = DEFINED(__flash_size) ? __flash_size : 0x10000
+ ram (wxa!ri) : ORIGIN = DEFINED(__ram ) ? __ram : 0x20000000, LENGTH = DEFINED(__ram_size ) ? __ram_size : 0x08000
+}
+
+PHDRS
+{
+ text PT_LOAD;
+ ram PT_LOAD;
+ ram_init PT_LOAD;
+ tls PT_TLS;
+}
+
+SECTIONS
+{
+ PROVIDE(__stack = ORIGIN(ram) + LENGTH(ram));
+
+ .init : {
+ KEEP (*(.text.init.enter))
+ KEEP (*(.data.init.enter))
+ KEEP (*(SORT_BY_NAME(.init) SORT_BY_NAME(.init.*)))
+ } >low AT>low :text
+
+ .text.low : {
+ ao_boot_chain.o(.text .text.*)
+ ao_boot_pin.o(.text .text.*)
+ ao_flash_loader_lpc.o(.text .text.*)
+ ao_notask.o(*.text .text.*)
+ ao_product.o(.rodata .rodata.*)
+ } >low AT>low :text
+
+ .no_isp : {
+ *(.no_isp)
+ } > no_isp AT>no_isp :text
+
+ .text : {
+
+ /* code */
+ *(.text.unlikely .text.unlikely.*)
+ *(.text.startup .text.startup.*)
+ *(.text .text.*)
+ *(.gnu.linkonce.t.*)
+ KEEP (*(.fini .fini.*))
+ __text_end = .;
+
+ PROVIDE (__etext = __text_end);
+ PROVIDE (_etext = __text_end);
+ PROVIDE (etext = __text_end);
+
+ /* read-only data */
+ *(.rdata)
+ *(.rodata .rodata.*)
+ *(.gnu.linkonce.r.*)
+
+ *(.srodata.cst16)
+ *(.srodata.cst8)
+ *(.srodata.cst4)
+ *(.srodata.cst2)
+ *(.srodata .srodata.*)
+ *(.data.rel.ro .data.rel.ro.*)
+ *(.got .got.*)
+
+ /* Need to pre-align so that the symbols come after padding */
+ . = ALIGN(8);
+
+ /* lists of constructors and destructors */
+ PROVIDE_HIDDEN ( __preinit_array_start = . );
+ KEEP (*(.preinit_array))
+ PROVIDE_HIDDEN ( __preinit_array_end = . );
+
+ PROVIDE_HIDDEN ( __init_array_start = . );
+ KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*)))
+ KEEP (*(.init_array .ctors))
+ PROVIDE_HIDDEN ( __init_array_end = . );
+
+ PROVIDE_HIDDEN ( __fini_array_start = . );
+ KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*)))
+ KEEP (*(.fini_array .dtors))
+ PROVIDE_HIDDEN ( __fini_array_end = . );
+ } >flash AT>flash :text
+
+ /* additional sections when compiling with C++ exception support */
+ /*
+ .except_ordered : {
+ *(.gcc_except_table *.gcc_except_table.*)
+ KEEP (*(.eh_frame .eh_frame.*))
+ *(.ARM.extab* .gnu.linkonce.armextab.*)
+ } >flash AT>flash :text
+
+ .except_unordered : {
+ . = ALIGN(8);
+
+ PROVIDE(__exidx_start = .);
+ *(.ARM.exidx*)
+ PROVIDE(__exidx_end = .);
+ } >flash AT>flash :text
+ */
+
+ /*
+ * Data values which are preserved across reset
+ */
+ .preserve (NOLOAD) : {
+ PROVIDE(__preserve_start__ = .);
+ KEEP(*(SORT_BY_NAME(.preserve.*)))
+ KEEP(*(.preserve))
+ PROVIDE(__preserve_end__ = .);
+ } >ram AT>ram :ram
+
+ .data : ALIGN_WITH_INPUT {
+ *(.data .data.*)
+ *(.gnu.linkonce.d.*)
+
+ /* Need to pre-align so that the symbols come after padding */
+ . = ALIGN(8);
+
+ PROVIDE( __global_pointer$ = . + 0x800 );
+ *(.sdata .sdata.* .sdata2.*)
+ *(.gnu.linkonce.s.*)
+ } >ram AT>flash :ram_init
+ PROVIDE(__data_start = ADDR(.data));
+ PROVIDE(__data_source = LOADADDR(.data));
+
+ /* Thread local initialized data. This gets
+ * space allocated as it is expected to be placed
+ * in ram to be used as a template for TLS data blocks
+ * allocated at runtime. We're slightly abusing that
+ * by placing the data in flash where it will be copied
+ * into the allocate ram addresses by the existing
+ * data initialization code in crt0
+ */
+ .tdata : ALIGN_WITH_INPUT {
+ *(.tdata .tdata.* .gnu.linkonce.td.*)
+ PROVIDE(__data_end = .);
+ PROVIDE(__tdata_end = .);
+ } >ram AT>flash :tls :ram_init
+ PROVIDE( __tls_base = ADDR(.tdata));
+ PROVIDE( __tdata_start = ADDR(.tdata));
+ PROVIDE( __tdata_source = LOADADDR(.tdata) );
+ PROVIDE( __tdata_source_end = LOADADDR(.tdata) + SIZEOF(.tdata) );
+ PROVIDE( __tdata_size = SIZEOF(.tdata) );
+
+ PROVIDE( __edata = __data_end );
+ PROVIDE( _edata = __data_end );
+ PROVIDE( edata = __data_end );
+ PROVIDE( __data_size = __data_end - __data_start );
+
+ .tbss (NOLOAD) : {
+ *(.tbss .tbss.* .gnu.linkonce.tb.*)
+ *(.tcommon)
+ PROVIDE( __tls_end = . );
+ PROVIDE( __tbss_end = . );
+ } >ram AT>ram :tls :ram
+ PROVIDE( __bss_start = ADDR(.tbss));
+ PROVIDE( __tbss_start = ADDR(.tbss));
+ PROVIDE( __tbss_size = SIZEOF(.tbss) );
+ PROVIDE( __tls_size = __tls_end - __tls_base );
+
+ /*
+ * The linker special cases .tbss segments which are
+ * identified as segments which are not loaded and are
+ * thread_local.
+ *
+ * For these segments, the linker does not advance 'dot'
+ * across them. We actually need memory allocated for tbss,
+ * so we create a special segment here just to make room
+ */
+ .tbss_space (NOLOAD) : {
+ . = . + SIZEOF(.tbss);
+ } >ram AT>ram :ram
+
+ .bss (NOLOAD) : {
+ *(.sbss*)
+ *(.gnu.linkonce.sb.*)
+ *(.bss .bss.*)
+ *(.gnu.linkonce.b.*)
+ *(COMMON)
+
+ /* Align the heap */
+ . = ALIGN(8);
+ __bss_end = .;
+ } >ram AT>ram :ram
+ PROVIDE( __end = __bss_end );
+ PROVIDE( _end = __bss_end );
+ PROVIDE( end = __bss_end );
+ PROVIDE( __bss_size = __bss_end - __bss_start );
+
+ /* Make the rest of memory available for heap storage */
+ PROVIDE (__heap_start = __end);
+ PROVIDE (__heap_end = __stack - (DEFINED(__stack_size) ? __stack_size : 0x800));
+ PROVIDE (__heap_size = __heap_end - __heap_start);
+
+ /* Define a stack region to make sure it fits in memory */
+ .stack (NOLOAD) : {
+ . += (DEFINED(__stack_size) ? __stack_size : 0x800);
+ } >ram :ram
+
+ /* Throw away C++ exception handling information */
+
+
+
+ /DISCARD/ : {
+ *(.note .note.*)
+ *(.eh_frame .eh_frame.*)
+ *(.ARM.extab* .gnu.linkonce.armextab.*)
+ *(.ARM.exidx*)
+ }
+
+
+}
}
void
-ao_beep_for(uint8_t beep, AO_TICK_TYPE ticks)
+ao_beep_for(uint8_t beep, AO_TICK_TYPE ticks)
{
ao_beep(beep);
ao_delay(ticks);
__attribute__ ((section(".init.0")))
const void *const __interrupt_pad[0x10];
+#if IS_FLASH_LOADER
+/* Flash loader needs a magic value at 0x2fc to be 0x4E69 7370 */
+__attribute__ ((section(".no_isp")))
+const uint32_t force_no_isp = 0x4E697370;
+#endif
+
void main(void) __attribute__((__noreturn__));
void *__interrupt_ram[sizeof(__interrupt_vector)/sizeof(__interrupt_vector[0])] __attribute((section(".preserve.1")));
}
static void
-ao_spi_channel_init(uint8_t id)
+ao_spi_channel_init(uint8_t id, uint8_t mode)
{
struct lpc_ssp *lpc_ssp = ao_lpc_ssp[id];
uint8_t d;
lpc_ssp->cr0 = ((LPC_SSP_CR0_DSS_8 << LPC_SSP_CR0_DSS) |
(LPC_SSP_CR0_FRF_SPI << LPC_SSP_CR0_FRF) |
- (0 << LPC_SSP_CR0_CPOL) |
- (0 << LPC_SSP_CR0_CPHA) |
+ mode |
(0 << LPC_SSP_CR0_SCR));
/* Enable the device */
ao_spi_init(void)
{
#if HAS_SPI_0
+#ifndef SPI_0_MODE
+#define SPI_0_MODE 0
+#endif
/* Configure pins */
#if SPI_SCK0_P0_6
lpc_ioconf.pio0_6 = ao_lpc_alternate(LPC_IOCONF_FUNC_PIO0_6_SCK0);
/* Reset the device */
lpc_scb.presetctrl &= ~(1UL << LPC_SCB_PRESETCTRL_SSP0_RST_N);
lpc_scb.presetctrl |= (1 << LPC_SCB_PRESETCTRL_SSP0_RST_N);
- ao_spi_channel_init(0);
+ ao_spi_channel_init(0, SPI_0_MODE);
#endif
#if HAS_SPI_1
+#ifndef SPI_1_MODE
+#define SPI_1_MODE 0
+#endif
#if SPI_SCK1_P1_15
lpc_ioconf.pio1_15 = ao_lpc_alternate(LPC_IOCONF_FUNC_PIO1_15_SCK1);
/* Reset the device */
lpc_scb.presetctrl &= ~(1UL << LPC_SCB_PRESETCTRL_SSP1_RST_N);
lpc_scb.presetctrl |= (1 << LPC_SCB_PRESETCTRL_SSP1_RST_N);
- ao_spi_channel_init(1);
+ ao_spi_channel_init(1, SPI_1_MODE);
#endif /* HAS_SPI_1 */
}
/* PIO0_1 */
#define LPC_IOCONF_FUNC_PIO0_1 0
#define LPC_IOCONF_FUNC_CLKOUT 1
-#define LPC_IOCONF_FUNC_CT32B0_MAT2 2
+#define LPC_IOCONF_FUNC_PIO0_1_CT32B0_MAT2 2
#define LPC_IOCONF_FUNC_USB_FTOGGLE 3
/* PIO0_2 */
#define LPC_IOCONF_FUNC_PIO0_2 0
#define LPC_IOCONF_FUNC_SSEL0 1
-#define LPC_IOCONF_FUNC_CT16B0_CAP0 2
+#define LPC_IOCONF_FUNC_PIO0_2_CT16B0_CAP0 2
/* PIO0_3 */
#define LPC_IOCONF_FUNC_PIO0_3 0
/* PIO0_8 */
#define LPC_IOCONF_FUNC_PIO0_8 0
#define LPC_IOCONF_FUNC_MISO0 1
-#define LPC_IOCONF_FUNC_CT16B0_MAT0 2
+#define LPC_IOCONF_FUNC_PIO0_8_CT16B0_MAT0 2
/* PIO0_9 */
#define LPC_IOCONF_FUNC_PIO0_9 0
#define LPC_IOCONF_FUNC_MOSI0 1
-#define LPC_IOCONF_FUNC_CT16B0_MAT1 2
+#define LPC_IOCONF_FUNC_PIO0_9_CT16B0_MAT1 2
/* PIO0_10 */
#define LPC_IOCONF_FUNC_SWCLK 0
#define LPC_IOCONF_FUNC_PIO0_10 1
#define LPC_IOCONF_FUNC_PIO0_10_SCK0 2
-#define LPC_IOCONF_FUNC_CT16B0_MAT2 3
+#define LPC_IOCONF_FUNC_PIO0_10_CT16B0_MAT2 3
/* PIO0_11 */
#define LPC_IOCONF_FUNC_TDI 0
#define LPC_IOCONF_FUNC_PIO0_11 1
#define LPC_IOCONF_FUNC_AD0 2
-#define LPC_IOCONF_FUNC_CT32B0_MAT3 3
+#define LPC_IOCONF_FUNC_PIO0_11_CT32B0_MAT3 3
/* PIO0_12 */
#define LPC_IOCONF_FUNC_TMS 0
#define LPC_IOCONF_FUNC_PIO0_12 1
#define LPC_IOCONF_FUNC_AD1 2
-#define LPC_IOCONF_FUNC_CT32B1_CAP0 3
+#define LPC_IOCONF_FUNC_PIO0_12_CT32B1_CAP0 3
/* PIO0_13 */
#define LPC_IOCONF_FUNC_TD0 0
#define LPC_IOCONF_FUNC_PIO0_13 1
#define LPC_IOCONF_FUNC_AD2 2
-#define LPC_IOCONF_FUNC_CT32B1_MAT0 3
+#define LPC_IOCONF_FUNC_PIO0_13_CT32B1_MAT0 3
/* PIO0_14 */
#define LPC_IOCONF_FUNC_TRST 0
#define LPC_IOCONF_FUNC_SWDIO 0
#define LPC_IOCONF_FUNC_PIO0_15 1
#define LPC_IOCONF_FUNC_AD4 2
-#define LPC_IOCONF_FUNC_CT32B1_MAT2 3
+#define LPC_IOCONF_FUNC_PIO0_15_CT32B1_MAT2 3
/* PIO0_16 */
#define LPC_IOCONF_FUNC_PIO0_16 0
#define LPC_IOCONF_FUNC_AD5 1
-#define LPC_IOCONF_FUNC_CT32B1_MAT3 2
+#define LPC_IOCONF_FUNC_PIO0_16_CT32B1_MAT3 2
/* PIO0_17 */
#define LPC_IOCONF_FUNC_PIO0_17 0
/* PIO0_20 */
#define LPC_IOCONF_FUNC_PIO0_20 0
-#define LPC_IOCONF_FUNC_CT16B1_CAP0 1
+#define LPC_IOCONF_FUNC_PIO0_20_CT16B1_CAP0 1
/* PIO0_21 */
#define LPC_IOCONF_FUNC_PIO0_21 0
-#define LPC_IOCONF_FUNC_CT16B1_MAT0 1
+#define LPC_IOCONF_FUNC_PIO0_21_CT16B1_MAT0 1
#define LPC_IOCONF_FUNC_PIO0_21_MOSI1 2
/* PIO0_22 */
#define LPC_IOCONF_FUNC_PIO0_22 0
#define LPC_IOCONF_FUNC_AD6 1
-#define LPC_IOCONF_FUNC_CT16B1_MAT1 2
+#define LPC_IOCONF_FUNC_PIO0_22_CT16B1_MAT1 2
#define LPC_IOCONF_FUNC_PIO0_22_MISO1 3
/* PIO0_23 */
/* PIO1_0 */
#define LPC_IOCONF_FUNC_PIO1_0 0
-#define LPC_IOCONF_FUNC_CT32B1_MAT1 1
+#define LPC_IOCONF_FUNC_PIO1_0_CT32B1_MAT1 1
/* PIO1_1 */
#define LPC_IOCONF_FUNC_PIO1_1 0
-#define LPC_IOCONF_FUNC_CT32B1_MAT1 1
+#define LPC_IOCONF_FUNC_PIO1_1_CT32B1_MAT1 1
/* PIO1_2 */
#define LPC_IOCONF_FUNC_PIO1_2 0
/* PIO1_5 */
#define LPC_IOCONF_FUNC_PIO1_5 0
-#define LPC_IOCONF_FUNC_CT32B1_CAP1 1
+#define LPC_IOCONF_FUNC_PIO1_5_CT32B1_CAP1 1
/* PIO1_6 */
#define LPC_IOCONF_FUNC_PIO1_6 0
/* PIO1_13 */
#define LPC_IOCONF_FUNC_PIO1_13 0
#define LPC_IOCONF_FUNC_DTR 1
-#define LPC_IOCONF_FUNC_CT16B0_MAT0 2
+#define LPC_IOCONF_FUNC_PIO1_13_CT16B0_MAT0 2
#define LPC_IOCONF_FUNC_PIO1_13_TXD 3
/* PIO1_14 */
#define LPC_IOCONF_FUNC_PIO1_14 0
#define LPC_IOCONF_FUNC_DSR 1
-#define LPC_IOCONF_FUNC_CT16B0_MAT1 2
+#define LPC_IOCONF_FUNC_PIO1_14_CT16B0_MAT1 2
#define LPC_IOCONF_FUNC_PIO1_13_RXD 3
/* PIO1_15 */
/* PIO1_16 */
#define LPC_IOCONF_FUNC_PIO1_16 0
#define LPC_IOCONF_FUNC_RI 1
-#define LPC_IOCONF_FUNC_CT16B0_CAP0 2
+#define LPC_IOCONF_FUNC_PIO1_16_CT16B0_CAP0 2
/* PIO1_17 */
#define LPC_IOCONF_FUNC_PIO1_17 0
-#define LPC_IOCONF_FUNC_CT16B0_CAP1 1
+#define LPC_IOCONF_FUNC_PIO1_17_CT16B0_CAP1 1
#define LPC_IOCONF_FUNC_PIO1_17_RXD 2
/* PIO1_18 */
#define LPC_IOCONF_FUNC_PIO1_18 0
-#define LPC_IOCONF_FUNC_CT16B1_CAP1 1
+#define LPC_IOCONF_FUNC_PIO1_18_CT16B1_CAP1 1
#define LPC_IOCONF_FUNC_PIO1_18_TXD 2
/* PIO1_19 */
+# location of code signing key, et al
+
JAVAROOT=classes
AM_JAVACFLAGS=$(JAVAC_VERSION_FLAGS) -encoding UTF-8 -Xlint:deprecation -Xlint:unchecked
$(WINDOWS_DIST): $(WINDOWS_FILES) telegps-windows.nsi
-rm -f $@
makensis -Otelegps-windows.log "-XOutFile $@" "-DVERSION=$(VERSION)" telegps-windows.nsi || (cat telegps-windows.log && exit 1)
+ if [ "$(HAVE_WINDOWS_KEY)" = "yes" ]; then \
+ jsign --keystore "$(WINDOWSKEYFILE)" --alias 1 \
+ --storetype PKCS12 --storepass `cat "$(WINDOWSKEYPASSFILE)"` \
+ --tsaurl http://ts.ssl.com --tsmode RFC3161 $@ ; \
+ fi
Manifest.txt: Makefile
echo 'Main-Class: org.altusmetrum.telegps.TeleGPS' > $@