| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When set, this causes the task switching code to avoid blocking IRQs
while looking for an idle task as that can increase IRQ latencies
enough to drop characters at 115200 baud on the cc1111. Note that this
*also* eliminates the ability to use low power modes as we cannot know
at any point whether some interrupt has come along and woken a task.
Has no effect when using task queues as those require IRQs to be
blocked while looking at the queue. Shouldn't be a problem there
though as the check for no running tasks is very cheap.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Cache the next wakeup time and check that before jumping to the task
code.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Otherwise, we run the risk of an interrupt waking a task after we've
decided to idle the CPU.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
| |
This replaces the array-based scheduler with a queue-based one
instead. It should have the same basic scheduling semantics, but it
walks shorter lists for each operation, making it much more efficient
when the system has a lot of tasks.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
This marks the lowest portion of the stack as inaccessible to the CPU,
causing the processor to fault when it reaches it. The fault then
generates a panic message so that the user can know what happened.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Add sample-based profiling, using a 1kHz timer
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
ao_delay hasn't been chip-specific for a long time, and it had a bug
in not calling ao_clear_alarm.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
This keeps the two main task references (index and pointer) in
agreement during task switching, avoiding an extra assignment at the
end of the task switching loop.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
Stack overflow often happens from interrupt handlers sitting on top of
a task stack. Check for this during ao_wakeup as that is often called
during interrupt processing.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Using ao_arch_critical around the wchan setting will force interrupts
to be re-enabled before ao_yield records the state of that bit,
potentially causing problems with functions not atomically testing and
sleeping.
Tasks that need to set wchan with interrupts disabled should have
interrupts disabled when entering ao_sleep already.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Would truncate 32-bit pointers on arm.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
Uses the radio_cmac module to provide secure communication.
Keeps igniter closed for 500ms.
Provides remote status for arming and ignition.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
This completes the basic task of making an AVR version of altos by
getting the Teensy 'avr-demo' program to build.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
More arch-indepdency bits.
GCC stdio is different from SDCC, so create suitable code in
avr/ao_avr_stdio.c
Create macros to initialize the task stack frame and save the task
context.
Add GCC/SDCC type definition compatibility macros
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
Split out sources into separate directories:
core: architecture and product independent bits
cc1111: cc1111-specific code
drivers: architecture independent drivers
product: product-specific sources and Makefile fragments
util: scripts for building stuff
This should have no effect on the built products, but testing is encouraged
Signed-off-by: Keith Packard <keithp@keithp.com>
|