fw/altos
5 weeks agoupdate changelog for Debian build debian debian/1.8.5-1
Bdale Garbee [Sun, 18 Mar 2018 21:51:32 +0000 (15:51 -0600)]
update changelog for Debian build

5 weeks agoMerge branch 'branch-1.8' into debian
Bdale Garbee [Sun, 18 Mar 2018 21:50:16 +0000 (15:50 -0600)]
Merge branch 'branch-1.8' into debian

5 weeks agopreparing to release 1.8.5 branch-1.8 1.8.5
Bdale Garbee [Sun, 18 Mar 2018 21:49:07 +0000 (15:49 -0600)]
preparing to release 1.8.5

5 weeks agoMerge branch 'master' into branch-1.8
Bdale Garbee [Sun, 18 Mar 2018 21:47:31 +0000 (15:47 -0600)]
Merge branch 'master' into branch-1.8

5 weeks agodoc: update copyright year in doc/altusmetrum-docinfo.xml
Bdale Garbee [Sun, 18 Mar 2018 21:42:48 +0000 (15:42 -0600)]
doc: update copyright year in doc/altusmetrum-docinfo.xml

5 weeks agoMerge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
Bdale Garbee [Sun, 18 Mar 2018 21:33:44 +0000 (15:33 -0600)]
Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos

5 weeks agoBump version to 1.8.5
Keith Packard [Sat, 17 Mar 2018 18:26:29 +0000 (11:26 -0700)]
Bump version to 1.8.5

Signed-off-by: Keith Packard <keithp@keithp.com>
5 weeks agodoc: Add release notes for 1.8.5
Keith Packard [Sat, 17 Mar 2018 18:25:00 +0000 (11:25 -0700)]
doc: Add release notes for 1.8.5

Signed-off-by: Keith Packard <keithp@keithp.com>
5 weeks agoaltos/stmf0: Add some common definitions for flash loaders
Keith Packard [Fri, 16 Mar 2018 21:54:04 +0000 (14:54 -0700)]
altos/stmf0: Add some common definitions for flash loaders

Signed-off-by: Keith Packard <keithp@keithp.com>
5 weeks agoaltos: Make panic beeps use fixed frequencies
Keith Packard [Fri, 16 Mar 2018 21:53:14 +0000 (14:53 -0700)]
altos: Make panic beeps use fixed frequencies

This ensures that the beeps will work even before the configuration
has been loaded.

Signed-off-by: Keith Packard <keithp@keithp.com>
5 weeks agoao-usbload: Flip product names in loader error message
Keith Packard [Fri, 16 Mar 2018 21:52:09 +0000 (14:52 -0700)]
ao-usbload: Flip product names in loader error message

I was reversing the 'target' vs 'image' names in the error message,
leading to a bit of confusion.

Signed-off-by: Keith Packard <keithp@keithp.com>
5 weeks agoao-bringup: Check for Loader USB id before attempting dfu-util
Keith Packard [Fri, 16 Mar 2018 21:51:22 +0000 (14:51 -0700)]
ao-bringup: Check for Loader USB id before attempting dfu-util

This lets me restart the turnon process after the boot loader has been
flashed.

Signed-off-by: Keith Packard <keithp@keithp.com>
5 weeks agochaoskey: Create unified ROM image with both loader and app
Keith Packard [Fri, 16 Mar 2018 21:50:29 +0000 (14:50 -0700)]
chaoskey: Create unified ROM image with both loader and app

Flash the whole thing all at once to reduce the number of steps during
turnon.

Signed-off-by: Keith Packard <keithp@keithp.com>
5 weeks agoao-bringup: Don't wait for user when testing EasyMini igniters
Keith Packard [Fri, 16 Mar 2018 21:49:04 +0000 (14:49 -0700)]
ao-bringup: Don't wait for user when testing EasyMini igniters

I always have the LEDs ready to go before starting the turnon process.

Signed-off-by: Keith Packard <keithp@keithp.com>
2 months agoMerge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
Bdale Garbee [Mon, 12 Feb 2018 23:38:57 +0000 (16:38 -0700)]
Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos

2 months agoAdd TeleGPS v2.0 binaries to distribution
Keith Packard [Mon, 12 Feb 2018 23:36:12 +0000 (15:36 -0800)]
Add TeleGPS v2.0 binaries to distribution

