summaryrefslogtreecommitdiffstatshomepage
Commit message (Collapse)AuthorAge
* stmhal: Working STM32F4DISC accelerometer, via Python script.Damien George2014-08-10
| | | | Thanks to David Siorpaes.
* doc: Fix up a few docs in sys module.Damien George2014-08-10
|
* doc: Document gc, sys, math, cmath.Damien George2014-08-10
|
* stmhal: Add sys.platform string to PYBv1.0 (it's "pyboard").Damien George2014-08-10
|
* tools, gendoc: Output small descr about module TOC.Damien George2014-08-10
|
* objarray: Implement equality testing between arrays and other buffers.Paul Sokolovsky2014-08-10
|
* py: mp_buffer_info_t::buf may be valid, but NULL for empty objects.Paul Sokolovsky2014-08-10
| | | | | | This happens for example for zero-size arrays. As .get_buffer() method now has explicit return value, it's enough to distinguish success vs failure of getting buffer.
* moductypes: Remove debug inclusion of stdio.h .Paul Sokolovsky2014-08-10
|
* stmhal, pin: Save 140 bytes ROM by simplifying pin_print function.Damien George2014-08-09
|
* stmhal, pin: Simplify default value for alternate function init.Damien George2014-08-09
|
* tools, gendoc: Put module TOC/index in module/ directory.Damien George2014-08-08
|
* stmhal: Start of documentation for modos and modtime.Damien George2014-08-08
|
* tools, gendoc: Allow constants at module level; gen module index.Damien George2014-08-08
| | | | Addresses some issues from #585.
* Merge branch 'dhylands-pin-af'Damien George2014-08-08
|\
| * tests, pyb: Update pin test.Damien George2014-08-08
| |
| * stmhal/teensy: Use _ instead of - in source file names.Damien George2014-08-08
| | | | | | | | | | Trying to move towards consistency, let's use _ exclusively in names of source files (eg .c, .h, .csv).
| * stmhal: Fix documentation; remove ability to specify af by str.Damien George2014-08-08
| |
| * stmhal: Comment out unused functions.Damien George2014-08-08
| |
| * Merge branch 'pin-af' of https://github.com/dhylands/micropython into ↵Damien George2014-08-08
|/| | | | | | | dhylands-pin-af
| * Add support for selecting pin alternate functions from python.Dave Hylands2014-08-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Converts generted pins to use qstrs instead of string pointers. This patch also adds the following functions: pyb.Pin.names() pyb.Pin.af_list() pyb.Pin.gpio() dir(pyb.Pin.board) and dir(pyb.Pin.cpu) also produce useful results. pyb.Pin now takes kw args. pyb.Pin.__str__ now prints more useful information about the pin configuration. I found the following functions in my boot.py to be useful: ```python def pins(): for pin_name in dir(pyb.Pin.board): pin = pyb.Pin(pin_name) print('{:10s} {:s}'.format(pin_name, str(pin))) def af(): for pin_name in dir(pyb.Pin.board): pin = pyb.Pin(pin_name) print('{:10s} {:s}'.format(pin_name, str(pin.af_list()))) ```
* | py: Fix bug where GC finaliser table was not completely zeroed out.Damien George2014-08-08
| | | | | | | | | | | | | | | | | | | | | | | | This was a nasty bug to track down. It only had consequences when the heap size was just the right size to expose the rounding error in the calculation of the finaliser table size. And, a script had to allocate a small (1 or 2 cell) object at the very end of the heap. And, this object must not have a finaliser. And, the initial state of the heap must have been all bits set to 1. All these conspire on the pyboard, but only if your run the script fresh (so unused memory is all 1's), and if your script allocates a lot of small objects (eg 2-char strings that are not interned).
* | py: Fix bug in mpn_shl (multi-prec int shift left).Damien George2014-08-07
|/ | | | | Before this patch, eg, 1 << 75 (or any large multiple of 15) was setting the MSB in the digits, which is outside the valid range of DIG_MASK.
* stmhal: Update STM32Cube F4 HAL driver to V1.3.0.Damien George2014-08-06
| | | | | | | | | | | | | This patch updates ST's HAL to the latest version, V1.3.0, dated 19 June 2014. Files were copied verbatim from the ST package. Only change was to suppress compiler warning of unused variables in 4 places. A lot of the changes from ST are cosmetic: comments and white space. Some small code changes here and there, and addition of F411 header. Main code change is how SysTick interrupt is set: it now has a configuration variable to set the priority, so we no longer need to work around this (originall in system_stm32f4xx.c).
* stmhal: Ability to stat /flash and /sd.Damien George2014-08-06
| | | | Addresses issue #780.
* stmhal: Put #if guards around all GPIOx_CLK_ENABLE's.Damien George2014-08-06
| | | | Specifically, teensy port does not have these macros defined.
* stmhal: Enable relevant GPIO clock when Pin obj is init'd.Damien George2014-08-06
|
* stmhal: Wrap DAC module and os.urandom in relevant #if's.Damien George2014-08-05
|
* stmhal, math: Define _M_LN2 if not already defined.Damien George2014-08-05
| | | | Addresses issue #790.
* travis: Build stmhal/ST32F4DISC and teensy in Travis tests.Damien George2014-08-05
|
* Merge pull request #789 from dhylands/fix-teensy-2014-08-04Damien George2014-08-04
|\ | | | | Follow rename of readline_init to readline_init0 on teensy
| * Follow rename of readline_init to readline_init0 on teensyDave Hylands2014-08-04
|/
* Merge branch 'master' of github.com:micropython/micropythonDamien George2014-08-04
|\
| * Merge pull request #786 from dhylands/fix-teensy-2014-08-03Damien George2014-08-03
| |\ | | | | | | Updated teensys usb.c and switched to using usb.h from stmhal.
| | * Updated teensys usb.c and switched to using usb.h from stmhal.Dave Hylands2014-08-03
| |/ | | | | | | | | | | Removed the local usb.h from teensey directory and now uses the usb.h from the stmhal directory. Fixed the deploy target to use abspath.
* | stmhal: Clean up reset/soft-reset code; fix bug init'ing VCP exc.Damien George2014-08-04
| | | | | | | | | | | | | | | | | | | | | | Make a clearer distinction between init functions that must be done before any scripts can run (xxx_init0) and those that can be safely deferred (xxx_init). Fix bug initialising USB VCP exception. Addresses issue #788. Re-order some init function to improve reliability of reset/soft-reset.
* | Put call to qstr_init and mp_init_emergency_exc_buf in mp_init.Damien George2014-08-04
|/ | | | | | | qstr_init is always called exactly before mp_init, so makes sense to just have mp_init call it. Similarly with mp_init_emergency_exception_buf. Doing this makes the ports simpler and less error prone (ie they can no longer forget to call these).
* stmhal: Document behaviour of usb_vcp_recv_byte.Damien George2014-08-03
|
* Merge pull request #784 from dhylands/fix-teensy-2014-08-02Damien George2014-08-03
|\ | | | | Fix teensy to work with the latest tree.
| * Fix teensy to work with the latest tree.Dave Hylands2014-08-02
| |
* | stmhal: Add more documentation for USB_VCP.Damien George2014-08-02
| |
* | stmhal: Add documentation for LCD; update docs for USB_VCP.Damien George2014-08-02
| |
* | stmhal: Add preliminary driver for ST32F4DISC accelerometer.Damien George2014-08-02
|/ | | | Written in Python, not currently working. See issue #725.
* Merge pull request #781 from dhylands/fix-discDamien George2014-08-01
|\ | | | | Fix modos.c to compile for the STM32F4Discovery board
| * Fix modos.c to compile for the STM32F4Discovery board (which doesn't have an ↵Dave Hylands2014-08-01
|/ | | | sdcard)
* stmhal: Change 0:/ and 1:/ to /flash and /sd; add CWD support.Damien George2014-07-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | Some important changes to the way the file system is structured on the pyboard: 1. 0: and 1: drive names are now replaced with POSIX inspired directories, namely /flash and /sd. 2. Filesystem now supports the notion of a current working directory. Supports the standard Python way of manipulating it: os.chdir and os.getcwd. 3. On boot up, current directory is /flash if no SD inserted, else /sd if SD inserted. Then runs boot.py and main.py from the current dir. This is the same as the old behaviour, but is much more consistent and flexible (eg you can os.chdir in boot.py to change where main.py is run from). 4. sys.path (for import) is now set to '' (current dir), plus /flash and /flash/lib, and then /sd and /sd/lib if SD inserted. This, along with CWD, means that import now works properly. You can import a file from the current directory. 5. os.listdir is fixed to return just the basename, not the full path. See issue #537 for background and discussion.
* README: Add USB VID/PID to dfu-util command.Damien George2014-07-31
| | | | This reflects how it's done in stmhal/Makefile, via deploy.
* py: Improve encoding scheme for line-number to bytecode map.Damien George2014-07-31
| | | | | | | | | | | | | | | | | | | | Reduces by about a factor of 10 on average the amount of RAM needed to store the line-number to bytecode map in the bytecode prelude. Using CPython3.4's stdlib for statistics: previously, an average of 13 bytes were used per (bytecode offset, line-number offset) pair, and now with this improvement, that's down to 1.3 bytes on average. Large RAM usage before was due to some very large steps in line numbers, both from the start of the first line in a function way down in the file, and also functions that have big comments and/or big strings in them (both cases were significant). Although the savings are large on average for the CPython stdlib, it won't have such a big effect for small scripts used in embedded programming. Addresses issue #648.
* Merge branch 'master' of https://github.com/micropython/micropythonDamien George2014-07-31
|\
| * py: Make MP_OBJ_NEW_SMALL_INT cast arg to mp_int_t itself.Damien George2014-07-31
| | | | | | | | Addresses issue #724.
| * stmhal, accel: Increase start-up times to 30ms; add extra 30ms delay.Damien George2014-07-31
| | | | | | | | | | | | | | | | For accel to start-up reliably, need to wait 30ms between on/off, and 30ms for it to enter active mode. With this fix the accel can be read immediately after initialising it. Addresses issue #763.