| Commit message (Collapse) | Author | Age |
... | |
|
|
|
|
|
|
| |
More efficient than ao_scheme_poly_type as it doesn't care about
non-prim types.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
scheme has grown a bit; adapt
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
scheme doesn't like to run with less than a 1kB stack.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Also includes some code to display stack usage during collect calls.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Avoids the extra stack depth of the poly versions.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Make local funcs static. Don't mix decls and code.x
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Mostly printf and friends.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Useful for single-threaded applications, like lambdakey
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Useful to include the code for implementing vectors
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
These never saw the light of day.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
|
|
|
|
|
|
|
| |
Set mag sensor to provide data at 100Hz.
Set i2c master to pull mag data at sample rate (200Hz).
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Reset exceptions at the top so that we can call it more than once.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Redefines some stdio bits so that we can build with either pdclib or
newlib + avr stdio.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
| |
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
scheme is now way too large to fit on this device; some subsetting is
clearly indicated.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
| |
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
It's only 32kB.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Large numbers, floats and strings need a value check, not just a
comparison between ao_polys
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Large ints, strings and floats can cause allocation, requiring that
the 'cons' pointer be stashed and retrieved in case it moved.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
A lot easier as a built-in; the obvious scheme version is recursive.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
These are only collected for debug purposes, but can get quite large
if the interpreter runs for a while.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Just make the language closer to r7rs
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Use ao_scheme_cons_cdr to fetch the next list element as that returns
NULL for non-cons elements.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Constant time and smaller can be a feature.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
.lisp -> .scheme
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
This lets the interactive prompt change based on what state the lexer
is in
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
| |
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
| |
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
| |
ao_scheme_make_const
This ensures that a parallel build will wait for ao_scheme_builtin.h
to be complete before attempting to compile ao_scheme_make_const
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Keeps it away from the usual test setup
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
| |
Constant block is now built in a subdir to avoid messing up source
directory.
Renamed to ao_scheme to reflect language target.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
|
| |
Scheme uses bare symbols to indicate a varargs parameter; any bare
(i.e., not wrapped in a cons cell) parameter will get the 'rest' of
the parameter list. This works for lambdas, nlambdas and macros. As a
result, the 'lexpr' form has been removed as it is equivalent to a
lambda with a varargs formal.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Must un-stash before allocation failure check.
Use frame_stash instead of poly_stash for frames.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
The cdr may have moved, so we can't look at the target object
type. Fortunately, the base type encoded in the reference itself is
sufficient to check for a non-cons cdr.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
Split read debug into a separate #define to reduce debug noise
Add some memory validation -- validate stash API, and validate
cons_free calls.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
atof returns double, strtof returns float.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Use defines where possible, use (define (name args ...)) form for lambdas
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
When an int computation overflows, switch to float.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
| |
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Adds files to build telemega v3.0 flash loader and firmware
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Use MPU9250 for accel, gyro and mag data in logging, telemetry and
flight status computations.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
In scheme, set can only re-define existing variables while def cannot
redefine existing variables in lambda context. Def within lambda
creates a new variable at the nearest enclosing scope.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
This lets the frame be resized without moving the base structure. The
plan is to allow all frames to be resized, not just the global frame.
Signed-off-by: Keith Packard <keithp@keithp.com>
|