Signed-off-by: Keith Packard <keithp@keithp.com>
3 months agolibaltos: Use case-insensitive compare when matching BT MACs
Keith Packard [Sun, 14 Jan 2018 05:29:08 +0000 (21:29 -0800)]
libaltos: Use case-insensitive compare when matching BT MACs

We use the BT MAC vendor portion to figure out which port to connect
to as that is simpler and takes less network traffic than actually
doing discovery. However, on Windows, we were generating the address
in lower case and comparing against upper case vendors, which didn't
work out too well.

Signed-off-by: Keith Packard <keithp@keithp.com>
3 months agoaltoslib/altosuilib: Validate rom image is for target device
Keith Packard [Sat, 13 Jan 2018 06:27:41 +0000 (22:27 -0800)]
altoslib/altosuilib: Validate rom image is for target device

This should avoid mis-programming devices with incorrect firmware.

Signed-off-by: Keith Packard <keithp@keithp.com>
3 months agoaltos/scheme: Move ao-scheme to a separate repository
Keith Packard [Thu, 11 Jan 2018 07:11:40 +0000 (23:11 -0800)]
altos/scheme: Move ao-scheme to a separate repository

This way it can be incorporated into multiple operating systems more easily.

Signed-off-by: Keith Packard <keithp@keithp.com>
3 months agoaltos/scheme: Allow unicode in lexer
Keith Packard [Mon, 8 Jan 2018 21:46:17 +0000 (13:46 -0800)]
altos/scheme: Allow unicode in lexer

This just passes any bytes with the high bit set through the system so
programs can include UTF-8 in strings and symbols. What the heck.

Signed-off-by: Keith Packard <keithp@keithp.com>
3 months agoaltos/lambdakey-v1.0: Add LED function back in
Keith Packard [Mon, 8 Jan 2018 07:06:51 +0000 (23:06 -0800)]
altos/lambdakey-v1.0: Add LED function back in

We've made things smaller, so there's (barely) space for this now.

Signed-off-by: Keith Packard <keithp@keithp.com>
3 months agoaltos/scheme: remove debug code from vector write
Keith Packard [Mon, 8 Jan 2018 07:06:22 +0000 (23:06 -0800)]
altos/scheme: remove debug code from vector write

Signed-off-by: Keith Packard <keithp@keithp.com>
3 months agoaltos/scheme: Allow individual lisp keywords to be feature-conditional
Keith Packard [Mon, 8 Jan 2018 07:05:02 +0000 (23:05 -0800)]
altos/scheme: Allow individual lisp keywords to be feature-conditional

This lets us build a smaller lisp that is just missing some aliases
for existing functionality to save rom space.

Signed-off-by: Keith Packard <keithp@keithp.com>
3 months agoaltos/scheme: Split tests out from build sources
Keith Packard [Mon, 8 Jan 2018 07:04:22 +0000 (23:04 -0800)]
altos/scheme: Split tests out from build sources

Run tests on both tiny and full scheme test programs.

Signed-off-by: Keith Packard <keithp@keithp.com>
3 months agoaltos/stmf0: Use double buffering for ChaosKey
Keith Packard [Mon, 8 Jan 2018 05:44:39 +0000 (21:44 -0800)]
altos/stmf0: Use double buffering for ChaosKey

This improves the USB performance of ChaosKey so that it doesn't NAK
during data transfers at all.

Signed-off-by: Keith Packard <keithp@keithp.com>
3 months agoao-chaosread: add --raw and --cooked flags
Keith Packard [Mon, 8 Jan 2018 05:43:22 +0000 (21:43 -0800)]
ao-chaosread: add --raw and --cooked flags

Allow reading from the cooked endpoint as well as the raw one.

Signed-off-by: Keith Packard <keithp@keithp.com>
3 months agoaltos/stmf0: use double buffering for USB rx data
Keith Packard [Mon, 8 Jan 2018 01:43:42 +0000 (17:43 -0800)]
altos/stmf0: use double buffering for USB rx data

This also allows us to stop shadowing USB rx buffers in system ram

Signed-off-by: Keith Packard <keithp@keithp.com>
3 months agoaltos/stmf0: Use double buffering for USB tx data
Keith Packard [Sun, 7 Jan 2018 20:43:13 +0000 (12:43 -0800)]
altos/stmf0: Use double buffering for USB tx data

This shouldn't have much of an effect, but shows how double buffering
works.

