aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-12-09py/emitinline: Move inline-asm align and data methods to compiler.Damien George
These are generic methods that don't depend on the architecture and so can be handled directly by the compiler.
2016-12-09py/emitinline: Embed entire asm struct instead of a pointer to it.Damien George
This reduces fragmentation, and memory use by 1 word. But more importantly it means the emit_inline_asm_t struct now "derives" from mp_asm_base.
2016-12-09esp8266: Enable inline Xtensa assembler.Damien George
With this patch, @micropython.asm_xtensa can be used on the esp8266 port.
2016-12-09py: Add inline Xtensa assembler.Damien George
This patch adds the MICROPY_EMIT_INLINE_XTENSA option, which, when enabled, allows the @micropython.asm_xtensa decorator to be used. The following opcodes are currently supported (ax is a register, a0-a15): ret_n() callx0(ax) j(label) jx(ax) beqz(ax, label) bnez(ax, label) mov(ax, ay) movi(ax, imm) # imm can be full 32-bit, uses l32r if needed and_(ax, ay, az) or_(ax, ay, az) xor(ax, ay, az) add(ax, ay, az) sub(ax, ay, az) mull(ax, ay, az) l8ui(ax, ay, imm) l16ui(ax, ay, imm) l32i(ax, ay, imm) s8i(ax, ay, imm) s16i(ax, ay, imm) s32i(ax, ay, imm) l16si(ax, ay, imm) addi(ax, ay, imm) ball(ax, ay, label) bany(ax, ay, label) bbc(ax, ay, label) bbs(ax, ay, label) beq(ax, ay, label) bge(ax, ay, label) bgeu(ax, ay, label) blt(ax, ay, label) bnall(ax, ay, label) bne(ax, ay, label) bnone(ax, ay, label) Upon entry to the assembly function the registers a0, a12, a13, a14 are pushed to the stack and the stack pointer (a1) decreased by 16. Upon exit, these registers and the stack pointer are restored, and ret.n is executed to return to the caller (caller address is in a0). Note that the ABI for the Xtensa emitters is non-windowing.
2016-12-09py: Allow inline-assembler emitter to be generic.Damien George
This patch refactors some code so that it is easier to integrate new inline assemblers for different architectures other than ARM Thumb.
2016-12-09esp8266: Enable native emitter for Xtensa arch.Damien George
This patch allows esp8266 to use @micropython.native and @micropython.viper function decorators. By default the executable machine code is written to the space at the end of the iram1 region. The user can call esp.set_native_code_location() to make the code go to flash instead.
2016-12-09py: Integrate Xtensa assembler into native emitter.Damien George
The config option MICROPY_EMIT_XTENSA can now be enabled to target the Xtensa architecture with @micropython.native and @micropython.viper decorators.
2016-12-09py/asmxtensa: Add low-level Xtensa assembler.Damien George
2016-12-09py/asmbase: Add MP_PLAT_COMMIT_EXEC option for handling exec code.Damien George
If a port defines MP_PLAT_COMMIT_EXEC then this function is used to turn RAM data into executable code. For example a port may want to write the data to flash for execution. The function must return a pointer to the executable data.
2016-12-09py: Move arch-specific assembler macros from emitnative to asmXXX.h.Damien George
2016-12-09py/emit.h: Remove long-obsolete declarations for cpython emitter.Damien George
2016-12-09extmod/modframebuf: Store underlying buffer object to prevent GC free.Damien George
2016-12-08esp8266/mpconfigport_512k: Disable framebuf module for 512k build.Damien George
The 512k build recently overflowed because of the newly-enabled uselect module. uselect is arguable more important than framebuf for small devices so we disable framebuf to keep the 512k build within its limit.
2016-12-08extmod/modframebuf: Make framebuf implement the buffer protocol.Damien George
So that one can easily access the underlying data of the frame buffer, eg to write the data out to a display.
2016-12-08esp8266: Refactor to use extmod implementation of software SPI class.Damien George
2016-12-08stmhal: Refactor to use extmod implementation of software SPI class.Damien George
This is a pure refactoring (and simplification) of code so that stmhal uses the software SPI class provided in extmod, for the machine.SPI implementation.
2016-12-08extmod/machine_spi: Provide reusable software SPI class.Damien George
So long as a port defines relevant mp_hal_pin_xxx functions (and delay) it can make use of this software SPI class without the need for additional code.
2016-12-07stmhal/hal: Update HALCOMMITS due to change in f7 hal files.Damien George
2016-12-07stmhal/boards/STM32F7DISC: Define LSE_STARTUP_TIMEOUT.Rami Ali
So it compiles with the latest F7 hal.
2016-12-07stmhal: Declare and initialise PrescTables for F7 MCUs.Rami Ali
2016-12-07stmhal: Port of f4 hal commit 1d7fb82 to updated f7 hal.Rami Ali
2016-12-07stmhal: Port of f4 hal commit 09de030 to updated f7 hal.Rami Ali
2016-12-07stmhal: Port of f4 hal commit c568a2b to updated f7 hal.Rami Ali
2016-12-07stmhal/hal: Update ST32CubeF7 HAL files to V1.1.2.Rami Ali
These files originate from the STM32Cube_FW_F7_V1.5.0 software package from ST. Newlines are unixified and trailing whitespace is removed.
2016-12-07stmhal/cmsis: Update STM32F7 CMSIS device include files to V1.1.2.Rami Ali
2016-12-07py/compile: Simplify configuration of native emitter.Damien George
2016-12-05stmhal/uart: Add check that UART id is valid for the given board.Damien George
Previous to this patch trying to construct, but not init, a UART that didn't exist on the target board would actually succeed. Only when initialising the UART would it then raise an exception that the UART does not exist. This patch adds an explicit check that the constructed UART does in fact exist for the given board.
2016-12-05stmhal/uart: Add support for UART7 and UART8 on F7 MCUs.Damien George
2016-12-05stmhal: Refactor UART configuration to use pin objects.Rami Ali
This follows the pattern of other peripherals (I2C, SPI) to specify the pins using pin objects instead of a pair of GPIO port and pin number. It makes it easier to customise the UART pins for a particular board.
2016-12-05esp8266: Move websocket_helper.py from scripts to modules for frozen BC.puuu
websocket_helper.py is used by webrepl. If webrepl is enabled and websocket_helper.py is not frozen bytecode it leads to heap fragmentation.
2016-12-05tests/extmod/framebuf1: Add basics tests for hline, vline, rect, line.Damien George
2016-12-05extmod/modframebuf: Add hline, vline, rect and line methods.Damien George
These are basic drawing primitives. They work in a generic way on all framebuf formats by calling the underlying setpixel or fill_rect C-level primitives.
2016-12-05travis: Build STM32 F7 and L4 boards under Travis CI.Damien George
The STM32 F7 and L4 boards use significantly different code to the F4 boards so it's important to test them with CI. To keep CI build times within a reasonable limit the STM32F4DISC board is no longer built, it's anyway very similar to the standard F4 build for PYBv1.0.
2016-12-05stmhal/adc: Use constants from new HAL version.Damien George
2016-12-05tests/extmod/btree1: Exercise btree.flush().Paul Sokolovsky
2016-12-05extmod/modbtree: Rename "sync" method to "flush" for consistency.Paul Sokolovsky
Rename recently introduced "sync" method to "flush" for consistency with usual files.
2016-12-04zephyr: Switch to Zephyr 1.6 unified kernel API.Paul Sokolovsky
In 1.6, Zephyr switched to "unified kernel" and new API set. Older kernel API is supported, but marked as deprecated and leads to warnings.
2016-12-02docs/library/pyb.Accel: Add hardware note about pins used by accel.Peter Hinch
2016-12-02extmod/modbtree: Add method to sync the database.w4kpm
If you have longish operations on the db (such as logging data) it may be desirable to periodically sync the database to the disk. The added btree.sync() method merely exposes the berkley __bt_sync function to the user.
2016-12-02extmod/vfs_fat_file: Allow file obj to respond to ioctl flush request.w4kpm
2016-12-02esp8266: Enable uselect module.Damien George
Select and poll will now work on socket objects.
2016-12-02extmod/modlwip: Add ioctl method to socket, with poll implementation.Damien George
Implementation of polling may need further fine tuning, but basic functionality works (tested on esp8266).
2016-12-02extmod/moduselect: Use configurable EVENT_POLL_HOOK instead of WFI.Damien George
To make moduselect be usable by any port.
2016-12-02extmod/moduselect: Use stream helper function instead of ad-hoc code.Damien George
2016-12-02py/stream: Move ad-hoc ioctl constants to stream.h and rename them.Damien George
The constants MP_IOCTL_POLL_xxx, which were stmhal-specific, are moved from stmhal/pybioctl.h (now deleted) to py/stream.h. And they are renamed to MP_STREAM_POLL_xxx to be consistent with other such constants. All uses of these constants have been updated.
2016-12-02tests/extmod/vfs_fat_fileio: Add test for constructor of FileIO type.Damien George
2016-12-02stmhal/moduos: Implement POSIX behaviour of rename, allow to overwrite.Damien George
2016-12-02extmod/vfs_fat: Implement POSIX behaviour of rename, allow to overwrite.Damien George
If the destination of os.rename() exists then it will be overwritten if it is a file. This is the POSIX behaviour, which is also the CPython behaviour, and so we follow suit. See issue #2598 for discussion.
2016-12-02stmhal/sdcard: Clean/invalidate cache before DMA transfers with SD card.Jean-François Milants
Add 2 macros in mphalport.h that clean and invalidate data caches only on STM32F7 MCUs. They are needed to ensure the cache coherency before/after DMA transferts. * MP_HAL_CLEANINVALIDATE_DCACHE cleans and invalidate the data cache. It must be called before starting a DMA transfer from the peripheral to the RAM memory. * MP_HAL_CLEAN_DCACHE cleans the data cache. It must be called before starting a DMA transfert from the RAM memory to the peripheral. These macros are called in sdcard.c, before reading from and writing to the SDCard, when DMA is used.
2016-12-01extmod/modframebuf: Optimise fill and fill_rect methods.Damien George
Fill is a very common operation (eg to clear the screen) and it is worth optimising it, by providing a specialised fill_rect function for each framebuffer format. This patch improved the speed of fill by 10 times for a 16-bit display with 160*128 pixels.