summaryrefslogtreecommitdiffstatshomepage
path: root/stmhal/main.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.
* all: Use full path name when including mp-readline/timeutils/netutils.Damien George2017-03-31
| | | | | | | This follows the pattern of how all other headers are now included, and makes it explicit where the header file comes from. This patch also removes -I options from Makefile's that specify the mp-readline/timeutils/ netutils directories, which are no longer needed.
* extmod/vfs_fat: Remove obsolete and unused str/len members.Damien George2017-03-10
|
* stmhal/main: Allocate flash's VFS struct on the heap to trace root ptrs.Damien George2017-03-10
|
* stmhal: Use mp_hal_delay_ms instead of HAL_Delay.Damien George2017-03-02
|
* stmhal/main: Remove unnecessary header includes.Damien George2017-02-17
|
* stmhal: Implement a proper thread scheduler.Damien George2017-02-15
| | | | | | This patch changes the threading implementation from simple round-robin with busy waits on mutexs, to proper scheduling whereby threads that are waiting on a mutex are only scheduled when the mutex becomes available.
* stmhal: Add ability to skip booting from SD card via /flash/SKIPSD file.Damien George2017-02-07
|
* stmhal: Fix build issue when MICROPY_PY_THREAD is disabled.Damien George2017-01-31
|
* stmhal/main: Use _estack value to initialise stack extents.Damien George2017-01-31
|
* 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/main: Guard init_sdcard_fs with MICROPY_HW_HAS_SDCARD.Damien George2017-01-31
|
* stmhal/main: Put /sd directory before /flash in sys.path.Damien George2017-01-31
| | | | | If the SD card is mounted then its libraries (ie those that are imported) should override any in /flash.
* stmhal: On boot, mount all available partitions of the SD card.Damien George2017-01-31
| | | | | | | | The first partition is mounted as "/sd" and subsequent partitions are mounted as "/sd<part_num>". This is backwards compatible with the previous behaviour, which just mounted the first partition on "/sd". At this point, only FatFs filesystems are mounted.
* stmhal: Use LED constants from PYBv4 onwards.Damien George2017-01-30
|
* extmod: Merge old fsusermount.h header into vfs.h and vfs_fat.h.Damien George2017-01-30
| | | | | vfs.h is for generic VFS declarations, and vfs_fat.h is for VfsFat specific things.
* stmhal: Fix name of automatically created boot.py.Damien George2017-01-29
|
* stmhal: Convert to use VFS sub-system and new ooFatFs component.Damien George2017-01-27
| | | | | | | | | | | | This patch makes the following configuration changes: - MICROPY_FSUSERMOUNT is disabled, removing old mounting infrastructure - MICROPY_VFS is enabled, giving new VFS sub-system - MICROPY_VFS_FAT is enabled, giving uos.VfsFat type - MICROPY_FATFS_OO is enabled, to use new ooFatFs lib, R0.12b User facing API should be almost unchanged. Most notable changes are removal of os.mkfs (use os.VfsFat.mkfs instead) and pyb.mount doesn't allow unmounting by passing None as the device.
* stmhal: Use core-provided keyboard exception object.Damien George2016-12-15
|
* 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().
* py/runtime: Zero out fs_user_mount array in mp_init.Damien George2016-12-14
| | | | | There's no need to force ports to copy-and-paste this initialisation code. If FSUSERMOUNT is enabled then this zeroing out must be done.
* stmhal: Updates to get F411 MCUs compiling with latest ST HAL.Damien George2016-11-21
|
* stmhal: Disable network and usocket for ESPRUINO_PICODave Hylands2016-10-06
|
* stmhal: Use attribute to avoid inlining.Stefan Agner2016-09-20
| | | | | Use MP_NOINLINE macro to avoid inlining of init_flash_fs. This helps to keep stack usage of main() low.
* stmhal/modmachine: Implement machine.reset_cause() function, and consts.Damien George2016-09-06
|
* stmhal: Update boot.py files to use VCP instead of CDC.Philip Potter2016-08-29
|
* stmhal: L4: Make CCM/DTCM RAM start-up conditional on MCU type.Tobias Badertscher2016-05-05
|
* stmhal: Some NETDUINO_PLUS_2 cleanupDave Hylands2016-02-15
| | | | | - Put the I2C bus on the corect pins - Add the appropriate board_init to power the shield
* extmod/fsusermount: Support mounting of multiple block devices.Damien George2016-02-10
| | | | | | | | | | | | | This patch adds support to fsusermount for multiple block devices (instead of just one). The maximum allowed is fixed at compile time by the size of the fs_user_mount array accessed via MP_STATE_PORT, which in turn is set by MICROPY_FATFS_VOLUMES. With this patch, stmhal (which is still tightly coupled to fsusermount) is also modified to support mounting multiple devices And the flash and SD card are now just two block devices that are mounted at start up if they exist (and they have special native code to make them more efficient).
* stmhal: Make TIM3 available for use by the user.Damien George2016-01-29
| | | | | | | TIM3 is no longer used by USB CDC for triggering outgoing data, so we can now make it available to the user. PWM fading on LED(4) is now gone, but will be reinstated in a new way.
* py/runtime: mp_stack_ctrl_init() should be called immediately on startup.Paul Sokolovsky2016-01-29
| | | | | | | | | Calling it from mp_init() is too late for some ports (like Unix), and leads to incomplete stack frame being captured, with following GC issues. So, now each port should call mp_stack_ctrl_init() on its own, ASAP after startup, and taking special precautions so it really was called before stack variables get allocated (because if such variable with a pointer is missed, it may lead to over-collecting (typical symptom is segfaulting)).
* stmhal: Print exception information in nlr_jump_failedDave Hylands2015-12-07
| | | | | | | | | Currently nlr_jump_fail prints that there was an uncaught exception but nothing about the exception. This patch causes nlr_jump_failed to try to print the exception. Given that printf was called on the line above, I think that the call to mp_obj_print_exception has about as much likelyhood of succeeding as the printf does.
* stmhal: Execute boot.py and main.py when formatting the file system.Dave Hylands2015-12-07
| | | | | | | | When you use the USER button to perform a filesystem reset at boot time then it wipes out the filesystem and creates a new boot.py and main.py. With this patch these files are executed after formatting, ensuring that pyb and machine modules get imported.
* stmhal: Add option to free up TIM3 from USB VCP polling.Damien George2015-12-04
| | | | | | | | This is a hack to free up TIM3 so that it can be used by the user. Instead we use the PVD irq to call the USB VCP polling function, and trigger it from SysTick (so SysTick itself does not do any processing). The feature is enabled for pyboard lite only, since it lacks timers.
* stmhal: Add rtc.init() method to force RTC to re-initialise.Damien George2015-12-04
|
* stmhal: Implement delayed RTC initialization with LSI fallback.T S2015-11-23
| | | | | | | | | | | | | | | | | If RTC is already running at boot then it's left alone. Otherwise, RTC is started at boot but startup function returns straight away. RTC startup is then finished the first time it is used. Fallback to LSI if LSE fails to start in a certain time. Also included: MICROPY_HW_CLK_LAST_FREQ hold pyb.freq() parameters in RTC backup reg MICROPY_HW_RTC_USE_US option to present datetime sub-seconds in microseconds MICROPY_HW_RTC_USE_CALOUT option to enable RTC calibration output CLK_LAST_FREQ and RTC_USE_CALOUT are enabled for PYBv1.0.
* lib/pyexec: Move header pyexec.h from stmhal directory.Damien George2015-11-09
|
* all: Add py/mphal.h and use it in all ports.Damien George2015-10-31
| | | | | | py/mphal.h contains declarations for generic mp_hal_XXX functions, such as stdio and delay/ticks, which ports should provide definitions for. A port will also provide mphalport.h with further HAL declarations.
* stmhal: Early version of machine module for stmhal.Dave Hylands2015-10-19
|
* Rename "Micro Python" to "MicroPython" in REPL, help, readme's and misc.Damien George2015-10-12
|
* stmhal: Add "opt" arg to pyb.main, to set mp_optimise_value.Tom Soulanille2015-09-12
| | | | | Use this to set the global optimisation value when executing the main script (and all scripts it imports).
* stmhal: Enable SPI support for F7 MCUs.Dave Hylands2015-08-05
|
* stmhal: Enable I2C support for F7 MCUs.Dave Hylands2015-08-05
|
* stmhal: Factor out USRSW boot-up code and support boards with 1 LED.Damien George2015-08-03
| | | | Thanks to Dave Hylands for the patch.
* stmhal: Add STM32F7DISC and associated changes.Dave Hylands2015-07-30
|
* stmhal: Move debug UART repl to after uart_init0 call.Dave Hylands2015-05-06
|
* stmhal: Include fatfs headers using lib/fatfs prefix.Damien George2015-03-04
| | | | This helps make files reusable across other ports.
* stmhal: Add support for CAN rx callbacks.Henrik Sölver2015-02-15
|
* stmhal: Make pybstdio usable by other ports, and use it.Damien George2015-02-13
| | | | | Now all ports can use pybstdio.c to provide sys.stdin/stdout/stderr, so long as they implement mp_hal_stdin_* and mp_hal_stdout_* functions.
* stmhal: Properly define pyb.usb_mode() semantics.Damien George2015-02-13
|