Commit Graph

26506 Commits

Author SHA1 Message Date
Glenn Ruben Bakke 4326e08802 nrf/boards: Enable needed features for FAT/LFS1/LFS2.
Enable the following features for all boards except
nrf51 boards with SoftDevice present:

- MICROPY_VFS
- MICROPY_PY_NRF
- MICROPY_HW_ENABLE_INTERNAL_FLASH_STORAGE
2021-08-08 23:17:55 +10:00
Glenn Ruben Bakke b0fd4372c4 nrf/main: Add auto mount and auto format hook for internal flash FS. 2021-08-08 23:17:55 +10:00
Glenn Ruben Bakke 6ff3a2afef nrf/qstrdefsport.h: Add entries for in-built FS mount points. 2021-08-08 23:17:49 +10:00
Glenn Ruben Bakke f99aa82e85 nrf/mpconfigport.h: Enable MICROPY_PY_IO_FILEIO when an FS is enabled.
Enable MICROPY_PY_IO_FILEIO if MICROPY_VFS_FAT, MICROPY_VFS_LFS1
or MICROPY_VFS2 has been enabled.
2021-08-08 23:09:26 +10:00
Glenn Ruben Bakke 7a833edf37 nrf/modules/uos: Allow a board to configure MICROPY_VFS_FAT/LFS1/LFS2. 2021-08-08 23:09:26 +10:00
Glenn Ruben Bakke 0bde907a8b nrf/Makefile: Add _fs_size linker script override from make.
Add posibility to override linker script "_fs_size" from make by adding the
FS_SIZE parameter.  The syntax of value is linker script syntax.  For
example, the value of 131072 bytes can be written as 128K like this:
FS_SIZE=128K.

If not set, default value for "_fs_size" from linker script will be used.
2021-08-08 23:09:26 +10:00
Glenn Ruben Bakke c9b72ba694 nrf/mpconfigport.h: Tune FAT FS configuration.
Disable MICROPY_FATFS_MULTI_PARTITION configuration because there is no
partition table in the flash for FATFS to read.

Also, set MICROPY_FATFS_MAX_SS to the size of a flash page.  For nrf51 the
value 1024 is set.  For nrf52/nrf91 the value 4096 is set.
2021-08-08 23:09:26 +10:00
Glenn Ruben Bakke b40dfa961d nrf/README: Update README.md to reflect internal file systems.
This documents parameters that can be passed to make to enable a specific
file system to included in the build.  Also, document the Makefile override
parameter "FS_SIZE" that can be used to tune the size of the flash region
to use as internal flash file system.
2021-08-08 23:09:26 +10:00
Glenn Ruben Bakke 85cad50266 nrf/mpconfigport.h: Expose nrf module when MICROPY_PY_NRF is set. 2021-08-08 23:09:26 +10:00
Glenn Ruben Bakke 5a873e27eb nrf/drivers: Add support for using flash block device with SoftDevice.
Update flash.c to also be compiled in when
MICROPY_HW_ENABLE_INTERNAL_FLASH_STORAGE is enabled and SoftDevice is
present.

Update bluetooth/ble_drv.c to forward flash events to flash.c when
MICROPY_HW_ENABLE_INTERNAL_FLASH_STORAGE is enabled.
2021-08-08 23:09:26 +10:00
Glenn Ruben Bakke 127cec8cae nrf/modules/nrf: Add new nrf module with flash block device.
This commit adds the "nrf" module for port specific modules and objects.
Included in it is the "Flash" object which exposes a block device
implementation to access internal SoC flash.

