aboutsummaryrefslogtreecommitdiff
path: root/libraries
AgeCommit message (Collapse)Author
2019-01-12Timing tests for RSA signing and sub-components thereof.Paul Selkirk
This is not the sort of thing that should go anywhere near production code, so it's on a dangling branch. I may rebase it from time to time.
2018-05-27Script to run a test with HSM profiling.Rob Austein
2018-05-01Fix mbed vpath not to use explicit (and wrong) pathsPaul Selkirk
2018-04-19Cleanup: warn of signed/unsigned mismatches in libhal.Paul Selkirk
This is from October's cleanup binge, but I forgot to commit it at the time.
2018-04-06Merge branch 'profiling'Paul Selkirk
2017-10-11Cleanup 'unused parameter' warnings, a couple of which are actual coding errors.Paul Selkirk
2017-10-11Cleanup: signed/unsigned mismatches, mostly in loop countersPaul Selkirk
2017-09-21cleanupPaul Selkirk
2017-09-07Rebase branch 'profiling' from masterPaul Selkirk
2017-09-07Sigh, right offset for the wrong register. Get the PC (the address wePaul Selkirk
interrupted) rather than LR (the return address from the function we interrupted). Also, change u_short and u_int to unsigned short and unsigned int, since gcc recently decided that those aren't part of the C99 standard. Finally, add profilable versions of memcpy, memset, and friends, because they get called a lot in the course of unit testing, and it would be nice to know who's calling them.
2017-09-07Correct offset to get the PC.Paul Selkirk
A previous version of this code ran over the RTOS, where threads used the Process Stack, while the SysTick interrupt used the Main Stack. Now everything's on the main stack, so we need to account for 2 extra words that SysTick_Handler pushes on the stack at entry.
2017-09-07Port profiling code, using a new SysTick hook and new CLI commands.Paul Selkirk
2017-09-07Copy profiling code from MCUOnEclipse.Paul Selkirk
2017-08-31Withdraw SysTick_hook (commit 9ffead1), because it turns out there was ↵Paul Selkirk
already a user-callback mechanism with HAL_SYSTICK_IRQHandler() and HAL_SYSTICK_Callback().
2017-07-31Add a generic SysTick hook, to call a function on every 1ms tick, because ↵Paul Selkirk
it's easier than setting up a dedicated timer.
2017-06-17Fix optimization settings in HSM's build of libtfm.Rob Austein
2017-05-10Sigh, right offset for the wrong register. Get the PC (the address wePaul Selkirk
interrupted) rather than LR (the return address from the function we interrupted). Also, change u_short and u_int to unsigned short and unsigned int, since gcc recently decided that those aren't part of the C99 standard. Finally, add profilable versions of memcpy, memset, and friends, because they get called a lot in the course of unit testing, and it would be nice to know who's calling them.
2017-05-06Correct offset to get the PC.Paul Selkirk
A previous version of this code ran over the RTOS, where threads used the Process Stack, while the SysTick interrupt used the Main Stack. Now everything's on the main stack, so we need to account for 2 extra words that SysTick_Handler pushes on the stack at entry.
2017-05-05Port profiling code, using a new SysTick hook and new CLI commands.Paul Selkirk
2017-05-04Copy profiling code from MCUOnEclipse.Paul Selkirk
2017-04-29Remove exception handlders that I probably shouldn't have defined in the ↵Paul Selkirk
first place.
2017-04-29Remove rtos source files.Paul Selkirk
2017-04-17Use default SysTick interrupt priority.Paul Selkirk
We really don't want SysTick_Handler, which runs the task scheduler, to run at a higher priority than SVC_Handler, which runs supposedly-atomic operations like mutex locking and unlocking. I've seen a mutex lock/unlock mismatch which I think is due to interrupting rt_mut_release at a particularly inopportune moment.
2017-04-01Change RPC UART to have a high-priority thread monitoring a large(ish) DMAPaul Selkirk
buffer, because we've observed out-of-order receives under load.
2016-09-20Still some problem with uart receive under heavy load, so change to a 2-byte ↵Paul Selkirk
receive buffer with half-complete callbacks, and raise the dma priority.
2016-09-01"make clean" needs to use "rm -f" to avoid gratuitous failures.Rob Austein
2016-07-21Use a fresh port of libcli, which retains more of the original API.Paul Selkirk
2016-07-06Fix the way code is commented out, to avoid compiler warnings.Paul Selkirk
2016-07-06Simplify library Makefiles by using symbols defined in top-level Makefile, ↵Paul Selkirk
rather than re-deriving them.
2016-06-25Split LIB*_DIR into _SRC and _BLD.Paul Selkirk
Also rename all instances of GNUmakefile to Makefile.
2016-06-25Finish unwinding subrepository hairball: VPATH setup.Rob Austein
2016-06-24Start unwinding subrepository hairball: remove submodules.Rob Austein
2016-06-23Drag in libhal update.Rob Austein
2016-06-23Drag submodule updates into sw/stm32.Rob Austein
2016-06-21Update sw/stm32 to track recent subrepository commits, since without them it ↵Rob Austein
no longer compiles (sigh).
2016-06-14Pull in sw/libhal CLIENT_TRANSPORT makefile fix.Rob Austein
2016-06-14Pull libhal changes into stm32 subrepo.Rob Austein
2016-06-14Bring sw/stm32 super-repository up to date with the ten zillionRob Austein
commits which have been made in other repositories since the last time anybody bothered to synchronize this. Poster child for why this kind of recursive hairball belongs in release engineering rather than in source code repositories which are under active development, but that yak can wait a little while longer for its shave.
2016-06-13Only the HSM project needs the RTOS; most of the test projects can use the ↵Paul Selkirk
STM32 HAL code directly.
2016-06-13Add __end symbols for CCMRAM and SDRAM sections.Paul Selkirk
This lets us, say, use these sections for stack or heap.
2016-06-13SDRAM is for uninitialized data only.Paul Selkirk
We don't plan to put initialized data in SDRAM, and we don't have startup code to copy initialized data, so don't even bother. Further, the linker will reserve space in FLASH, even for uninitialized data, so just don't.
2016-06-09Put thread stack buffers in SDRAM, because pkey uses a lot of stack.Paul Selkirk
Also rearchitect the way we handle RPC requests - have a bunch of waiting dispatch threads rather than continually creating and deleting threads.
2016-06-07fix some commentsFredrik Thulin
2016-06-06Split HAL_UART_RxCpltCallback into uart-specific callbacks.Paul Selkirk
2016-06-06Refactor HAL_UART_MspInit, link DMA in MX_USART*_UART_Init so ↵Paul Selkirk
HAL_UART_MspInit doesn't have to.
2016-06-06Fix UART pin assignments. (It uses the Alternate in any case.)Paul Selkirk
2016-06-06Fix definition of LED_RED in mbed_die.Paul Selkirk
2016-06-02Use DMA for UART RX instead of interrupts.Fredrik Thulin
DMA is more efficient and less prone to miss characters than interrupts. An open question is if circular mode is really the best. If someone copy-pastes more than the RX buffer size of configuration into the CLI, we risk the DMA controller catching up with the reader and overwriting data not yet read. Since we don't have flow control back to the users terminal, we will always fail if too much data is entered before we can process it. The question is if failing to stuff new data at the end of a buffer might be better than data being overwritten - thus messing up the commands in unpredictable ways.
2016-06-01Implement circular buffer UART RX using interrupts.Fredrik Thulin
2016-05-26Implement a bootloader.Fredrik Thulin
This bootloader is now the application at 0x08000000 (FLASH start), which the STM32 will execute upon reset. The other applications are now loaded at 0x08030000 (128 KB into the flash) and will never get started unless the bootloader has been programmed into flash too.