aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-08-26Add pip-micropython to unix make install.Damien George
Also add -t/--target option to pip-micropython to allowing installing to the pyboard. Thanks to turbinenreiter/Sebastian Plamauer for the patch.
2014-08-26stmhal: Hookup USB_VCP.any().Damien George
Thanks to Dave Hylands for this patch.
2014-08-26stmhal: Fix build issues with (old) CC3000 driver.Damien George
Addresses issue #825.
2014-08-26py: Add dispatch for user defined ==, >, <=, >=.Damien George
Addresses issue #827.
2014-08-25tests: Add test for pyb.disable_irq and pyb.enable_irq.Damien George
2014-08-25stmhal: Improve efficiency of SysTick IRQ and HAL_Delay.Damien George
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.
2014-08-25teensy: Fix multiple definition of irq functions.Damien George
2014-08-25stmhal: Use MP_OBJ_NEW_SMALL_INT directly in pyb.micros/millis.Damien George
Also some whitespace cleanup.
2014-08-25Add support for pyb.micros() by using the systick timer.Dave Hylands
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)
2014-08-25Add save/restore_irqDave Hylands
Factored irq functions into a separate file.
2014-08-25stmhal: Make enable_irq and disable_irq inline functions.Damien George
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.
2014-08-25Add save/restore_irqDave Hylands
Factored irq functions into a separate file.
2014-08-24py: Consolidate min/max functions into one, and add key= argument.Damien George
Addresses issue #811.
2014-08-24examples: Added pins.py example script to list pin config/af.Damien George
Script is due to Dave Hylands.
2014-08-24stmhal, pin: Update documentation.Damien George
2014-08-24Added python script to map AF to a pin nameDave Hylands
Added some functions to Pin class to query mode, pull, and af
2014-08-24Merge branch 'dhylands-localtime'Damien George
2014-08-24stmhal, modtime: Small changes, reduced code size by around 80 bytes.Damien George
Also added test for modtime.
2014-08-24Add time.mktime and enhance time.localtime (for stmhal)Dave Hylands
Now you can use time.localtime on the timestamps presented by os.stat
2014-08-24py: Fix bug where GC collected native/viper/asm function data.Damien George
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.
2014-08-24unix, modtermios: Make it properly configurable; fix spelling mistake.Damien George
2014-08-23modtermios: Add "termios" unix module, subset of CPython's.Paul Sokolovsky
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).
2014-08-22extmod, zlibd: Make some simple ROM and RAM savings.Damien George
ROM down by 320 bytes on stmhal. RAM down by 5.5k for a decompression object.
2014-08-22py: Change hash and len members of str from 16 bit to full word.Damien George
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.
2014-08-22py: Small cleanup in stream.c.Damien George
2014-08-22py: Speed up GC allocation.Damien George
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
2014-08-18Merge pull request #796 from turbinenreiter/makeinstallPaul Sokolovsky
unix: Added install/uninstall
2014-08-16py: Code clean-up in native emitter; improve thumb native calls.Damien George
2014-08-16py: Viper can call functions with native types, and raise exceptions.Damien George
2014-08-16Merge pull request #803 from dhylands/ld-optDamien George
Put some code into the first 16K of flash
2014-08-16Put some code into the first 16K of flashDave Hylands
This basically shrinks the remaining size of flash in the portion that goes after the internal flash drive.
2014-08-16py: Put SystemExit in builtin namespace.Damien George
Also fix unix port so that SystemExit with no arg exits with value 0.
2014-08-16stmhal: In safe mode, still mount SD card and present as MSD over USB.Damien George
It's still "safe" because no scripts are run. Remove the SD card if you want to access the internal flash filesystem. Addresses issue #616. Also: remove obsolete pyb.source_dir setting, and reset pyb.main and pyb.usb_mode settings on soft-reset.
2014-08-16stmhal: Fix printing of pin name in error message.Damien George
2014-08-16tests: Wait for just over 1 sec when testing RTC.Damien George
Waiting for 1000ms between seconds of RTC is sometimes too quick. Waiting for 1001ms is enough for the RTC to pass 1 second.
2014-08-16stmhal: For non-debug compile, enable CC/LD opt to remove dead code.Damien George
Saves over 35k ROM due to elimination of unused HAL functions. All tests pass. Addresses issue #702.
2014-08-16Merge branch 'danpeirce-master'Damien George
2014-08-16teensy/README.md (corrected typo)Dan Peirce
2014-08-16modified: teensy/README.mdDan Peirce
Updated teensy/README.md to reflect change in build process (teensyduino is no longer required for build).
2014-08-15py: Viper can now store to global.Damien George
2014-08-15py: Fix typing of viper locals; allow default types in annotation.Damien George
2014-08-15py: Allow viper to have type annotations.Damien George
Viper functions can now be annotated with the type of their arguments and return value. Eg: @micropython.viper def f(x:int) -> int: return x + 1
2014-08-15py: Clean up and simplify functions in scope; add STATIC in compiler.Damien George
Some small code clean-ups that result in about 80 bytes ROM saving for stmhal.
2014-08-14stmhal: Resolve question in comment about timer clock.Damien George
2014-08-13Merge pull request #798 from stinos/msvc-alignofDamien George
msvc: Use built-in alignof
2014-08-13py: Fix mult by negative number of tuple, list, str, bytes.Damien George
Multiplication of a tuple, list, str or bytes now yields an empty sequence (instead of crashing). Addresses issue #799 Also added ability to mult bytes on LHS by integer.
2014-08-13msvc: Use built-in alignofstijn
This also fixes a 'unnamed type definition in parentheses' warning on the alignof implementation define in binary.c
2014-08-12Merge branch 'pfalcon-modzlibd'Damien George
2014-08-12extmod: Finish rename of zlib to zlibd; enable zlibd on stmhal.Damien George
2014-08-13tests: Add test for zlibd module.Paul Sokolovsky