Commit Graph

6992 Commits

Author SHA1 Message Date
Scott Shawcroft
34fa81eaf3 atmel-samd: Hook in DTR for more ports and make the serial TX more resiliant to long strings. 2016-10-26 13:32:41 -07:00
Scott Shawcroft
04284a9fe3 Merge pull request #38 from tannewt/autoreset
atmel-samd: Support auto-reset based on USB write activity.
2016-10-26 11:12:55 -07:00
Vincenzo Frascino
a3519332b6 zephyr: Use board/SoC values for startup banner based on Zephyr config.
This patch modifies the HW macro definition in order to let micropython
report correctly the BOARD and the SOC on which it is working on.
2016-10-26 19:00:16 +03:00
Paul Sokolovsky
3cdccb9b14 zephyr: Fix mp_hal_set_interrupt_char() declaration to be compatible.
With other ports. Other ports declare it in mphalport.h, it can be
inline or macro.
2016-10-26 17:53:28 +03:00
Paul Sokolovsky
6832cbd69d lib/utils/pyexec: Fix compilation warning of type vs format mismatch.
This happens with some compilers on some architectures, which don't define
size_t as unsigned int. MicroPython's printf() dooesn't support obscure
format specifiers for size_t, so the obvious choice is to explicitly cast
to unsigned, to match %u used in printf().
2016-10-26 13:45:03 +03:00
Vincenzo Frascino
c38ea32810 lib/utils/pyexec: Add mp_hal_set_interrupt_char() prototype.
This patch removes a compilation warning in pyexec.

Signed-off-by: Vincenzo Frascino <vincenzo.frascino@linaro.org>
2016-10-26 13:42:27 +03:00
Paul Sokolovsky
73b72799f3 examples/http_server_simplistic: Add "not suitable for real use" note. 2016-10-26 12:25:33 +03:00
Scott Shawcroft
d189a3f3cf atmel-samd: Support auto-reset based on USB write activity.
It will soft-reboot micropython after a burst of writes to the
file system. This means that after you save files on your computer
they will be automatically rerun.

This can be disabled in the build by unsetting AUTORESET_TIMER in
mpconfigboard.h.

Using the REPL will also prevent the soft resets until you reset
with CTRL-D manually.
2016-10-25 18:36:37 -07:00
Scott Shawcroft
614c1fdba2 atmel-samd: Only output to USB after DTR and don't send anything larger than the room left in the USB TX buffer. 2016-10-25 18:29:04 -07:00
Paul Sokolovsky
f00ecdb54d extmod/moduos_dupterm: Renamed to uos_dupterm.
As part of file naming clean up (moduos_dupterm doesn't implement a
full module, so should skip "mod" prefix, similar to other files in
extmod/).
2016-10-26 02:08:37 +03:00
Scott Shawcroft
b7768a74a7 atmel-samd: Fix file system init.
Adding the USB write protection prevented file system reset from
working. Since it happens before USB start we temporarily set the
volume to writeable and then set it back to read-only before USB is
started.
2016-10-25 15:13:43 -07:00
Scott Shawcroft
d05299f57a atmel-samd: Add D13 led as mass storage write indicator. 2016-10-25 15:06:05 -07:00
Scott Shawcroft
3a5aad516a atmel-samd: Remove unused header. 2016-10-25 15:04:20 -07:00
Scott Shawcroft
fff96a0ce6 atmel-samd: Fix include guard. 2016-10-25 15:03:22 -07:00
Paul Sokolovsky
67c91df7e8 docs/machine.SPI.rst: Fix typos and formatting, clarify.
Clarify the class implements master side of the protocol, also put adhoc
WiPy paramter after the generic, described in the current Hardware API
version.
2016-10-25 17:03:35 +03:00
Paul Sokolovsky
760ed4629f unix/Makefile: Remove references to deprecated pip-micropython. 2016-10-25 13:11:08 +03:00
Paul Sokolovsky
d5cf8c5753 .travis.yml: minimal: Use CROSS=1, for binary size check.
x86 has bloated alignements, etc. Use ARM binary to catch any code size
increases promptly.
2016-10-25 11:43:56 +03:00
Paul Sokolovsky
ca008bfd2d .travis.yml: Integrate tools/check_code_size.sh. 2016-10-25 11:43:55 +03:00
Paul Sokolovsky
f7aa692093 tools/check_code_size.sh: Code size validation script for CI. 2016-10-25 11:43:55 +03:00
Radomir Dopieralski
984a867341 esp8266/scripts: Make neopixel/apa102 handle 4bpp LEDs with common code.
The NeoPixel class now handles 4 bytes-per-pixel LEDs (extra byte is
intensity) and arbitrary byte ordering.  APA102 class is now derived from
NeoPixel to reduce code size and support fill() operation.
2016-10-25 14:21:07 +11:00
Damien George
f1b2b1b600 docs/library/builtins: Add docs for delattr and slice. 2016-10-25 11:02:47 +11:00
Paul Sokolovsky
2550d7dfd2 esp8266: Add support for building firmware version for 512K modules.
To build, "make 512k".

