| Commit message (Collapse) | Author | Age |
|
|
|
| |
It can be overridden by a board if needed.
|
|
|
|
| |
With minor changes to adc.c and storage.c to support the F769.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This patch ensures that __init__.mpy files are imported if their
containing directory is imported as a package.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
CPython requires byteorder arg, make uPy compatible. As we support only
"little", error out on anything else.
|
| |
|
|
|
|
|
|
|
|
| |
For all but the last pass the assembler only needs to count how much space
is needed for the machine code, it doesn't actually need to emit anything.
The dummy_data just uses unnecessary RAM and without it the code is not
any more complex (and code size does not increase for Thumb and Xtensa
archs).
|
|
|
|
|
|
| |
This patch moves some common code from the individual inline assemblers to
the compiler, the code that calls the emit-glue to assign the machine code
to the functions scope.
|
|
|
|
|
| |
These are generic methods that don't depend on the architecture and so
can be handled directly by the compiler.
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
With this patch, @micropython.asm_xtensa can be used on the esp8266 port.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
This patch refactors some code so that it is easier to integrate new
inline assemblers for different architectures other than ARM Thumb.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
The config option MICROPY_EMIT_XTENSA can now be enabled to target the
Xtensa architecture with @micropython.native and @micropython.viper
decorators.
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
So that one can easily access the underlying data of the frame buffer, eg
to write the data out to a display.
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
So it compiles with the latest F7 hal.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
These files originate from the STM32Cube_FW_F7_V1.5.0 software package
from ST. Newlines are unixified and trailing whitespace is removed.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
websocket_helper.py is used by webrepl. If webrepl is enabled and
websocket_helper.py is not frozen bytecode it leads to heap
fragmentation.
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
| |
Rename recently introduced "sync" method to "flush" for consistency with
usual files.
|
|
|
|
|
| |
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.
|