Signed-off-by: Keith Packard <keithp@keithp.com>
3 months agoaltos/stmf0: Stop shadowing USB tx buffers in system RAM
Keith Packard [Sun, 7 Jan 2018 19:51:07 +0000 (11:51 -0800)]
altos/stmf0: Stop shadowing USB tx buffers in system RAM

Use the 16-bit USB memory directly, avoiding the buffer space and the copy

Signed-off-by: Keith Packard <keithp@keithp.com>
3 months agoaltos/stmf0: Remove packet counters from non-debug build
Keith Packard [Sun, 7 Jan 2018 19:49:09 +0000 (11:49 -0800)]
altos/stmf0: Remove packet counters from non-debug build

These counters are only useful for helping debug the USB driver.

Signed-off-by: Keith Packard <keithp@keithp.com>
3 months agoaltos/kernel: Use ao_put_string for syntax error message
Keith Packard [Sun, 7 Jan 2018 19:47:57 +0000 (11:47 -0800)]
altos/kernel: Use ao_put_string for syntax error message

Avoid using puts, which can be a large library function.

Signed-off-by: Keith Packard <keithp@keithp.com>
3 months agoaltos/lambdakey-v1.0: Switch back to command buffered input
Keith Packard [Sun, 7 Jan 2018 02:11:19 +0000 (18:11 -0800)]
altos/lambdakey-v1.0: Switch back to command buffered input

Instead of just reading from stdin with no echo or editing.

Signed-off-by: Keith Packard <keithp@keithp.com>
3 months agoaltos/scheme: Add ports. Split scheme code up.
Keith Packard [Sun, 7 Jan 2018 01:29:10 +0000 (17:29 -0800)]
altos/scheme: Add ports. Split scheme code up.

And lots of other changes, including freeing unreferenced atoms.

Signed-off-by: Keith Packard <keithp@keithp.com>
3 months agoaltos/scheme: add 'install' target to install both test and tiny test
Keith Packard [Sun, 7 Jan 2018 01:21:45 +0000 (17:21 -0800)]
altos/scheme: add 'install' target to install both test and tiny test

Signed-off-by: Keith Packard <keithp@keithp.com>
3 months agoaltos/scheme: Add vector and string funcs. Test everybody.
Keith Packard [Thu, 4 Jan 2018 10:28:13 +0000 (02:28 -0800)]
altos/scheme: Add vector and string funcs. Test everybody.

Add a bunch of string and vector functions from r7rs. I think most
everything is here now.

Signed-off-by: Keith Packard <keithp@keithp.com>
3 months agoaltos/scheme: Accept more escaped character constants
Keith Packard [Thu, 4 Jan 2018 10:27:11 +0000 (02:27 -0800)]
altos/scheme: Accept more escaped character constants

Allow all those specified in r7rs

Signed-off-by: Keith Packard <keithp@keithp.com>
3 months agoaltos/scheme: Allow make-vector value param to be optional
Keith Packard [Thu, 4 Jan 2018 10:26:21 +0000 (02:26 -0800)]
altos/scheme: Allow make-vector value param to be optional

It can default to #f

Signed-off-by: Keith Packard <keithp@keithp.com>
3 months agoaltos/scheme: Add builtin list-tail
Keith Packard [Thu, 4 Jan 2018 10:25:45 +0000 (02:25 -0800)]
altos/scheme: Add builtin list-tail

This is used enough to warrant a builtin, rather than lisp implementation

Signed-off-by: Keith Packard <keithp@keithp.com>
3 months agoaltos/scheme: Fix macro-detection debugging
Keith Packard [Thu, 4 Jan 2018 10:24:15 +0000 (02:24 -0800)]
altos/scheme: Fix macro-detection debugging

Just update to use ao_scheme_printf

Signed-off-by: Keith Packard <keithp@keithp.com>
3 months agoaltos/scheme: add make-string builtin
Keith Packard [Thu, 4 Jan 2018 10:23:40 +0000 (02:23 -0800)]
altos/scheme: add make-string builtin

Allocate a blank string.

Signed-off-by: Keith Packard <keithp@keithp.com>
3 months agoaltos/scheme: Make constant built pool as large as possible
Keith Packard [Thu, 4 Jan 2018 10:22:02 +0000 (02:22 -0800)]
altos/scheme: Make constant built pool as large as possible

This allows building with as much constant data as will fit.

Signed-off-by: Keith Packard <keithp@keithp.com>
3 months agoaltos/scheme: Make for-each tail recursive
Keith Packard [Wed, 3 Jan 2018 22:58:57 +0000 (14:58 -0800)]
altos/scheme: Make for-each tail recursive

