aboutsummaryrefslogtreecommitdiff
path: root/stmhal/mpconfigport.h
AgeCommit message (Collapse)Author
2017-09-06ports: Make new ports/ sub-directory and move all ports there.Damien George
This is to keep the top-level directory clean, to make it clear what is core and what is a port, and to allow the repository to grow with new ports in a sustainable way.
2017-08-21all: Make static dicts use mp_rom_map_elem_t type and MP_ROM_xxx macros.Damien George
2017-07-18all: Unify header guard usage.Alexander Steffen
The code conventions suggest using header guards, but do not define how those should look like and instead point to existing files. However, not all existing files follow the same scheme, sometimes omitting header guards altogether, sometimes using non-standard names, making it easy to accidentally pick a "wrong" example. This commit ensures that all header files of the MicroPython project (that were not simply copied from somewhere else) follow the same pattern, that was already present in the majority of files, especially in the py folder. The rules are as follows. Naming convention: * start with the words MICROPY_INCLUDED * contain the full path to the file * replace special characters with _ In addition, there are no empty lines before #ifndef, between #ifndef and one empty line before #endif. #endif is followed by a comment containing the name of the guard macro. py/grammar.h cannot use header guards by design, since it has to be included multiple times in a single C file. Several other files also do not need header guards as they are only used internally and guaranteed to be included only once: * MICROPY_MPHALPORT_H * mpconfigboard.h * mpconfigport.h * mpthreadport.h * pin_defs_*.h * qstrdefs*.h
2017-07-12stmhal: Reduce size of ESPRUINO_PICO build so it fits in flash.Damien George
The default frozen modules are no longer included (but users can still specify their own via FROZEN_MPY_DIR), complex numbers are disabled and so are the native, viper and asm_thumb emitters. Users needing these features can tune the build to disable other things.
2017-06-28stmhal/mpconfigport.h: Allow MICROPY_PY_THREAD to be overridden.Damien George
2017-06-28stmhal: Add possibility to build with double-precision floating point.Damien George
By default the firmware is built with single-precision floating point. To build a particular board using double precision instead, put the following line in the mpconfigboard.mk file: FLOAT_IMPL = double
2017-06-22stmhal: Make available the _onewire module, for low-level bus control.Damien George
2017-06-14stmhal/mpconfigport.h: Remove config of PY_THREAD_GIL to use default.Damien George
The default for the GIL is to enable it if threading is enabled, and this is the recommended way to use threading with the stmhal port.
2017-06-01ports: Convert from using stmhal's input() to core provided version.Damien George
2017-04-22mpy-cross, unix, windows, stmhal: Enable return-if-else optimisation.Damien George
Prior to making this a config option it was previously available on these (and all other) ports, and it makes sense to keep it enabled for mpy-cross as well as ports that have a decent amount of space for the code.
2017-04-11stmhal: Enable parsing of all Pin constructor args by machine.Signal.Damien George
2017-04-01all: Move BYTES_PER_WORD definition from ports to py/mpconfig.hDamien George
It can still be overwritten by a port in mpconfigport.h but for almost all cases one can use the provided default.
2017-03-20stmhal: Enable micropython.schedule().Damien George
ExtInt, Timer and CAN IRQ callbacks are made to work with the scheduler. They are still hard IRQs by default, but one can now call micropython.schedule within the hard IRQ to schedule a soft callback.
2017-02-15stmhal: Implement a proper thread scheduler.Damien George
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.
2017-02-03stmhal/mpconfigport.h: Enable MICROPY_PY_BUILTINS_POW3 option.Damien George
2017-01-31stmhal: Initial implementation of multithreading, currently disabled.Damien George
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.
2017-01-30extmod/vfs_fat: Remove MICROPY_FATFS_OO config option.Damien George
Everyone should now be using the new ooFatFs library. The old one is no longer supported and will be removed.
2017-01-27stmhal: Convert to use VFS sub-system and new ooFatFs component.Damien George
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.
2017-01-24stmhal/mpconfigport.h: Reorganise the config options into groups.Damien George
The order now follows that in py/mpconfig.h and is a bit cleaner and easier to maintain. No options were changed/added/removed with this patch, it's just a reordering.
2017-01-22stmhal: Enable help('modules') feature.Damien George
2017-01-22stmhal: Convert to use builtin help function.Damien George
2016-12-23stmhal, esp8266: Enable utimeq module.Paul Sokolovsky
2016-12-15stmhal: Use core-provided keyboard exception object.Damien George
2016-12-15stmhal: Rename mp_const_vcp_interrupt to mp_kbd_exception.Damien George
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().
2016-12-15stmhal/mpconfigport: Add weak-module links for io, collections, random.Damien George
2016-12-13stmhal: Move PY_SYS_PLATFORM config from board to general config file.Damien George
It can be overridden by a board if needed.
2016-12-08stmhal: Refactor to use extmod implementation of software SPI class.Damien George
This is a pure refactoring (and simplification) of code so that stmhal uses the software SPI class provided in extmod, for the machine.SPI implementation.
2016-12-08extmod/machine_spi: Provide reusable software SPI class.Damien George
So long as a port defines relevant mp_hal_pin_xxx functions (and delay) it can make use of this software SPI class without the need for additional code.
2016-12-05stmhal/uart: Add support for UART7 and UART8 on F7 MCUs.Damien George
2016-12-02extmod/moduselect: Use configurable EVENT_POLL_HOOK instead of WFI.Damien George
To make moduselect be usable by any port.
2016-11-24stmhal: Add beginnings of port-specific machine.I2C implementation.Damien George
This allows one to construct an I2C object using ids that are specific to the stmhal port, eg machine.I2C('X'). Right now the implementation of I2C uses software I2C but the idea is to just change the C-level I2C protocol functions to hardware implementations later on.
2016-11-21stmhal/moduselect: Move to extmod/ for reuse by other ports.Paul Sokolovsky
2016-11-16py: Factor out persistent-code reader into separate files.Damien George
Implementations of persistent-code reader are provided for POSIX systems and systems using FatFS. Macros to use these are MICROPY_READER_POSIX and MICROPY_READER_FATFS respectively. If an alternative implementation is needed then a port can define the function mp_reader_new_file.
2016-10-17stmhal: Enable str.center(), str.[r]partition() and builtin compile().Damien George
Also adds "machine" to the list of modules that the parser can search for constants.
2016-10-14stmhal/modutime: Refactor to use extmod/utime_mphal.c.Paul Sokolovsky
This includes making sure that utime_mphal's sleep_ms() and sleep_us() don't sleep on negative arguments.
2016-10-06stmhal: Enable machine.time_pulse_us() function.Damien George
2016-10-06stmhal: Disable network and usocket for ESPRUINO_PICODave Hylands
2016-10-04stmhal/spi: Enable use of fast software SPI.Damien George
2016-09-01stmhal/spi: Support new machine SPI methods in legacy SPI object.Damien George
2016-08-15ports: Remove typedef of machine_ptr_t, it's no longer needed.Damien George
This type was used only for the typedef of mp_obj_t, which is now defined by the object representation. So we can now remove this unused typedef, to simplify the mpconfigport.h file.
2016-07-30stmhal: fixing malloc when used with external librariesMatt Brejza
2016-05-10stmhal: Convert to use internal errno symbols; enable uerrno module.Damien George
2016-04-15py: Declare help, input, open builtins in core.Paul Sokolovsky
These are *defined* per-port, but why redeclare them again and again.
2016-04-12stmhal: Enable framebuf module.Damien George
2016-04-12stmhal: Use new generic I2C object in machine module.Damien George
2016-02-25stmhal: Enabled importing of persistent bytecode (.mpy files).Damien George
2016-02-15py/mpstate.h: fs_user_mount is now standard, reusable uPy functionality.Paul Sokolovsky
2016-02-10extmod/fsusermount: Support mounting of multiple block devices.Damien George
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).
2016-02-03py/mpz: Complete implementation of mpz_{and,or,xor} for negative args.Doug Currie
For these 3 bitwise operations there are now fast functions for positive-only arguments, and general functions for arbitrary sign arguments (the fast functions are the existing implementation). By default the fast functions are not used (to save space) and instead the general functions are used for all operations. Enable MICROPY_OPT_MPZ_BITWISE to use the fast functions for positive arguments.
2016-01-26extmod/modurandom: Add some extra random functions.Damien George
Functions added are: - randint - randrange - choice - random - uniform They are enabled with configuration variable MICROPY_PY_URANDOM_EXTRA_FUNCS, which is disabled by default. It is enabled for unix coverage build and stmhal.