Disabled are FatFs support (no space for filesystem), Python functionality
related to files, btree module, and recently enabled features. With all
this, there's only one free FlashROM page.
2016-10-25 00:43:11 +03:00
Scott Shawcroft
16584dfee6 atmel-samd: Fix the Feather builds by switching to the VFS mass storage implementation. 2016-10-24 12:42:09 -07:00
Scott Shawcroft
82526b803c Add Travis CI badge. 2016-10-24 12:33:59 -07:00
Scott Shawcroft
58f37fc013 Build mpy-cross first because other builds depend on it. 2016-10-24 12:12:22 -07:00
Scott Shawcroft
710bf34fbd Add atmel-samd boards to travis build. 2016-10-24 11:59:50 -07:00
Paul Sokolovsky
b78144c64d tools/pip-micropython: Remove deprecated wrapper tool.
Deprecated for long time, pip-micropython now can't install packages
optimized for low-heap ports (like whole of micropython-lib).
2016-10-24 16:52:15 +03:00
Paul Sokolovsky
e6af94d13b esp8266/modesp: Add flash_user_start() function.
As we're looking towards adding OTA support, calculation of a FlashROM
area which can be used for filesystem (etc.) may become complex, so
introduce C function for that. So far it just hardcodes current value,
0x90000. In the future the function may be extended (and renamed) to
return the size of area too.
2016-10-24 16:52:15 +03:00
Damien George
266e4acdc2 docs/library/machine.SPI: Remove spurious "of". 2016-10-24 14:41:21 +11:00
Damien George
25c6fc731b tests/basics: Add test for builtin "delattr". 2016-10-24 13:50:39 +11:00
Damien George
5076e5c339 py: Add "delattr" builtin, conditional on MICROPY_CPYTHON_COMPAT. 2016-10-24 13:50:03 +11:00
Damien George
bc5b896f24 tests/basics/builtin_slice: Add test for "slice" builtin name. 2016-10-24 13:35:39 +11:00
Damien George
bdb0d2d0bc py/modbuiltins: Add builtin "slice", pointing to existing slice type. 2016-10-24 13:35:39 +11:00
Damien George
5694201930 extmod/vfs_fat_file: Make file.close() a no-op if file already closed.
As per CPython semantics.  In particular, file.__del__() should not raise
an exception if the file is already closed.
2016-10-24 12:59:20 +11:00
Alex March
06e7032906 qemu-arm: Exclude extmod/vfs_fat_fileio.py test. 2016-10-24 12:49:19 +11:00
Alex March
cb20d999bc tests/extmod/vfs_fat: Improve VFS test coverage.
Covered case:
- Stat cases
- Invalid read/write/flush/close
- Invalid mkdir/rmdir/remove/getcwd
- File seek/tell, modes a/x/+, t/b
- Writing to a full disk
- Full path rename, slash trim
- Rename cases
- Bytestring listdir
- File object printing
2016-10-24 12:49:19 +11:00
Paul Sokolovsky
b6c22c42ab esp8266/etshal.h: Add few more ESP8266 vendor lib prototypes. 2016-10-23 16:43:07 +03:00
Paul Sokolovsky
a4dbb4230a minimal/Makefile: Split rule for firmware.bin generation. 2016-10-22 22:01:44 +03:00
Paul Sokolovsky
197a5724d8 tools: Upgrade upip to 1.1.4.
Fix error on unix when installing to non-existing absolute path.
2016-10-22 21:14:58 +03:00
Daniel Thompson
479b961d39 zephyr: Implement utime module.
This provides time and sleep together with the usual ticks_us/_ms/_diff
and sleep_us/ms family.

We also provide access to Zephyr's high precision timer as ticks_cpu().

Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
2016-10-22 20:15:26 +03:00
Paul Sokolovsky
1b76614d41 esp8266/Makefile: deploy: Remove deprecated line. 2016-10-22 18:56:43 +03:00
Fabricio Biazzotto
979e9a45d8 ACKNOWLEDGEMENTS: Change backer 905 info, replace city with name. 2016-10-22 14:45:35 +11:00
Scott Shawcroft
f5ca66805b atmel-samd: Tweak DAC logic for clarity. Thanks @bcr for the suggestion. 2016-10-21 17:08:14 -07:00
Scott Shawcroft
30dc24191f Merge pull request #31 from tannewt/external_flash
Add support for external flash chips and improve mass storage.
2016-10-21 16:38:57 -07:00
Scott Shawcroft
b2834c30a6 atmel-samd: Support reading from the flash cache. 2016-10-21 16:04:18 -07:00
Scott Shawcroft
98c8f2f6a3 atmel-samd: Update the FatFs sector cache on USB mass storage write
to the same sector.

This fixes #20, the issue where a listdir or import won't work
without a reset when it was run before the file was copied.
2016-10-21 15:44:10 -07:00
Scott Shawcroft
b8ef783052 extmod: Fix getting sector size when the max and min sizes are the
same.

Also switch the max size back to 512 for atmel-samd to save ram.
2016-10-21 15:44:10 -07:00
Scott Shawcroft
9eb86e8015 Add support for USB writeable, MicroPython read-only volumes.
This prevents file system corruption due to two systems mutating
it at once.
2016-10-21 15:44:09 -07:00
Scott Shawcroft
eb62d03e33 atmel-samd: Add flash write activity LED. 2016-10-21 15:44:09 -07:00
Scott Shawcroft
8b1526e95e atmel-samd: Add a heap based cache for writing to flash.
The code will fallback to the flash scratch space when the GC
cannot allocate us enough memory.
2016-10-21 15:44:09 -07:00