Provides a native version of for-each that is tail recursive, rather
than having it just use map and discard the return value.

Signed-off-by: Keith Packard <keithp@keithp.com>
3 months agoaltos/scheme: Add start/end args to vector->list
Keith Packard [Wed, 3 Jan 2018 22:57:39 +0000 (14:57 -0800)]
altos/scheme: Add start/end args to vector->list

This is an r7rs extension which allows you to extract a subset of the
vector.

Signed-off-by: Keith Packard <keithp@keithp.com>
3 months agoaltos/scheme: fix parsing of vector followed by list
Keith Packard [Wed, 3 Jan 2018 22:56:15 +0000 (14:56 -0800)]
altos/scheme: fix parsing of vector followed by list

The 'parsing a vector' state value wasn't getting cleared at the end
of the vector, so that (#(1 2) (3 4) returned (#(1 2) #(3 4)

Signed-off-by: Keith Packard <keithp@keithp.com>
3 months agoaltos/scheme: support %x format for scheme printf
Keith Packard [Wed, 3 Jan 2018 22:55:24 +0000 (14:55 -0800)]
altos/scheme: support %x format for scheme printf

read debugging uses this format.

Signed-off-by: Keith Packard <keithp@keithp.com>
3 months agoaltos/scheme: Add support for hex, octal and binary constants
Keith Packard [Wed, 3 Jan 2018 22:53:48 +0000 (14:53 -0800)]
altos/scheme: Add support for hex, octal and binary constants

Signed-off-by: Keith Packard <keithp@keithp.com>
3 months agoneed to push telegps-v2.0 loader .bin file to corporate repo, too
Bdale Garbee [Wed, 3 Jan 2018 20:43:29 +0000 (14:43 -0600)]
need to push telegps-v2.0 loader .bin file to corporate repo, too

4 months agoaltos/scheme: Pull out per-frame vals while printing list of frames
Keith Packard [Sun, 24 Dec 2017 22:29:09 +0000 (14:29 -0800)]
altos/scheme: Pull out per-frame vals while printing list of frames

Was using the same vals for all frames, which just doesn't work well.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltos/scheme: Add separate floor-quotient builtin
Keith Packard [Sun, 24 Dec 2017 22:28:29 +0000 (14:28 -0800)]
altos/scheme: Add separate floor-quotient builtin

Does what 'quotient' did before, now quotient rounds towards zero
while floor-quotient rounds down.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoupdate Releasing with wisdom from 1.8.4 release process
Bdale Garbee [Fri, 22 Dec 2017 03:40:28 +0000 (20:40 -0700)]
update Releasing with wisdom from 1.8.4 release process

4 months agoupdate changelog for Debian build debian/1.8.4-1
Bdale Garbee [Fri, 22 Dec 2017 02:08:03 +0000 (19:08 -0700)]
update changelog for Debian build

4 months agoMerge branch 'branch-1.8' into debian
Bdale Garbee [Fri, 22 Dec 2017 02:07:13 +0000 (19:07 -0700)]
Merge branch 'branch-1.8' into debian

4 months agoreleasing 1.8.4 1.8.4
Bdale Garbee [Fri, 22 Dec 2017 02:06:22 +0000 (19:06 -0700)]
releasing 1.8.4

4 months agoMerge branch 'master' into branch-1.8
Bdale Garbee [Fri, 22 Dec 2017 02:05:46 +0000 (19:05 -0700)]
Merge branch 'master' into branch-1.8

4 months agoBump for version 1.8.4
Keith Packard [Fri, 22 Dec 2017 01:37:10 +0000 (17:37 -0800)]
Bump for version 1.8.4

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoDoc updates for version 1.8.4
Keith Packard [Fri, 22 Dec 2017 01:36:24 +0000 (17:36 -0800)]
Doc updates for version 1.8.4

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltos/micropeak: Remove all compiler results
Keith Packard [Wed, 20 Dec 2017 00:57:33 +0000 (16:57 -0800)]
altos/micropeak: Remove all compiler results

Not just the current version.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltos/attiny: Add ADC implementation
Keith Packard [Wed, 20 Dec 2017 00:56:33 +0000 (16:56 -0800)]
altos/attiny: Add ADC implementation

It's primitive, but might serve to read ADC values. Untested.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoao-bringup: turnon_easymini was left with dfu_util disabled
Keith Packard [Wed, 20 Dec 2017 00:21:23 +0000 (16:21 -0800)]
ao-bringup: turnon_easymini was left with dfu_util disabled

This was presumably changed for some test and left in the wrong
state.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltos/easymini-v2.0: Adapt to final hardware pin assignment changes
Keith Packard [Wed, 20 Dec 2017 00:19:40 +0000 (16:19 -0800)]
altos/easymini-v2.0: Adapt to final hardware pin assignment changes

Beeper moved from PB0 to PB1 (Tim3 CH4)
Drogue fire moved from PB6 to PB3
Bootloader moved from PB1 to PB6

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltos/lambdakey-v1.0: Add back and/or macros
Keith Packard [Tue, 19 Dec 2017 21:09:24 +0000 (13:09 -0800)]
altos/lambdakey-v1.0: Add back and/or macros

With scheme shrinking a bit, there's now space for these useful macros.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltos/scheme: Replace per-type indexed stash with poly stash heap
Keith Packard [Tue, 19 Dec 2017 20:39:20 +0000 (12:39 -0800)]
altos/scheme: Replace per-type indexed stash with poly stash heap

Instead of having a random set of stash arrays with explicit indices
used by callers, just have a general heap. Less error prone, and less code.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltos/scheme: Replace memory pool macros with inlines
Keith Packard [Tue, 19 Dec 2017 20:16:24 +0000 (12:16 -0800)]
altos/scheme: Replace memory pool macros with inlines

AO_SCHEME_IS_CONST -> ao_scheme_is_const_addr
AO_SCHEME_IS_POOL -> ao_scheme_is_pool_addr

Provides better typechecking and avoids confusion with
ao_scheme_is_const inline (which takes an ao_poly instead of a void *)

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltos/scheme: AO_SCHEME_IS_CONS -> ao_scheme_is_cons
Keith Packard [Tue, 19 Dec 2017 19:51:33 +0000 (11:51 -0800)]
altos/scheme: AO_SCHEME_IS_CONS -> ao_scheme_is_cons

This inline was already defined; just use it. Also, switch some places
to use ao_scheme_is_pair instead as appropriate.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltos/scheme: ao_scheme__cons -> ao_scheme_cons
Keith Packard [Tue, 19 Dec 2017 19:43:23 +0000 (11:43 -0800)]
altos/scheme: ao_scheme__cons -> ao_scheme_cons

Fix the double underscore in this name. Ick.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltos/scheme: Don't optimize ao_scheme_make_const
Keith Packard [Tue, 19 Dec 2017 19:40:08 +0000 (11:40 -0800)]
altos/scheme: Don't optimize ao_scheme_make_const

Performance isn't interesting, and it's nice to have a bare system
ready for debugging.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltos/scheme: Clean up test CFLAGS
Keith Packard [Tue, 19 Dec 2017 19:39:39 +0000 (11:39 -0800)]
altos/scheme: Clean up test CFLAGS

make it easy to switch between debug and optimized builds.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltos/scheme: (define (foo . bar)) has a pair, not list as card
Keith Packard [Tue, 19 Dec 2017 19:37:33 +0000 (11:37 -0800)]
altos/scheme: (define (foo . bar)) has a pair, not list as card

When defining a lambda with varargs, the args are not a list as the
final element is not a pair or nil. Use pair? instead of list? to
detect this form correctly.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltos/scheme: apply also needs to not free value list on lambdas
Keith Packard [Tue, 19 Dec 2017 19:35:09 +0000 (11:35 -0800)]
altos/scheme: apply also needs to not free value list on lambdas

When apply is invoked on any function, the cons in the argument list
cannot be immediately freed as they have been passed to the
function. That applies to both built-ins as well as lambdas; this
patch removes the special ao_scheme_skip_cons_free global and just
marks the stack in both cases.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltos/scheme: Rework display/write code
Keith Packard [Tue, 19 Dec 2017 19:33:36 +0000 (11:33 -0800)]
altos/scheme: Rework display/write code

Unify output functions and add bool to switch between write and
display mode. Make that only affect strings (as per r⁷rs).

Use print recursion detection in frame and stack code, eliminating
PRINT flags in type field.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltos/scheme: Compile scheme test with -O3
Keith Packard [Mon, 18 Dec 2017 10:14:57 +0000 (02:14 -0800)]
altos/scheme: Compile scheme test with -O3

This level of optimization caused trouble, so use it all of the time.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltos/scheme: Work around gcc 7.2.0 optimization bug in memory manager
Keith Packard [Mon, 18 Dec 2017 10:12:04 +0000 (02:12 -0800)]
altos/scheme: Work around gcc 7.2.0 optimization bug in memory manager

After marking a set of memory chunks, it's possible that all of them
will be packed tight against 'top', in which case none of them will be
moving. In that case, gcc 7.2.0 appears to generate incorrect code
causing the loop to be abandoned, meaning that we don't actually
collect anything at all.

Add a quick short-circuit test just after the mark phase that skips
the code which wouldn't do anything in this case.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltos/scheme: rearrange debugging defines
Keith Packard [Mon, 18 Dec 2017 10:11:07 +0000 (02:11 -0800)]
altos/scheme: rearrange debugging defines

Allow applications to redefine these as desired, add more flexibility
in what the various memory debugging flags can do.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltos/scheme: abort when we try to print an invalid value
Keith Packard [Mon, 18 Dec 2017 10:08:23 +0000 (02:08 -0800)]
altos/scheme: abort when we try to print an invalid value

This can catch a host of interpreter bugs; best to abandon the program
when it happens.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltos/scheme: Use memory manager mark code to note recursive print
Keith Packard [Mon, 18 Dec 2017 06:22:50 +0000 (22:22 -0800)]
altos/scheme: Use memory manager mark code to note recursive print

This flags any object being printed and checks before recursing to
avoid infinite loops.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltos/scheme: Use AO_SCHEME_IS_CONS in cons memory funcs
Keith Packard [Mon, 18 Dec 2017 06:19:38 +0000 (22:19 -0800)]
altos/scheme: Use AO_SCHEME_IS_CONS in cons memory funcs

More efficient than ao_scheme_poly_type as it doesn't care about
non-prim types.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoao-bringup/test-chaoskey: Make finding most recent device more reliable
Keith Packard [Fri, 15 Dec 2017 07:10:43 +0000 (23:10 -0800)]
ao-bringup/test-chaoskey: Make finding most recent device more reliable

Use dmesg -t to strip off the timestamp, which avoids having a
variable number of fields for awk to look at.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltos/lambdakey-v1.0: shrink scheme code to fit the ROM
Keith Packard [Fri, 15 Dec 2017 07:09:02 +0000 (23:09 -0800)]
altos/lambdakey-v1.0: shrink scheme code to fit the ROM

scheme has grown a bit; adapt

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltos/scheme: swap BIGINT and STRING types
Keith Packard [Fri, 15 Dec 2017 07:04:39 +0000 (23:04 -0800)]
altos/scheme: swap BIGINT and STRING types

This lets BIGINT be a primitive type, allowing it to use all 32 bits
for storage. This does make strings another byte longer, and also
slightly harder to deal with. It's a trade off.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltos/scheme: integer? is builtin on all versions
Keith Packard [Wed, 13 Dec 2017 02:07:06 +0000 (18:07 -0800)]
altos/scheme: integer? is builtin on all versions

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltos/lambdakey-v1.0: Make stack larger
Keith Packard [Wed, 13 Dec 2017 02:02:17 +0000 (18:02 -0800)]
altos/lambdakey-v1.0: Make stack larger

scheme doesn't like to run with less than a 1kB stack.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltos/scheme: inline some mem calls to reduce stack usage.
Keith Packard [Wed, 13 Dec 2017 02:01:21 +0000 (18:01 -0800)]
altos/scheme: inline some mem calls to reduce stack usage.

Also includes some code to display stack usage during collect calls.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltos/scheme: Use direct calls from frame to frame_vals mem functions
Keith Packard [Wed, 13 Dec 2017 02:00:12 +0000 (18:00 -0800)]
altos/scheme: Use direct calls from frame to frame_vals mem functions

Avoids the extra stack depth of the poly versions.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltos/scheme: More compiler warning cleanups
Keith Packard [Wed, 13 Dec 2017 01:59:26 +0000 (17:59 -0800)]
altos/scheme: More compiler warning cleanups

Make local funcs static. Don't mix decls and code.x

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltos/scheme: apply const to places taking const strings.
Keith Packard [Wed, 13 Dec 2017 01:54:03 +0000 (17:54 -0800)]
altos/scheme: apply const to places taking const strings.

Mostly printf and friends.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltos/stm: Align 'data' to 8 bytes, just like textram
Keith Packard [Tue, 12 Dec 2017 23:31:27 +0000 (15:31 -0800)]
altos/stm: Align 'data' to 8 bytes, just like textram

The textram section must be aligned to 8 bytes to keep the linker
happy. However, if that section contains no data, the declaration will
set the __data_start__ value to that alignment, but the data section
itself would start on a 4-byte alignment, potentially 4 bytes lower
than the value indicated by __data_start__. This completely scrambles
initialized memory as the startup code will copy the data segment to
__data_start__, 4 bytes off of the actual data segment start.

Fix this by forcing the data segment to also be aligned to 8 bytes.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltos/kernel: Allow ao_cmd to be built without tasking
Keith Packard [Tue, 12 Dec 2017 23:30:45 +0000 (15:30 -0800)]
altos/kernel: Allow ao_cmd to be built without tasking

Useful for single-threaded applications, like lambdakey

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltos/lambdakey-v1.0: Get this building again
Keith Packard [Tue, 12 Dec 2017 23:27:26 +0000 (15:27 -0800)]
altos/lambdakey-v1.0: Get this building again

The lambdakey can't hold a full implementation of the scheme
interpreter, so use only a subset, removing floats, bigints and
vectors. Also reduce the pre-loaded lisp code as well.

It's pretty spare at this point; but it does fill the ROM.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltos/scheme: Support scheme subsetting via feature settings
Keith Packard [Tue, 12 Dec 2017 23:25:51 +0000 (15:25 -0800)]
altos/scheme: Support scheme subsetting via feature settings

This provides for the creation of smaller versions of the interpreter,
leaving out options like floating point numbers and vectors.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltos/scheme: Add ao_scheme_vector.c
Keith Packard [Tue, 12 Dec 2017 23:15:41 +0000 (15:15 -0800)]
altos/scheme: Add ao_scheme_vector.c

Useful to include the code for implementing vectors

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agodoc: Don't 'publish' release notes, don't build pdf release notes
Keith Packard [Tue, 12 Dec 2017 06:36:00 +0000 (22:36 -0800)]
doc: Don't 'publish' release notes, don't build pdf release notes

All we use the release notes for is to include into the main AltOS
page. Also remove the docinfo for these files so that information
isn't duplicated for each set of release notes.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoupdate Releasing with changes discovered in 1.8.3 release process
Bdale Garbee [Tue, 12 Dec 2017 05:15:46 +0000 (22:15 -0700)]
update Releasing with changes discovered in 1.8.3 release process

4 months agoupdate changelog for Debian build debian/1.8.3-1
Bdale Garbee [Tue, 12 Dec 2017 04:40:52 +0000 (21:40 -0700)]
update changelog for Debian build

4 months agoMerge branch 'branch-1.8' into debian
Bdale Garbee [Tue, 12 Dec 2017 04:39:38 +0000 (21:39 -0700)]
Merge branch 'branch-1.8' into debian

4 months agoreleasing 1.8.3 1.8.3
Bdale Garbee [Tue, 12 Dec 2017 04:38:59 +0000 (21:38 -0700)]
releasing 1.8.3

4 months agoMerge branch 'master' into branch-1.8
Bdale Garbee [Tue, 12 Dec 2017 04:37:48 +0000 (21:37 -0700)]
Merge branch 'master' into branch-1.8

4 months agoTeleMega default is now v3.0
Bdale Garbee [Tue, 12 Dec 2017 04:33:21 +0000 (21:33 -0700)]
TeleMega default is now v3.0

4 months agodoc: Update release notes and docinfo for 1.8.3
Keith Packard [Tue, 12 Dec 2017 00:30:46 +0000 (16:30 -0800)]
doc: Update release notes and docinfo for 1.8.3

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltoslib: Keep old GPS values when updating data
Keith Packard [Mon, 11 Dec 2017 22:42:45 +0000 (14:42 -0800)]
altoslib: Keep old GPS values when updating data

This way, updating satellite information doesn't drop all of the
regular GPS data on the floor.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltos: Actually store current MPU9250 data in data ring
Keith Packard [Mon, 11 Dec 2017 22:08:32 +0000 (14:08 -0800)]
altos: Actually store current MPU9250 data in data ring

The ring is updated when the ADC finishes; all of the other sensor
data needs to be copied in at that point.

Signed-off-by: Keith Packard <keithp@keithp.com>