+commit bdabc6814b066a9b17a6557910f21b1ed03de3f0
+Merge: 37dda254 c5e8826a
+Author: Bdale Garbee <bdale@gag.com>
+Date: Fri Oct 28 23:10:00 2022 -0600
+
+ Merge branch 'master' into branch-1.9
+
+commit c5e8826aa260d4aca492d684b94adc7eea0254eb
+Author: Keith Packard <keithp@keithp.com>
+Date: Thu Oct 27 21:07:15 2022 -0700
+
+ Version 1.9.12
+
+ Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 140a84ba8ac1e6548ab63ff586cf214d87f727a4
+Author: Keith Packard <keithp@keithp.com>
+Date: Fri Oct 28 21:57:02 2022 -0700
+
+ Auto-detect windows signing stuff
+
+ Still build installers even without signing key
+
+ Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 7c4f9aa882256182485f7f2086221841368ddfc7
+Author: Bdale Garbee <bdale@gag.com>
+Date: Fri Oct 28 22:28:40 2022 -0600
+
+ update Releasing to include reference to jsign as a release dependency
+
+commit 5fd95471791842234a1840477c55ba175fff5a8c
+Author: Bdale Garbee <bdale@gag.com>
+Date: Fri Oct 28 22:20:03 2022 -0600
+
+ fat: sign Windows installers with our new code signing certificate
+
+commit ef969428f293e5155c00af514ce0782a7cdf25d5
+Author: Bdale Garbee <bdale@gag.com>
+Date: Fri Oct 28 21:47:04 2022 -0600
+
+ doc: include reference to Loki Research closures in motortest document
+
+commit 74c73edc93110874636b4bbbe01f9f0327230b50
+Author: Keith Packard <keithp@keithp.com>
+Date: Thu Oct 27 21:35:55 2022 -0700
+
+ altosuilib: Remove some debug printfs
+
+ Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 055803ceca56065ea2253ab3eab20a5defd00135
+Author: Keith Packard <keithp@keithp.com>
+Date: Thu Oct 27 21:21:28 2022 -0700
+
+ altosui: Ship motortest.pdf with packaged builds
+
+ Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit f57cba7dd193c5608be187d3d81781215ab38a44
+Author: Bdale Garbee <bdale@gag.com>
+Date: Thu Oct 27 22:31:34 2022 -0600
+
+ doc: additional improvements to motortest manual
+
+commit f249b61f403b8d2a042641c5ebe0fe4a720ae436
+Author: Bdale Garbee <bdale@gag.com>
+Date: Thu Oct 27 22:20:19 2022 -0600
+
+ fix mailing list reference to use mailman3 path
+
+commit edef072dd5cffdbd3e8346719a81808b17bdc570
+Author: Keith Packard <keithp@keithp.com>
+Date: Thu Oct 27 21:05:10 2022 -0700
+
+ Add EasyMotor v3 firmware to release
+
+ Remove EasyMotor v2
+
+ Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit a4be94096281536db12378c6fee66ffb774a3eac
+Author: Keith Packard <keithp@keithp.com>
+Date: Thu Oct 27 21:01:19 2022 -0700
+
+ doc: Add preliminary 1.9.12 release notes
+
+ Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 12b03f494462bdf8c076ea474176ec14a18026fa
+Author: Keith Packard <keithp@keithp.com>
+Date: Thu Oct 27 21:00:47 2022 -0700
+
+ doc: Add specs for EasyMini v3 and EasyMotor v3
+
+ Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 2fdf4e798bd67b0d7e96f2b8fff49915b71b089e
+Author: Keith Packard <keithp@keithp.com>
+Date: Thu Oct 27 21:00:07 2022 -0700
+
+ altosuilib: Limit EasyMotor graphs to motor pressure and accel by default
+
+ Change which axes are turned on when the graph is created.
+
+ Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 76f0fe177a38bd16e346edf0808ee8fca343f1a2
+Author: Keith Packard <keithp@keithp.com>
+Date: Thu Oct 27 20:59:20 2022 -0700
+
+ altoslib: Map log format back to USB device id
+
+ This lets us use the device_id for both telem and eeprom files.
+
+ Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 14a65822fa2a8bb120638633b068847c8a0197b9
+Author: Keith Packard <keithp@keithp.com>
+Date: Thu Oct 27 19:39:16 2022 -0700
+
+ altos: Allow 'c a 0' without Syntax Error
+
+ Need to clear error after checking for second value in accel cal
+ command.
+
+ Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 7172638c3810f6c39e4262fa80edf5ef0dec62d8
+Author: Keith Packard <keithp@keithp.com>
+Date: Thu Oct 27 19:25:02 2022 -0700
+
+ easymotor-v3: Fix beeper config
+
+ the branch had different beeper config code than mainline.
+
+ Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 898eeb609aa7eb078161a78ac48c727a5255a51c
+Author: Keith Packard <keithp@keithp.com>
+Date: Thu Oct 27 19:19:59 2022 -0700
+
+ ao-eeprom: Handle merge conflict from easymotor-v3 branch
+
+ Had two copies of the new easymotor log format parsing bits.
+
+ Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 611ef4497b97bcf5239d6bc2ee13eeba9efd1503
+Merge: 1e694ad4 083464b5
+Author: Keith Packard <keithp@keithp.com>
+Date: Thu Oct 27 19:16:39 2022 -0700
+
+ Merge branch 'easymotor-v3'
+
+commit 1e694ad4f67735585f0897e2dffac755868f3150
+Author: Keith Packard <keithp@keithp.com>
+Date: Thu Oct 27 17:50:36 2022 -0700
+
+ Add EasyMini v3.0 firmware to release
+
+ Followed instructions in Releasing
+
+ Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit a81f5a78172663376ad9687976b9821a755d5e31
+Author: Keith Packard <keithp@keithp.com>
+Date: Thu Oct 27 17:43:08 2022 -0700
+
+ altos: Allow setting telemetry interval to zero without crashing
+
+ Setting telemetry interval to zero means disable telemetry, but the
+ code was using the zero value to compute a bunch of packet delays,
+ which involved dividing by the interval value causing a crash when it
+ was zero. Skip those subsequent computations as they won't be used
+ anyways.
+
+ Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 48a8ae2d38ecad5aa84b2158045c6a2fd8abe5ab
+Author: Keith Packard <keithp@keithp.com>
+Date: Sun Oct 23 16:48:05 2022 -0700
+
+ altos: Increase AES IV buffer to hold maximum AES state
+
+ The compiler emits warnings if this buffer is only 16 bytes. I'm hoping
+ that's because the max key size could be 256 bits instead of 128 bits?
+
+ In any case, this makes the compiler happy.
+
+ Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 3735e1eb27afb873d60164a79a9e2769dc92b3a3
+Author: Keith Packard <keithp@keithp.com>
+Date: Sat Sep 24 15:54:20 2022 -0700
+
+ easymini: Elide symbols from combined .ihx file
+
+ Also add combined hex file to easymini v1.0 for testing.
+
+ Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit d299191a298f6b6ffeadff15334738810062cf58
+Author: Keith Packard <keithp@keithp.com>
+Date: Sat Sep 24 15:53:04 2022 -0700
+
+ ao-elftohex: Add '-n' option to elide symbol table from output
+
+ The symbol table is a non-standard Altus Metrum hex file extension;
+ add this option to allow use with standard hex file tools.
+
+ Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit dc4de8365de5829b587a845e0517e8c5fc8c9e29
+Author: Keith Packard <keithp@keithp.com>
+Date: Mon Sep 19 09:20:23 2022 -0700
+
+ easymini-v3.0: Create combined .ihx file for testing
+
+ This doesn't set the serial number, so it's not useful for production,
+ but it should at least provide an easy way to check a board.
+
+ Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit ed795c24e6269a10e74b9bc3c385e787bcc230fe
+Author: Keith Packard <keithp@keithp.com>
+Date: Mon Sep 19 09:09:04 2022 -0700
+
+ ao-elftohex: Allow multiple elf files to be merged together
+
+ This allows combining the flash loader and core firmware.
+
+ Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 1d963cf10f3f54f77a6edf8e7843f70c0268cd31
+Author: Keith Packard <keithp@keithp.com>
+Date: Mon Sep 19 08:37:31 2022 -0700
+
+ doc: Update call sign
+
+ Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 065c60d38f38343bd1f319a87f6b50367a3abbe3
+Author: Keith Packard <keithp@keithp.com>
+Date: Sun Sep 4 21:05:47 2022 -0700
+
+ altos: Document easymotor record length
+
+ Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 681638032041efcb05b9623e2a0332ca4e2d0958
+Author: Keith Packard <keithp@keithp.com>
+Date: Sun Sep 4 21:05:25 2022 -0700
+
+ ao-eeprom: Add easy motor support
+
+ Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 41cf6f6f65681961ed98a59b9fc9da4fe5abef5a
+Author: Keith Packard <keithp@keithp.com>
+Date: Sun Sep 4 21:04:28 2022 -0700
+
+ altoslib: Replace EasyMotor v2 code with v3
+
+ No v2 boards remain in usable condition and we didn't create a new log
+ format value for v3, so just replace the v2 code with v3.
+
+ Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 37dda2541ce440a40fcd4dc8387f7cb1cd3f0816
+Author: Bdale Garbee <bdale@gag.com>
+Date: Sun May 29 21:08:03 2022 -0600
+
+ releasing 1.9.11
+
commit 7904b36eaae2468d76f2627bebd86b663afea1f8
Merge: 8970d45e 4e237bd4
Author: Bdale Garbee <bdale@gag.com>
doc: add an appendix with examples for configurable pyro channels
+commit 083464b52c835c09a66c06a87246fcd138748a5d
+Author: Keith Packard <keithp@keithp.com>
+Date: Sat Apr 9 22:38:28 2022 -0700
+
+ ao-eeprom: Add EasyMotor decode
+
+ Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 61b837129a1b1bbf17413957006fa31a305f6247
+Author: Bdale Garbee <bdale@gag.com>
+Date: Sat Apr 9 22:50:21 2022 -0500
+
+ recognize EasyMotor-v3 too
+
+commit 9cded6d2b2888b6fd1dbcb08d7404fbc8f52ba60
+Author: Keith Packard <keithp@keithp.com>
+Date: Wed Apr 6 23:29:31 2022 -0700
+
+ altos: Add EasyMotor-v3.0 to regular builds
+
+ Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 3a2adf8011237852187046a551216736bd1e6bbb
+Author: Keith Packard <keithp@keithp.com>
+Date: Wed Apr 6 23:28:40 2022 -0700
+
+ lpc: Shuffle more bits around for flash loader
+
+ Having a fixed value at 0x2fc means splitting flash and trying to make
+ enough space on both sides. Sigh.
+
+ Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 72d0c00a063338642a3448f39b0308751285e5ee
+Author: Keith Packard <keithp@keithp.com>
+Date: Wed Apr 6 23:20:03 2022 -0700
+
+ easymotor-v3: Increase ADXL spi speed back to normal, remove delay
+
+ All done debugging, it seems to work on EasyMotor now.
+
+ Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 40a56ed2b5af30c93daa74a15f21e7c8b4cb2a1a
+Author: Keith Packard <keithp@keithp.com>
+Date: Wed Apr 6 22:45:41 2022 -0700
+
+ lpc: Add SPI mode support. Use for ADXL375 on easymotor
+
+ Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 434e98d39a19af9c3cf52cba041091f190972a83
+Author: Keith Packard <keithp@keithp.com>
+Date: Wed Apr 6 22:32:03 2022 -0700
+
+ reduce adxl speed to 100kHz
+
+ Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit c6a7ea9168f1669840eef0fb080759968f4a2f97
+Author: Keith Packard <keithp@keithp.com>
+Date: Wed Apr 6 22:31:39 2022 -0700
+
+ Disable adxl debug, set long delay
+
+ Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit b930b52922a1bbb34cb3fda67c2e9b4695a7330f
+Author: Keith Packard <keithp@keithp.com>
+Date: Wed Apr 6 22:14:32 2022 -0700
+
+ altos: Fix ADXL375 SPI mode definitions and usage
+
+ 3-wire mode is 1, 4-wire mode is 0. Fortunately, I also messed up the
+ shift value, so the 1 got shifted on top of one of the fixed-value bits.
+
+ Signed-off-by: Keith Packard <keithp@keithp.com>
+
commit c49bd3cb0c31a51fae79ddc92237cc309be9a242
Merge: d225adc3 b140da92
Author: Bdale Garbee <bdale@gag.com>
use correct test script for v1.0 easymega
+commit f35d18ca773a109fea572ee1e7134bdc5c4bce14
+Author: Keith Packard <keithp@keithp.com>
+Date: Mon Apr 4 14:15:17 2022 -0700
+
+ lpc: Attempt to make beeper generate correct tone
+
+ The timer docs are confusing; I can't tell how the PWM configuration
+ works.
+
+ Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 6659ec1002da325588a631d9c43a7a9b9a4dbfe3
+Author: Bdale Garbee <bdale@gag.com>
+Date: Mon Apr 4 01:21:44 2022 -0600
+
+ fix SPI index definition
+
+commit 16004c790189bc439285b8afb599ae2b02a13c95
+Author: Bdale Garbee <bdale@gag.com>
+Date: Mon Apr 4 01:14:36 2022 -0600
+
+ Revert "adxl375: Disable spi duplex"
+
+ This reverts commit 21e6dad505677a6b2e19844638ea5b09038b04ae.
+
+commit 3fb95b34a85fb79713c258937a9005faf6f89a03
+Author: Keith Packard <keithp@keithp.com>
+Date: Mon Apr 4 00:00:00 2022 -0700
+
+ adxl375: Disable spi duplex
+
+ See if this fixes LPC
+
+ Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 06ec7480b669a5bc007d82fbdbe56e4a1a4cf68c
+Author: Keith Packard <keithp@keithp.com>
+Date: Sun Apr 3 23:53:24 2022 -0700
+
+ easymotor-v3: enable adxl debugging
+
+ Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 5740b82174c70888f6f047917574567bcbca58dc
+Author: Keith Packard <keithp@keithp.com>
+Date: Sun Apr 3 23:31:44 2022 -0700
+
+ lpc: Fixes for timer configuration
+
+ Missed one magic value to make the beeper configurable
+
+commit a6dc1a7098e44bd1b3250b12ca6fda3bb626cbb1
+Author: Keith Packard <keithp@keithp.com>
+Date: Sun Apr 3 23:23:51 2022 -0700
+
+ lpc: Fix name of timer ioconf constants
+
+ All iopin configuration values are per-pin, so they all need to have
+ the pin name included in the name.
+
+ Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 741796d39437e850fc255b8b324530bb988b0797
+Author: Keith Packard <keithp@keithp.com>
+Date: Sun Apr 3 23:23:51 2022 -0700
+
+ lpc: Fix name of timer ioconf for pio0_1
+
+ There are lots more...
+
+ Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 9df0b79ed7d66369b31dbdc7acde8e23f5f8612e
+Author: Keith Packard <keithp@keithp.com>
+Date: Sun Apr 3 23:18:28 2022 -0700
+
+ lpc: Stick magic value at 0x2fc to let us use PIO0_1
+
+ This pin is used by the built-in ROM boot loader code to force
+ ISP. That keeps us from attaching anything that might be connected to
+ ground.
+
+ Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 4b15c98449da54bae8c4efbfddc7734aeaa43b04
+Author: Keith Packard <keithp@keithp.com>
+Date: Sun Apr 3 22:17:15 2022 -0700
+
+ easymotor-v3: Configure beeper
+
+ Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 2e585a947c7f07fe204e50fc47beb1cc1e479718
+Author: Keith Packard <keithp@keithp.com>
+Date: Sun Apr 3 22:16:48 2022 -0700
+
+ lpc: Make beeper timer configurable
+
+ Allow use of any 32-bit timer.
+
+ Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 243da063ef0dae656f940eb81ada55867924406f
+Author: Bdale Garbee <bdale@gag.com>
+Date: Mon Apr 4 00:19:42 2022 -0600
+
+ get ram usage under control, etc
+
+commit 987ad2eb3a89ad920988d38fe8068dda1cd6f16d
+Author: Bdale Garbee <bdale@gag.com>
+Date: Sun Apr 3 22:11:13 2022 -0600
+
+ a few config tweaks
+
+commit 2bec5edbb068cab88b8d4f30f609712feb186a30
+Author: Bdale Garbee <bdale@gag.com>
+Date: Sun Apr 3 18:12:20 2022 -0600
+
+ first cut at EasyMotor v3 support
+
+commit 9519f7fc894f08d4841556d0efc520b9cc08a899
+Author: Bdale Garbee <bdale@gag.com>
+Date: Tue Jan 25 12:34:31 2022 -0700
+
+ need to save .bin for TeleGPS v2.0
+
commit 302e9b8fda7b36e5009044086737b7791f81addd
Author: Keith Packard <keithp@keithp.com>
Date: Mon Apr 4 14:40:37 2022 -0700
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' > $@