summaryrefslogtreecommitdiff
path: root/src/stm
Commit message (Collapse)AuthorAge
* Add --with parameters to configure for compiler selectionnew-stateKeith Packard2013-10-08
| | | | | | | | 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>
* altos/stm: New GAS version requires flags in APSR assignmentKeith Packard2013-10-08
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lpc, altos/stm: ARM requires ISB after switching stack pointersKeith Packard2013-10-07
| | | | | | | 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>
* altos/stm: Make sure we switch to MSI during timer initKeith Packard2013-08-28
| | | | | | | 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>
* altos/stm: Remove stale timer definesKeith Packard2013-08-28
| | | | | | Stuff from when we weren't using systick Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stm: Make sampling profiler work againKeith Packard2013-08-28
| | | | | | | | 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>
* altos/stm: New compiler doesn't correctly build flash bits yetKeith Packard2013-08-28
| | | | | | Use /opt/cortex until we make the packaged one work Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Initial TeleMetrum v2.0 bitsKeith Packard2013-08-27
| | | | | | | Adds new telemetry and logging formats along with code for TeleMetrum v2.0 design. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add fast-timer API. Use for quadrature and button driversKeith Packard2013-06-09
| | | | | | | 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>
* altos: Add debounce helper. Use in button and quadrature drivers for TeleLCOKeith Packard2013-06-09
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* Merge branch 'lpc'Keith Packard2013-05-21
|\
| * altos: Add EXTI_PIN_NOCONFIGURE to exti interface, use for MS5607Keith Packard2013-05-19
| | | | | | | | | | | | | | | | 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>
| * altos: Move ao_data.c from stm to coreKeith Packard2013-05-18
| | | | | | | | | | | | This should be used on every processor Signed-off-by: Keith Packard <keithp@keithp.com>
* | altos: Set the path for the STM32L compiler explicitlyKeith Packard2013-05-21
|/ | | | | | This makes sure we use the known toolchain for STM32L builds Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Grab SPI mutex until MPU6000 I2C mode is disabledKeith Packard2013-05-15
| | | | | | | | 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>
* altos: Fix telemega v0.3 igniter order (drogue/main moved). Label ADC dumpKeith Packard2013-05-15
| | | | | | | 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>
* altos: Wait after configuring boot pin before testing itKeith Packard2013-05-07
| | | | | | | | 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>
* altos/stm: Create per-product flash loadersKeith Packard2013-05-07
| | | | | | | 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>
* altos: Get rodata into flash, make sure sections are alignedKeith Packard2013-05-07
| | | | | | | | .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>
* altos: Run self loader when application sets boot addr to 0Keith Packard2013-05-07
| | | | | | | 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>
* altos: Allow STM usb driver to be used without stdioKeith Packard2013-05-07
| | | | | | | 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>
* altos/stm-flash: Check target flash address against AO_BOOT_APPLICATION_BASEKeith Packard2013-05-07
| | | | | | Allows that value to change Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Use flash loader on all STM productsKeith Packard2013-05-07
| | | | | | Includes the boot chain stuff Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stm: Provide another 4kB of flash space for appsKeith Packard2013-05-07
| | | | | | With the flash loader now < 4kB, we can use the spare 4kB for applications Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stm: Shrink stm flash loader to < 4kBKeith Packard2013-05-07
| | | | | | Saves 4kB of flash space for applications. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stm: Allow core timer to be excluded from buildKeith Packard2013-05-07
| | | | | | | 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>
* altos/stm: Don't define task macros when not taskingKeith Packard2013-05-07
| | | | | | The necessary data structures aren't defined in this case. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stm: Add comments to the .ld files explaining how the romconfig stuff ↵Keith Packard2013-05-07
| | | | | | | | | | | 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>
* altos/stm: Add .elf to .ihx ruleKeith Packard2013-05-07
| | | | | | Uses objcopy -O ihex to extract the initialized bits from an elf file Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Fix STM flash programmingKeith Packard2013-05-07
| | | | | | | | | | | 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>
* altos: Validate boot chain start addressKeith Packard2013-05-07
| | | | | | | | | | 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>
* altos: Mark .boot section as (NOLOAD)Keith Packard2013-05-07
| | | | | | | | | 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>
* altos: Clean up boot loader supportKeith Packard2013-05-07
| | | | | | | Split out code into separate files. Add support for getting back to boot loader from application. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add program flash functionKeith Packard2013-05-07
| | | | | | | | And get it loaded to RAM so it can execute correctly. Nothing calls it yet... Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Make stm-flash capable of switching to applicationKeith Packard2013-05-07
| | | | | | | 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>
* Add STM self-flashing loaderKeith Packard2013-05-07
| | | | | | | 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>
* altos: Use SYSTICK on STM32LKeith Packard2013-05-07
| | | | | | | 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>
* altos: Use separate exception stack on STM32LKeith Packard2013-05-07
| | | | | | | | 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>
* altos: Allow LCD segments to not be multiplexed across digitsKeith Packard2013-05-07
| | | | | | | 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>
* altos/stm: Remove USB EP0 taskKeith Packard2013-05-07
| | | | | | | 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>
* altos/stm: Always declare all romconfig variablesKeith Packard2013-05-07
| | | | | | | | 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>
* name change from MegaMetrum to TeleMegaBdale Garbee2013-04-22
|
* Move cortex toolchain to /opt/cortexKeith Packard2013-04-22
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib/altosui: Carry receiver status around in AltosListenerStateKeith Packard2013-04-09
| | | | | | | | | | 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>
* altos/stm: Always check for idle IN buffer before sendingKeith Packard2013-03-31
| | | | | | | | | | | | | | 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>
* altos/stm: Add debugging mechanism to STM USB driverKeith Packard2013-03-31
| | | | | | | | 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>
* altos: Do not release interrupts from any pollchar functionKeith Packard2013-03-31
| | | | | | | | | | | 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>
* altos: Use FTDW, clear DATA bit. Disable backup write protectionKeith Packard2013-03-27
| | | | | | | | | 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>
* altos/stm: Ensure SPI always sends 0xff during receiveKeith Packard2013-03-26
| | | | | | SD cards require 0xff when fetching data Signed-off-by: Keith Packard <keithp@keithp.com>
* Merge branch 'telescience-v0.2'Keith Packard2013-02-24
|\