summaryrefslogtreecommitdiffstatshomepage
path: root/stmhal/pendsv.c
Commit message (Collapse)AuthorAge
* all: Use the name MicroPython consistently in commentsAlexander Steffen2017-07-31
| | | | | There were several different spellings of MicroPython present in comments, when there should be only one.
* stmhal: Clean up some header includes.Damien George2017-07-03
|
* stmhal/pendsv: Disable interrupts during a thread switch.Damien George2017-03-20
| | | | | | | | We can actually handle interrupts during a thread switch (because we always have a valid stack), but only if those interrupts don't access any of the thread state (because the state may not correspond to the stack pointer). So to be on the safe side we disable interrupts during the very short period of the thread state+stack switch.
* stmhal: Use generic interrupt char code.Damien George2017-02-15
|
* stmhal: Initial implementation of multithreading, currently disabled.Damien George2017-01-31
| | | | | | | | | | | | | | | This patch brings the _thread module to stmhal/pyboard. There is a very simple round-robin thread scheduler, which is disabled if there is only one thread (for efficiency when threading is not used). The scheduler currently switches threads at a rate of 250Hz using the systick timer and the pend-SV interrupt. The GIL is disabled so one must be careful to use lock objects to prevent concurrent access of objects. The threading is disabled by default, one can enabled it with the config option MICROPY_PY_THREAD to test it out.
* stmhal/pendsv: Fill in comments about what the stack contains.Damien George2017-01-31
|
* stmhal: Rename mp_const_vcp_interrupt to mp_kbd_exception.Damien George2016-12-15
| | | | | | | | mp_kbd_exception is now considered the standard variable name to hold the singleton KeyboardInterrupt exception. This patch also moves the creation of this object from pyb_usb_init() to main().
* stmhal: Add symbolic #defines for interrupt levels in irq.h.Dave Curtis2015-11-01
|
* stmhal: Replace #include "stm32f4xx_hal.h" with #include STM32_HAL_H.Dave Hylands2015-07-30
|
* stmhal: Make pendsv variable non-static so gcc-5 doesn't opt it away.Damien George2015-05-23
|
* stmhal: Remove some unnecessary declarations, purely for cleanup.Damien George2015-03-20
|
* stmhal: Collect all root pointers together in 1 place.Damien George2015-01-07
| | | | | A GC in stmhal port now only scans true root pointers, not entire BSS. This reduces base GC time from 1700ms to 900ms.
* py: Put all global state together in state structures.Damien George2015-01-07
| | | | | | This patch consolidates all global variables in py/ core into one place, in a global structure. Root pointers are all located together to make GC tracing easier and more efficient.
* stmhal: Prefix includes with py/; remove need for -I../py.Damien George2015-01-01
|
* py: Add mp_pending_exception global variable, for VM soft interrupt.Damien George2014-10-25
| | | | | | | | | | | This allows to implement KeyboardInterrupt on unix, and a much safer ctrl-C in stmhal port. First ctrl-C is a soft one, with hope that VM will notice it; second ctrl-C is a hard one that kills anything (for both unix and stmhal). One needs to check for a pending exception in the VM only for jump opcodes. Others can't produce an infinite loop (infinite recursion is caught by stack check).
* stmhal: Include mpconfig.h before all other includes.Paul Sokolovsky2014-06-28
| | | | | | It defines types used by all other headers. Fixes #691.
* Add license header to (almost) all files.Damien George2014-05-03
| | | | | | | Blanket wide to all .c and .h files. Some files originating from ST are difficult to deal with (license wise) so it was left out of those. Also merged modpyb.h, modos.h, modstm.h and modtime.h in stmhal/.
* stmhal: Get USB enumerating a CDC device.Damien George2014-03-14
Enumerates CDC device over USB, but doesn't transmit/receive yet.