| Age | Commit message (Collapse) | Author |
|
-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."
|
|
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.
|
|
Fix sdcard_power_on to not do anything if the card is already powered on...
|
|
|
|
|
|
|
|
|
|
Also add -t/--target option to pip-micropython to allowing installing to
the pyboard.
Thanks to turbinenreiter/Sebastian Plamauer for the patch.
|
|
Thanks to Dave Hylands for this patch.
|
|
Addresses issue #825.
|
|
Addresses issue #827.
|
|
|
|
|
|
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.
|
|
|
|
Also some whitespace cleanup.
|
|
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)
|
|
Factored irq functions into a separate file.
|
|
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.
|
|
Factored irq functions into a separate file.
|
|
Addresses issue #811.
|
|
Script is due to Dave Hylands.
|
|
|
|
Added some functions to Pin class to query mode, pull, and af
|
|
|
|
Also added test for modtime.
|
|
Now you can use time.localtime on the timestamps presented by os.stat
|
|
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.
|
|
|
|
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).
|
|
ROM down by 320 bytes on stmhal. RAM down by 5.5k for a decompression
object.
|
|
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.
|
|
|
|
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
|
|
unix: Added install/uninstall
|
|
|
|
|
|
Put some code into the first 16K of flash
|
|
This basically shrinks the remaining size of flash in the portion
that goes after the internal flash drive.
|
|
Also fix unix port so that SystemExit with no arg exits with value 0.
|
|
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.
|
|
|
|
Waiting for 1000ms between seconds of RTC is sometimes too quick.
Waiting for 1001ms is enough for the RTC to pass 1 second.
|
|
Saves over 35k ROM due to elimination of unused HAL functions. All
tests pass.
Addresses issue #702.
|
|
|
|
|
|
Updated teensy/README.md to reflect change in build process (teensyduino is no
longer required for build).
|
|
|
|
|
|
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
|