aboutsummaryrefslogtreecommitdiff
path: root/stmhal/mpconfigport.h
AgeCommit message (Collapse)Author
2016-01-17extmod/modurandom: Add "urandom" module.Paul Sokolovsky
Seedable and reproducible pseudo-random number generator. Implemented functions are getrandbits(n) (n <= 32) and seed(). The algorithm used is Yasmarang by Ilya Levin: http://www.literatecode.com/yasmarang
2016-01-07stmhal: Remove custom mod_machine_mem_get_{read,write}_addr functions.Damien George
They are no longer needed because stm constants can now be 32 bits wide.
2015-12-19stmhal: Add mem8/mem16/mem32 operations to machine module.Dave Hylands
This uses the newly factored machine_mem functions.
2015-12-18stmhal, cc3200: Actually implement machine -> umachine module weak link.Paul Sokolovsky
2015-12-18ports: Rename "machine" module to "umachine".Paul Sokolovsky
To let unix port implement "machine" functionality on Python level, and keep consistent naming in other ports (baremetal ports will use magic module "symlinking" to still load it on "import machine"). Fixes #1701.
2015-12-09stmhal: Enable two USB phys to be supported together.neilh10
This is refactoring to enable support for the two USB PHYs available on some STM32F4 processors to be used at the same time. The F405/7 & F429 have two USB PHYs, others such as the F411 only have one PHY. This has been tested separately on a pyb10 (USB_FS PHY) and F429DISC (USB_HS PHY) to be able to invoke a REPL/USB. I have modified a PYBV10 to support two PHYs. The long term objective is to support a 2nd USB PHY to be brought up as a USB HOST, and possibly a single USB PHY to be OTG.
2015-11-25extmod/fsusermount: Make configurable with MICROPY_FSUSERMOUNT.Paul Sokolovsky
2015-11-08stmhal: FatFS configuration moved to the library folder.Alex March
Port specific settings defined in mpconfigport.
2015-10-31all: Add py/mphal.h and use it in all ports.Damien George
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.
2015-10-20stmhal: Enable "all special methods" configuration option.Damien George
2015-10-19stmhal: Early version of machine module for stmhal.Dave Hylands
2015-10-11stmhal: Enable REPL auto indent; document paste mode in help().Damien George
2015-09-15py/objslice: Make slice attributes (start/stop/step) readable.Tom Soulanille
Configurable with MICROPY_PY_BUILTINS_SLICE_ATTRS. Disabled by default.
2015-08-07stamhal: Add definitions for MCU_SERIES_F4 and MCU_SERIES_F7Dave Hylands
2015-07-30stmhal: Add STM32F7DISC and associated changes.Dave Hylands
2015-07-30stmhal: Replace #include "stm32f4xx_hal.h" with #include STM32_HAL_H.Dave Hylands
2015-07-27stmhal: Put fs_user_mount pointer in root ptr section of global state.Damien George
Should fix issue #1393.
2015-07-26lib/mp-readline: Add emacs-style control characters for cursor movement.Tom Soulanille
Disabled by default. Adds 108 bytes to Thumb2 arch when enabled.
2015-05-24stmhal: Implement sys.std{in,out,err}.buffer, for raw byte mode.Damien George
It's configurable and only enabled for stmhal port.
2015-05-04modstruct: Rename module to "ustruct", to allow full Python-level impl.Paul Sokolovsky
2015-04-16py: Overhaul and simplify printf/pfenv mechanism.Damien George
Previous to this patch the printing mechanism was a bit of a tangled mess. This patch attempts to consolidate printing into one interface. All (non-debug) printing now uses the mp_print* family of functions, mainly mp_printf. All these functions take an mp_print_t structure as their first argument, and this structure defines the printing backend through the "print_strn" function of said structure. Printing from the uPy core can reach the platform-defined print code via two paths: either through mp_sys_stdout_obj (defined pert port) in conjunction with mp_stream_write; or through the mp_plat_print structure which uses the MP_PLAT_PRINT_STRN macro to define how string are printed on the platform. The former is only used when MICROPY_PY_IO is defined. With this new scheme printing is generally more efficient (less layers to go through, less arguments to pass), and, given an mp_print_t* structure, one can call mp_print_str for efficiency instead of mp_printf("%s", ...). Code size is also reduced by around 200 bytes on Thumb2 archs.
2015-04-04stmhal, qemu-arm: Enable sys.maxsize attribute.Damien George
2015-04-04stmhal: Enable new str.splitlines() method.Damien George
2015-03-20py: Allow retrieving a function's __name__.stijn
Disabled by default. Enabled on unix and stmhal ports.
2015-03-20py: Implement core of OrderedDict type.Paul Sokolovsky
Given that there's already support for "fixed table" maps, which are essentially ordered maps, the implementation of OrderedDict just extends "fixed table" maps by adding an "is ordered" flag and add/remove operations, and reuses 95% of objdict code, just making methods tolerant to both dict and OrderedDict. Some things are missing so far, like CPython-compatible repr and comparison. OrderedDict is Disabled by default; enabled on unix and stmhal ports.
2015-03-14py: Add MICROPY_COMP_{DOUBLE,TRIPLE}_TUPLE_ASSIGN config options.Damien George
These allow to fine-tune the compiler to select whether it optimises tuple assignments of the form a, b = c, d and a, b, c = d, e, f. Sensible defaults are provided.
2015-03-02stmhal: Enable MICROPY_PY_ARRAY_SLICE_ASSIGN.Damien George
2015-02-22py: Make math special functions configurable and disabled by default.Damien George
The implementation of these functions is very large (order 4k) and they are rarely used, so we don't enable them by default. They are however enabled in stmhal and unix, since we have the room.
2015-02-15stmhal: Add support for CAN rx callbacks.Henrik Sölver
2015-02-13stmhal: Add Python-configurable USB HID mode.Damien George
Different HID modes can be configured in Python. You can either use predefined mouse or keyboard, or write your own report descriptor.
2015-01-24stmhal: Disable MICROPY_OPT_CACHE_MAP_LOOKUP_IN_BYTECODE.Damien George
It uses RAM and on pyboard we are generally tight on RAM, so disable this optimisation for general builds. If users need the speed then they can build their own version. Maybe in the future we can have different versions of pyboard firmware built with different tradeoffs.
2015-01-22stmhal: Put mod_network_nic_list in global root-pointer state.Damien George
It needs to be scanned by GC. Thanks to Daniel Campora.
2015-01-10py: Add config option MICROPY_COMP_MODULE_CONST for module consts.Damien George
Compiler optimises lookup of module.CONST when enabled (an existing feature). Disabled by default; enabled for unix, windows, stmhal. Costs about 100 bytes ROM on stmhal.
2015-01-09py: Add MICROPY_PY_MICROPYTHON_MEM_INFO to enable mem-info funcs.Damien George
This allows to enable mem-info functions in micropython module, even if MICROPY_MEM_STATS is not enabled. In this case, you get mem_info and qstr_info but not mem_{total,current,peak}.
2015-01-09py: Disable stack checking by default; enable on most ports.Damien George
2015-01-07stmhal: Collect all root pointers together in 1 place.Damien George
A GC in stmhal port now only scans true root pointers, not entire BSS. This reduces base GC time from 1700ms to 900ms.
2015-01-07py: Add option to cache map lookup results in bytecode.Damien George
This is a simple optimisation inspired by JITing technology: we cache in the bytecode (using 1 byte) the offset of the last successful lookup in a map. This allows us next time round to check in that location in the hash table (mp_map_t) for the desired entry, and if it's there use that entry straight away. Otherwise fallback to a normal map lookup. Works for LOAD_NAME, LOAD_GLOBAL, LOAD_ATTR and STORE_ATTR opcodes. On a few tests it gives >90% cache hit and greatly improves speed of code. Disabled by default. Enabled for unix and stmhal ports.
2014-12-24stmhal: Enable ubinascii module, weak link to binascii.Damien George
2014-12-19py: Add execfile function (from Python 2); enable in stmhal port.Damien George
Adds just 60 bytes to stmhal binary. Addresses issue #362.
2014-12-09py: Allow builtins to be overridden.Damien George
This patch adds a configuration option (MICROPY_CAN_OVERRIDE_BUILTINS) which, when enabled, allows to override all names within the builtins module. A builtins override dict is created the first time the user assigns to a name in the builtins model, and then that dict is searched first on subsequent lookups. Note that this implementation doesn't allow deleting of names. This patch also does some refactoring of builtins code, creating the modbuiltins.c file. Addresses issue #959.
2014-11-27stmhal: Enable uhashlib module; add heapq, hashlib weak links.Damien George
hashlib test passes on pyboard.
2014-11-17stmhal: Switch to file.seek() implementation using stream ioctl.Paul Sokolovsky
2014-10-31stmhal: Add ioctl to USB_VCP object, so it works with select.Damien George
This patch also enables non-blocking streams on stmhal port. One can now make a USB-UART pass-through function: def pass_through(usb, uart): while True: select.select([usb, uart], [], []) if usb.any(): uart.write(usb.read(256)) if uart.any(): usb.write(uart.read(256)) pass_through(pyb.USB_VCP(), pyb.UART(1, 9600))
2014-10-23py: Add builtin memoryview object (mostly using array code).Damien George
2014-10-22extmod: Add uheapq module.Damien George
2014-10-12moduzlib: Fix fn prototype and some code style; use it in stmhal port.Damien George
2014-10-12stmhal: Enable module weak links.Damien George
os, time, select modules are now prefixed with u, but are still available (via weak links) as their original names. ure and ujson now available as re and json via weak links.
2014-10-11stmhal: Enable ure module (tests pass on pyboard).Damien George
2014-09-30stmhal: Add network and usocket module.Damien George
As per issue #876, the network module is used to configure NICs (hardware modules) and configure routing. The usocket module is supposed to implement the normal Python socket module and selects the underlying NIC using routing logic. Right now the routing logic is brain dead: first-initialised, first-used. And the routing table is just a list of registered NICs. cc3k and wiznet5k work, but not at the same time due to C name clashes (to be fixed). Note that the usocket module has alias socket, so that one can import socket and it works as normal. But you can also override socket with your own module, using usocket at the backend.
2014-09-26stmhal: Initial implementation of cc3k module and driver.Damien George
Pulled in and modified work done by mux/iabdalkader on cc3k driver, from iabdalkader-cc3k-update branch. That branch was terribly messy and had too many conflicts to merge neatly.