summaryrefslogtreecommitdiffstatshomepage
Commit message (Collapse)AuthorAge
* py/mpz: Complete implementation of mpz_{and,or,xor} for negative args.Doug Currie2016-02-03
| | | | | | | | | | | | 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.
* py: Extend native type-sig to use 4 bits, so uint is separate to ptr.Damien George2016-02-02
| | | | | | | Before this patch, the native types for uint and ptr/ptr8/ptr16/ptr32 all overlapped and it was possible to make a mistake in casting. Now, these types are all separate and any coding mistakes will be raised as runtime errors.
* py/objstr: Make mp_obj_str_format_helper static.Damien George2016-02-02
|
* py/objstr: For str.format, don't allocate on the heap for field name.Damien George2016-02-02
|
* py/objstr: For str.format, add nested/computed fields support.pohmelie2016-02-02
| | | | | | | Eg: '{:{}}'.format(123, '>20') @pohmelie was the original author of this patch, but @dpgeorge made significant changes to reduce code size and improve efficiency.
* drivers/sdcard: Add support for multi-block read/write; add SD test.Peter Hinch2016-02-02
|
* extmod: Update uzlib to 1.2.2.Paul Sokolovsky2016-02-01
| | | | Fixes use of uninitialized structure field by tinf_uncompress().
* py/vm: Fix popping of exception block in UNWIND_JUMP opcode.Damien George2016-02-01
| | | | Fixes issue #1812.
* py/mpprint: Fix sign extension when printf'ing %u, %x and %X.Damien George2016-02-01
|
* docs: Bump version to 1.6.v1.6Damien George2016-01-31
|
* tests: For pyboard, add test for I2C error handling and recovery.Damien George2016-01-30
|
* stmhal: Update HALCOMMITS due to change to hal.Damien George2016-01-30
|
* stmhal: In HAL I2C driver, move DMA setup to after sending I2C address.Damien George2016-01-30
| | | | | | | | | | | Previous to this patch the DMA was setup and then the I2C address sent. If the I2C address sending failed (eg no I2C device on the bus) then the DMA was left in an inconsistent state. This patch moves the DMA setup to after a successful sending of the I2C address(es). See issue #1765.
* tests: Update pyboard LED test.Damien George2016-01-29
|
* docs: Update to say that Timer(3) is free, and detail LED intensity.Damien George2016-01-29
|
* stmhal: Add PWM capability for LED(3) and LED(4) on pyboards.Damien George2016-01-29
| | | | | | | | | | | | | | | | | USB CDC no longer needs TIM3 (which was originally used for LED(4) PWM) and so TIM3 has been freed for general purpose use by the user. Hence LED(4) lost its PWM capabilities. This patch reinstates the PWM capabilities using a semi-generic piece of code which allows to configure a timer and PWM channel to use for any LED. But the PWM capability is only configured if the LED is set to an intensity between 1 and 254 (ie only when needed). In that case the relevant timer is configured for PWM. It's up to the user to make sure the timers are not used if PWM is active. This patch also makes sure that PWM LEDs are turned off using standard GPIO when calling led.off() or led.intensity(0), instead of just setting the PWM counter to zero.
* 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.
* stmhal: Make USB CDC driver use SOF instead of TIM3 for outgoing data.Damien George2016-01-29
| | | | | | | | | | | | Previous to this patch the USB CDC driver used TIM3 to trigger the sending of outgoing data over USB serial. This patch changes the behaviour so that the USB SOF interrupt is used to trigger the processing of the sending. This reduces latency and increases bandwidth of outgoing data. Thanks to Martin Fischer, aka @hoihu, for the idea and initial prototype. See PR #1713.
* py/formatfloat: Add ability to format doubles with exponents > 99.Damien George2016-01-29
| | | | | | | | For single prec, exponents never get larger than about 37. For double prec, exponents can be larger than 99 and need 3 bytes to format. This patch makes the number of bytes needed configurable. Addresses issue #1772.
* 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)).
* unix/main: Remove debug code left from MP_OBJ_TO_PTR refactor.Paul Sokolovsky2016-01-29
|
* lib/utils/printf: Fix printf on release buildsDave Hylands2016-01-28
| | | | | | | When using newer glibc's the compiler automatically sets _FORTIFY_SOURCE when building with -O1 and this causes a special inlined version of printf to be declared which then bypasses our version of printf.
* py/bc: Update opcode format table now that MP_BC_NOT opcode is gone.Damien George2016-01-28
| | | | | | MP_BC_NOT was removed and the "not" operation made a proper unary operator, and the opcode format table needs to be updated to reflect this change (but actually the change is only cosmetic).
* unix/modsocket: sockaddr(): Handle AF_INET6 addresses.Paul Sokolovsky2016-01-27
|
* py/inlineasm: Add ability to specify return type of asm_thumb funcs.Damien George2016-01-27
| | | | | | | | | | Supported return types are: object, bool, int, uint. For example: @micropython.asm_thumb def foo(r0, r1) -> uint: add(r0, r0, r1)
* stmhal: Add support for the STM32F401NUCLEO board.Carmine Noviello2016-01-27
| | | | | Includes full version of pins.csv file with correct mapping of the Nucleo STM32F401RE chip (LQFP64 package).
* tests: For urandom test, use sys.exit() instead of sys.exit(1).Damien George2016-01-26
|
* windows/msvc: Add modurandom.c to list of source files.Damien George2016-01-26
|
* tests: Add some tests for urandom module.Damien George2016-01-26
|
* windows: Enable urandom module.Damien George2016-01-26
|
* extmod/modurandom: Add some extra random functions.Damien George2016-01-26
| | | | | | | | | | | | | 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.
* extmod/moduhashlib: Use MICROPY_PY_UHASHLIB_SHA1 config define.Paul Sokolovsky2016-01-25
|
* extmod/moduhashlib: Add support for SHA1 (based on axTLS).Paul Sokolovsky2016-01-24
| | | | | | | | | SHA1 is used in a number of protocols and algorithm originated 5 years ago or so, in other words, it's in "wide use", and only newer protocols use SHA2. The implementation depends on axTLS enabled. TODO: Make separate config option specifically for sha1().
* py/modmicropython: Add stack_use, heap_lock and heap_unlock functions.Damien George2016-01-24
| | | | | | | | | micropython.stack_use() returns an integer being the number of bytes used on the stack. micropython.heap_lock() and heap_unlock() can be used to prevent the memory manager from allocating anything on the heap. Calls to these are allowed to be nested.
* stmhal: Add support for building frozen files.Dave Hylands2016-01-23
| | | | | | | | | | | This allows FROZEN_DIR=some-directory to be specified on the make command line, which will then add all of the files contained within the indicated frozen directory as frozen files in the image. There is no change in flash/ram usage if not using the feature. This is especially useful on smaller MCUs (like the 401) which only has 64K flash file system.
* py/objgetitemiter: Typo fix in comment.Paul Sokolovsky2016-01-23
|
* unix/modsocket: accept(): Make IPv6-clean.Paul Sokolovsky2016-01-21
| | | | By reserving enough space for peer address.
* stmhal: Add os.statvfsDave Hylands2016-01-19
| | | | | Implement enough of statvfs to determine the amount of free space on a volume.
* py: Add ustruct.pack_into and unpack_fromDave Hylands2016-01-19
|
* .travis.yml: Switch to Ubuntu 14.04 Trusty.Paul Sokolovsky2016-01-17
| | | | | This allows to cut number of packages installed from 3rd-party package repos, and otherwise cut number of overrides and hacks.
* extmod/modurandom: Make yasmarang() function static.Paul Sokolovsky2016-01-17
|
* extmod/modurandom: Add "urandom" module.Paul Sokolovsky2016-01-17
| | | | | | | | 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
* pic16bit: Minor updates to types to allow port to compile again.Damien George2016-01-16
|
* unix/modffi: Allow to compile modffi in OBJ_REPR_D mode.Damien George2016-01-15
|
* unix/.gitignore: Add nanbox build output to ignore list.Damien George2016-01-15
|
* travis: Add unix NaN-boxing build to Travis builds.Damien George2016-01-15
| | | | This will help make sure new commits work with OBJ_REPR_D.
* unix: Add option to build 64-bit NaN-boxing interpreter.Damien George2016-01-15
| | | | Build using: make nanbox
* py/objproperty: Fix static struct to build with OBJ_REPR_D.Damien George2016-01-15
|
* builtin property: accept keyword argumentschrysn2016-01-14
| | | | | | | | | | this allows python code to use property(lambda:..., doc=...) idiom. named versions for the fget, fset and fdel arguments are left out in the interest of saving space; they are rarely used and easy to enable when actually needed. a test case is included.
* tests: Remove builtin_dict teststijn2016-01-14
| | | | This is essentially a duplicate of obj_dict.py