summaryrefslogtreecommitdiffstatshomepage
Commit message (Collapse)AuthorAge
* py: Fix 2 bugs in native emitter: jump_or_pop and stack settling.Damien George2014-08-29
| | | | Addresses issue #838.
* py: Add compiler optimisation for conditions in parenthesis.Damien George2014-08-29
| | | | | | | Optimises: if () -> if False if (x,...) -> if True if (a and b) -> if a and b
* tests: Add option to run-tests to enable native emitter.Damien George2014-08-29
|
* py: Move native glue code from runtime.c to new file nativeglue.c.v1.3.1Damien George2014-08-28
| | | | | | | | This way, the native glue code is only compiled if native code is enabled (which makes complete sense; thanks to Paul Sokolovsky for the idea). Should fix issue #834.
* Merge pull request #833 from Vogtinator/arm-nativeDamien George2014-08-28
|\ | | | | Basic native ARM emitter
| * Clarify copyright on asmarm filesFabian Vogt2014-08-28
| |
| * Basic native ARM emitterFabian Vogt2014-08-27
| |
* | py, gc: Further reduce heap fragmentation with new, faster gc alloc.Damien George2014-08-28
| | | | | | | | | | | | | | | | | | | | | | The heap allocation is now exactly as it was before the "faster gc alloc" patch, but it's still nearly as fast. It is fixed by being careful to always update the "last free block" pointer whenever the heap changes (eg free or realloc). Tested on all tests by enabling EXTENSIVE_HEAP_PROFILING in py/gc.c: old and new allocator have exactly the same behaviour, just the new one is much faster.
* | py: Reduce fragmentation of GC heap.Damien George2014-08-28
|/ | | | | | | | | | | Recent speed up of GC allocation made the GC have a fragmented heap. This patch restores "original fragmentation behaviour" whilst still retaining relatively fast allocation. This patch works because there is always going to be a single block allocated now and then, which advances the gc_last_free_atb_index pointer often enough so that the whole heap doesn't need scanning. Should address issue #836.
* Merge branch 'dhylands-int-bytes'Damien George2014-08-27
|\
| * py: Improve efficiency of MP_OBJ_IS_STR_OR_BYTES.Damien George2014-08-27
| | | | | | | | | | Saves ROM (16 on stmhal, 240 on 64-bit unix) and should be quicker since there is 1 less branch.
| * Merge branch 'int-bytes' of https://github.com/dhylands/micropython into ↵Damien George2014-08-27
|/| | | | | | | dhylands-int-bytes
| * Make int(b'123') work properly.Dave Hylands2014-08-26
| |
* | pip-micropython: Revert to using PIP_MICROPY_DEST environment var.Paul Sokolovsky2014-08-27
| | | | | | | | | | | | -t/--target is a pip option. Trying to use pip options for different meanings in pip-micropython may lead to big confusion. That's why the original passed any extra parameters using environment variables. "All options belong to pip."
* | py: Fix line number printing for file with 1 line.Damien George2014-08-26
| | | | | | | | | | | | | | | | | | | | With a file with 1 line (and an error on that line), used to show the line as number 0. Now shows it correctly as line number 1. But, when line numbers are disabled, it now prints line number 1 for any line that has an error (instead of 0 as previously). This might end up being confusing, but requires extra RAM and/or hack logic to make it print something special in the case of no line numbers.
* | Merge pull request #824 from dhylands/sdcard-powerDamien George2014-08-26
|\ \ | | | | | | Fix sdcard_power_on to not do anything if the card is already powered on...
| * | Fix sdcard_power_on to not do anything if the card is already powered on.Dave Hylands2014-08-25
| | |
* | | stmhal, STM32F4DISC: Small changes to ST accel driver.Damien George2014-08-26
| | |
* | | Merge branch 'siorpaes-master'Damien George2014-08-26
|\ \ \ | |_|/ |/| |
| * | stmhal, staccel.py: Style cleanup.Damien George2014-08-26
| | |
| * | Added LIS302DL ID checkDavid Siorpaes2014-08-26
|/ /
* | Add pip-micropython to unix make install.Damien George2014-08-26
| | | | | | | | | | | | | | Also add -t/--target option to pip-micropython to allowing installing to the pyboard. Thanks to turbinenreiter/Sebastian Plamauer for the patch.
* | stmhal: Hookup USB_VCP.any().Damien George2014-08-26
| | | | | | | | Thanks to Dave Hylands for this patch.
* | stmhal: Fix build issues with (old) CC3000 driver.Damien George2014-08-26
| | | | | | | | Addresses issue #825.
* | py: Add dispatch for user defined ==, >, <=, >=.Damien George2014-08-26
| | | | | | | | Addresses issue #827.
* | tests: Add test for pyb.disable_irq and pyb.enable_irq.Damien George2014-08-25
| |
* | stmhal: Improve efficiency of SysTick IRQ and HAL_Delay.Damien George2014-08-25
| | | | | | | | | | | | | | | | SysTick IRQ now increases millisecond counter directly (ie without calling HAL_IncTick). Provide our own version of HAL_Delay that does a wfi while waiting. This more than halves power consumption when running a loop containing a pyb.delay call. It used to be like this, but new version of HAL library regressed this feature.
* | teensy: Fix multiple definition of irq functions.Damien George2014-08-25
| |
* | stmhal: Use MP_OBJ_NEW_SMALL_INT directly in pyb.micros/millis.Damien George2014-08-25
| | | | | | | | Also some whitespace cleanup.
* | Add support for pyb.micros() by using the systick timer.Dave Hylands2014-08-25
| | | | | | | | | | | | | | | | | | | | I also removed trailing spaces from modpyb.c which affected a couple of lines technically not part of this patch. Tested using: https://github.com/dhylands/upy-examples/blob/master/micros_test.py which eventually fails due to wraparound issues (I could fix the test to compensate but didn't bother)
* | Add save/restore_irqDave Hylands2014-08-25
|/ | | | Factored irq functions into a separate file.
* stmhal: Make enable_irq and disable_irq inline functions.Damien George2014-08-25
| | | | | | | | | | | | These functions are generally 1 machine instruction, and are used in critical code, so makes sense to have them inline. Also leave these functions uninverted (ie 0 means enable, 1 means disable) and provide macro constants if you really need to distinguish the states. This makes for smaller code as well (combined with inlining). Applied to teensy port as well.
* Add save/restore_irqDave Hylands2014-08-25
| | | | Factored irq functions into a separate file.
* py: Consolidate min/max functions into one, and add key= argument.Damien George2014-08-24
| | | | Addresses issue #811.
* examples: Added pins.py example script to list pin config/af.Damien George2014-08-24
| | | | Script is due to Dave Hylands.
* stmhal, pin: Update documentation.Damien George2014-08-24
|
* Added python script to map AF to a pin nameDave Hylands2014-08-24
| | | | Added some functions to Pin class to query mode, pull, and af
* Merge branch 'dhylands-localtime'Damien George2014-08-24
|\
| * stmhal, modtime: Small changes, reduced code size by around 80 bytes.Damien George2014-08-24
| | | | | | | | Also added test for modtime.
| * Add time.mktime and enhance time.localtime (for stmhal)Dave Hylands2014-08-24
|/ | | | Now you can use time.localtime on the timestamps presented by os.stat
* py: Fix bug where GC collected native/viper/asm function data.Damien George2014-08-24
| | | | | | | | Because (for Thumb) a function pointer has the LSB set, pointers to dynamic functions in RAM (eg native, viper or asm functions) were not being traced by the GC. This patch is a comprehensive fix for this. Addresses issue #820.
* unix, modtermios: Make it properly configurable; fix spelling mistake.Damien George2014-08-24
|
* modtermios: Add "termios" unix module, subset of CPython's.Paul Sokolovsky2014-08-23
| | | | | | | | Also provides setraw() function from "tty" module (which in CPython is implemented in Python). The idea here is that 95% of "termios" module usage is to set raw mode to allow access to normal serial devices. Then, instead of exporting gazillion termios symbols, it's better to implement it in C, and export minimal number of symbols (mostly baud rates and drain values).
* extmod, zlibd: Make some simple ROM and RAM savings.Damien George2014-08-22
| | | | | ROM down by 320 bytes on stmhal. RAM down by 5.5k for a decompression object.
* py: Change hash and len members of str from 16 bit to full word.Damien George2014-08-22
| | | | | This allows to make strings longer than 64k. It doesn't use any more RAM with current GC because a str object still fits in a GC block.
* py: Small cleanup in stream.c.Damien George2014-08-22
|
* py: Speed up GC allocation.Damien George2014-08-22
| | | | | | | | | This simple patch gives a very significant speed up for memory allocation with the GC. Eg, on PYBv1.0: tests/basics/dict_del.py: 3.55 seconds -> 1.19 seconds tests/misc/rge_sm.py: 15.3 seconds -> 2.48 seconds
* Merge pull request #796 from turbinenreiter/makeinstallPaul Sokolovsky2014-08-18
|\ | | | | unix: Added install/uninstall
| * added install/uninstallSebastian Plamauer2014-08-11
| |
* | py: Code clean-up in native emitter; improve thumb native calls.Damien George2014-08-16
| |