Thanks to @aykevl aka Ayke van Laethem for the initial implementation.
2021-08-08 23:09:26 +10:00
Glenn Ruben Bakke 3b594f7b27 nrf/boards/common.ld: Calculate unused flash region.
Calculate the unused flash area on the target device.  The values will be
exposed by _unused_flash_start and _unused_flash_length.  The start address
and the length are not aligned to either word or pages.
2021-08-08 23:09:26 +10:00
Kenny 9897ac6b5c yet more failures of local pre-commit to find that which github pre-commit does 2021-08-08 00:25:17 -07:00
Kenny a1fff320fb add location property to vectorshape and all composed shapes 2021-08-08 00:14:53 -07:00
Wellington Terumi Uemura 5ed585d3f4
Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (1013 of 1013 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/
2021-08-08 07:33:11 +02:00
Kenny bb25aeee51 fix code formatting that pre-commit --all-files did not locally report 2021-08-07 19:40:07 -07:00
microDev 06325c44d8
Merge pull request #5107 from jepler/compression-tweaks
Compress word offset table
2021-08-08 08:09:08 +05:30
Kenny 051d7a970e fix rotation and mirroring
now works with all vector shapes, even those with internal reference locations
that are negative. All shape locations are anchored to their 0,0 but they can
display pixels from negative coordinates if the shape's location on the screen
would have room for it.
2021-08-07 19:32:02 -07:00
Kenny b5837b157d improve transpose and mirror
* add heuristic to avoid drawing area unnecessarily
* fix Polygon.points
* fix transpose
* fix mirror x and y

Known broken:
Polygon with negative Y coordinates does not work right.
2021-08-07 19:31:22 -07:00
Jeff Epler c652a8d101 Merge branch 'weblate-circuitpython-main' of https://github.com/weblate/circuitpython into compression-tweaks 2021-08-07 09:24:10 -05:00
Jeff Epler d59a28db97 Compress word offset table
By storing "count of words by length", the long `wends` table can be
replaced with a short `wlencount` table.  This saves flash storage space.

Extend the range of string lengths that can be in the dictionary.
Originally it was to 2 to 9; at one point it was changed to 3 to 9.
Putting the lower bound back at 2 has a positive impact on the French
translation (a bunch of them, such as "ch", "\r\n", "%q", are used).
Increasing the maximum length gets 'mpossible', ' doit être ',
and 'CircuitPyth' at the long end.  This adds a bit of processing time
to makeqstrdata. The specific 2/11 values are again empirical based on
the French translation on the adafruit_proxlight_trinkey_m0.
2021-08-07 09:23:35 -05:00
Damien George f834fef6bb stm32/powerctrl: Support changing frequency on WB MCUs.
This allows changing the frequency to: 100kHz, 200kHz, 400kHz, 800kHz,
1MHz, 2MHz, 4MHz, 8MHz, 16MHz, 32MHz, 64MHz.  For frequencies 2MHz and
below, low power run (LPR) mode is enabled automatically.

Signed-off-by: Damien George <damien@micropython.org>
2021-08-07 23:41:20 +10:00
Damien George 3b32b3d1b3 stm32/usbd_cdc_interface: Rename USBD_CDC_xx opts to MICROPY_HW_USB_xx.
Signed-off-by: Damien George <damien@micropython.org>
2021-08-07 23:13:58 +10:00
Damien George f28e8b9073 stm32/usbd_desc: Rename USBD_xxx descriptor opts to MICROPY_HW_USB_xxx.
Signed-off-by: Damien George <damien@micropython.org>
2021-08-07 23:13:58 +10:00
Damien George 96c6b8cae3 ports: Rename USBD_VID/PID config macros to MICROPY_HW_USB_VID/PID.
For consistency with other board-level config macros that begin with
MICROPY_HW_USB.

Also allow boards in the mimxrt, nrf and samd ports to configure these
values.

Signed-off-by: Damien George <damien@micropython.org>
2021-08-07 23:13:55 +10:00
Damien George 45f9a38451 docs/library/machine.I2S.rst: Fix use of sd pin in examples.
Signed-off-by: Damien George <damien@micropython.org>
2021-08-07 20:40:54 +10:00
Damien George 78718fffb1 py/mkrules: Automatically build mpy-cross if it doesn't exist.
Commit 4173950658 removed automatic building
of mpy-cross, which rebuilt it whenever any of its dependent source files
changed.

But needing to build mpy-cross, and not knowing how, is a frequent issue.
This commit aims to help by automatically building mpy-cross only if it
doesn't exist.  For Makefiles it uses an order-only prerequisite, while
for CMake it uses a custom command.

If MICROPY_MPYCROSS (which is what makemanifest.py uses to locate the
mpy-cross executable) is defined in the environment then automatic build
will not be attempted, allowing a way to prevent this auto-build if needed.

Thanks to Trammell Hudson aka @osresearch for the original idea; see #5760.

Signed-off-by: Damien George <damien@micropython.org>
2021-08-07 20:25:32 +10:00
Hosted Weblate 4abf9f3cf1
Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/
2021-08-07 06:00:29 +02:00
Hosted Weblate 4ff76ae875
Merge remote-tracking branch 'origin/main' into main 2021-08-07 06:00:27 +02:00
Jonny Bergdahl 59bebfdb17
Translated using Weblate (Swedish)
Currently translated at 100.0% (1013 of 1013 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/sv/
2021-08-07 06:00:27 +02:00
microDev 063e3946d6
Merge pull request #5094 from jepler/quirc
Add qrio: Decode QR codes with quirc lib
2021-08-07 09:30:20 +05:30
Peter Züger d290f369d0 tests/extmod/ujson: Add tests for dump/dumps separators argument.
Basically just copied ujson_dump(s).py and added various valid/invalid
separator tests.

Signed-off-by: Peter Züger <zueger.peter@icloud.com>
2021-08-07 13:52:16 +10:00
Peter Züger ffc854f17f extmod/modujson: Add support for dump/dumps separators keyword-argument.
Optionally enabled via MICROPY_PY_UJSON_SEPARATORS.  Enabled by default.

For dump, make sure mp_get_stream_raise is called after
mod_ujson_separators since CPython does it in this order (if both
separators and stream are invalid, separators will raise an exception
first).

Add separators argument in the docs as well.

Signed-off-by: Peter Züger <zueger.peter@icloud.com>
Signed-off-by: Damien George <damien@micropython.org>
2021-08-07 13:52:16 +10:00
Damien George 8616129f2e esp8266,esp32: Include hidden networks in WLAN.scan results.
Addresses issues #2697 and #5329.

Signed-off-by: Damien George <damien@micropython.org>
2021-08-07 13:28:34 +10:00
Jim Mussared bfc8e88ce1 esp32/mpconfigport.h: Enable reverse and inplace special methods.
Reverse operations are supported on stm32 and rp2, and esp32 has enough
space to also enable inplace operations, to make it complete.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-08-07 13:27:09 +10:00
Patrick Van Oosterwijck 028fc815cd esp32/boards: Add Silicognition wESP32 board configuration.
For rev 7+ boards with 16MB of flash.  Partition table allocates 2.4 MiB
for MicroPython, 11 MiB for the filesystem.
2021-08-07 12:50:13 +10:00
Hosted Weblate c21c754a50
Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/
2021-08-06 21:10:25 +02:00
Scott Shawcroft be2342f32f
Merge pull request #5072 from microDev1/traceback
Add traceback module
2021-08-06 12:10:17 -07:00
Scott Shawcroft 93aa4e9e47
Merge pull request #5102 from evildave666/blackpill-add-mfg-name
Add WeAct manufacturer for STM32F411 blackpill boards
2021-08-06 11:59:24 -07:00
Jeff Epler 67551c1ac0 qrio: Split QRInfo & PixelPolicy to their own .c/.h files 2021-08-06 09:53:17 -05:00
evildave666 4d14bcf2a2 Add WeAct manufacturer for black pill boards 2021-08-06 16:06:16 +09:00
Jeff Epler 8e201d519e better document constructor arguments 2021-08-05 15:04:28 -05:00
Scott Shawcroft 00b617c9c4
Merge pull request #5097 from anecdata/cucumber
Add Gravitech Cucumber M, MS, R, and RS boards
2021-08-05 11:49:51 -07:00
Jeff Epler f0e489f51f
Merge pull request #5098 from bd34n/bdmicro_vina_d51_flash_chip
board bdmicro_vina_d51: Add support for MX25L12833F flash chip.
2021-08-05 13:48:29 -05:00
Scott Shawcroft e3fa6e2c35
Merge pull request #5089 from tannewt/disable_ble_workflow
Add ability to disable BLE workflow
2021-08-05 11:21:17 -07:00
Jeff Epler 2e8eb43dcc Use new quirc define for small stacks
.. and revert stack enlargement of esp32-s2
2021-08-05 12:52:43 -05:00
Jeff Epler 0fbe56c915 Better Document PixelPolicy and the pixel_policy argument 2021-08-05 12:27:49 -05:00
Jeff Epler e5a57d2399 Fix function name in prototype 2021-08-05 12:24:12 -05:00
Jeff Epler 46ac717538 Rename qrinfo -> QRInfo 2021-08-05 12:24:12 -05:00
Jeff Epler 14f1d95d2d qrio: Fix handling of 1-arg decode() 2021-08-05 12:24:12 -05:00