| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
| |
This allows the user to specify which compiler to use for each target
CPU. Also checks to make sure the arm compiler supports -m0 and -m3
cpu type flags. The build now actually uses the specified compilers too.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
| |
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
This sticks a barrier in the CPU to prevent using the wrong stack
register past the change.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Need to ensure that the CPU is actually using the MSI during timer
init or all of the other clock changes won't work
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Stuff from when we weren't using systick
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
Disable the separate stack as that means we can't figure out the PC
from the timer interrupt. Move ao_idle_loc after the interrupt release
so that we see idle tasks correctly.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Use /opt/cortex until we make the packaged one work
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Adds new telemetry and logging formats along with code for TeleMetrum
v2.0 design.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
This splits the fast-timer portion out of the debounce helper code and
shares that with the quadrature driver which now uses it directly.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
| |
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
This asks the EXTI code to not mess with the pin configuration so that
the MS5607 driver can get interrupts on the MISO pin while still using
it for SPI.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
| |
| |
| |
| |
| | |
This should be used on every processor
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|/
|
|
|
|
| |
This makes sure we use the known toolchain for STM32L builds
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
If other drivers use the SPI bus, the MPU6000 gets confused as its
sitting on the bus looking for I2C messages. Just grab the mutex
before the OS is running and hold onto it until the MPU6000 has been initialized.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
telemega moves the igniters around so that E/F are now drogue/main.
Add custom labels for ADC values to make parsing possible
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
Clearly the pin isn't quite ready just after it's been configured, so
hang around for a while (100 nops) to let things setting down before
testing the value of the pin. Makes booting a lot more reliable.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Split the flash loader prototype into pieces so that each product can
build a custom flash loader with very little code.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
.rodata* needs to be in flash; otherwise strings get left in ram.
Failing to align sections makes the initialized data get dumped into
the wrong place in memory.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
This causes the flash loader startup code to fall into the loader when
the application sets the boot address to zero.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
This lets the self flashing loader be linked without any of the stdio
code, which saves a bunch of memory.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Allows that value to change
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Includes the boot chain stuff
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
With the flash loader now < 4kB, we can use the spare 4kB for applications
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Saves 4kB of flash space for applications.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
This removes all of the support for the base 100Hz timer from the
system, saving space when not needed
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
The necessary data structures aren't defined in this case.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
|
|
| |
works
Would be nice to be able to explicitly define addresses for the
romconfig variables, but I can't figure out how to make that
work. Instead, just explicitly load the files in teh right order to
make things land in the right places.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Uses objcopy -O ihex to extract the initialized bits from an elf file
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Wait for flash to go non-busy after writing or erasing a page and
before jumping back out of the RAM code.
Export a separate 'erase' operation for testing.
Re-lock flash after every operation.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
|
| |
If the first block of boot memory has been smashed, and the start
address is bogus, don't bother trying to jump to the
application. This makes the system more resiliant to flash failures,
presuming the loader erases the first block, programs the other blocks
and then finally comes back to program the first block.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
| |
For some reason, the silly linker marks things in section .boot as
data rather than bss, so they'd end up initialized by default. Force
them to be NOLOAD so they preserve values across reboot so that boot
chaining works properly.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Split out code into separate files.
Add support for getting back to boot loader from application.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
And get it loaded to RAM so it can execute correctly.
Nothing calls it yet...
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
This shrinks the base OS load down a bit as well so that stm-flash
fits comfortably in the first 8kB of memory.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
This allows the real application to get loaded at 0x2000 and jumps to
that at startup time if the boot pin is set appropriately
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
It's probably more power efficient than using one of the timers, and
it's certainly easier to configure.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
This reserves 512 bytes of memory for a stack, then makes sure that
exceptions continue to use that stack while processes use the per-task
stack.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
This allows each LCD segment to be individually configured as to which
COM and which SEG drives it, permitting maximum flexibility in wiring.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Handl EP0 actions from interrupt handler. This allows USB to be used
in a taskless environment, like the STM flash loader
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
I haven't figured out how to assign addresses for specific initialized
variables, so we'll just have to always declare all of them and make
sure that we add new ones at the end.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
|
|
|
|
| |
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
|
| |
This moves the crc_errors into the new structure and adds a receiver
battery voltage value there as well. Now the receiver status can be
monitored separately from the flight status. That also means that code
receiving state updates should be prepared to accept missing listener
or flight state values.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Unlike the AVR and CC1111 USB drivers, the STM usb driver queues IN
bytes in a local buffer instead of in the driver; this means that the
driver is queuing bytes while the previous IN packet is queued for the
host, which allows for overlapping execution.
It also means that when the local buffer is full, we must check to see
if the host has picked up the previous IN packet before trying to
queue another IN packet for transmission. This is done by always
waiting for the IN buffer to be ready before sending data.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
This adds a pile of debugging hooks to the USB driver to try and
isolate various lockup-related issues. It's all disabled by default,
of course.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
|
|
| |
getchar relies on interrupts being blocked across the pollchar calls
and into the sleep call or it may go to sleep with data pending.
This prefixes all pollchar functions with _ to indicate that they are
to be called with interrupts blocked and eliminates all interrupt
manipulation calls from within the pollchar functions.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
| |
The newer(?) chips in telegps didn't like the previous programming
scheme, so go back to fixed time for write, which does an implicit
erase before every write. Also clear the DATA bit, which is only
needed for double word erase/programming.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
SD cards require 0xff when fetching data
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|\ |
|