The following have been tested and are working:
- 550MHz CPU frequency
- UART REPL via ST-Link
- USB REPL and mass storage
- 3x LEDs and 1x user button
- Ethernet
Signed-off-by: Damien George <damien@micropython.org>
Changes are:
- Freeze micropython-lib time module to get strftime.
- Reserve the last 1MB of QSPI flash for (optional) WiFi firmware storage.
- Disable SD card mount on boot.
- Enable high-speed BLE firmware download.
This provides a standard interface to setting the global networking config
for all interfaces and interface types.
For ports that already use either a static hostname (mimxrt, rp2) they will
now use the configured value. The default is configured by the port
(or optionally the board).
For interfaces that previously supported .config(hostname), this is still
supported but now implemented using the global network.hostname.
Similarly, pyb.country and rp2.country are now deprecated, but the methods
still exist (and forward to network.hostname).
Because ESP32/ESP8266 do not use extmod/modnetwork.c they are not affected
by this commit.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
The default now includes all sub-components (security, l2cap, etc)
and using the kwarg options is no longer supported.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This will ensure that any board with networking support gets:
- webrepl
- mip
- urequests
- ntptime
This work was funded through GitHub Sponsors.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This commit uses the REGION_ALIAS GNU linker command to simplify the linker
snippets and consolidate the duplication.
Signed-off-by: Damien George <damien@micropython.org>
The datasheet on page 55 shows PF0 (SDA) and PF1 (SCL) are the pins for
I2C2, but these pins do not work. Checking the MBED pinout for the
NUCLEO-F429ZI shows:
I2C1: PB8 (SCL) and PB9 (SDA).
I2C2: PB10 (SCL) and PB11 (SDA).
Both of these work and can be scanned and find devices connected to them.
Signed-off-by: Dale Weber <hybotics.sd@gmail.com>.
The STM32H7xx HAL LPUART AF macros are missing the number, this HAL is the
only one that's inconsistent in the way it defines LPUART AF macros, so we
only need to define them for H7.
Prior to this commit, only sector 0 was erase/write protected, which may
not be enough to protect all of mboot (especially if mboot lives at a
higher address than the start of flash).
This commit makes sure all internal flash sectors that mboot lives in are
protected from erasing and writing. The linker script must define
_mboot_writable_flash_start for this to work.
Signed-off-by: Damien George <damien@micropython.org>
Instead of being an explicit field, it's now a slot like all the other
methods.
This is a marginal code size improvement because most types have a make_new
(100/138 on PYBV11), however it improves consistency in how types are
declared, removing the special case for make_new.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
Although this driver and associated hardware can be used on any board, it
makes to only freeze it for PYB and PYBD boards. It can be easily copied
to any board if needed.
Fixes issue #8056.
Signed-off-by: Damien George <damien@micropython.org>
Changes in this commit:
- Manifest include's now use the directory path where possible (no longer
necessary to include the manifest.py file explicitly).
- Add manifest.py for all drivers and components that are referenced by
port/board manifests.
- Replace all uses of freeze() with package()/module(), except for port and
board modules.
- Use opt=3 everywhere, for consistency and to reduce code size.
- Use require() instead of include() for all micropython-lib references.
- Remove support for optional board-level manifest.py in mimxrt port, to
make it behave the same as other ports (the board must set
FROZEN_MANIFEST to a custom manifest.py, which can optionally include the
default, port-level manifest).
- Also reinstates modules that were accidentally removed from the esp8266
512k build in fbe9417b90.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
Signed-off-by: Damien George <damien@micropython.org>
It has been about 8 years since support for this chip was added. Reasons
to remove it are:
- It is no longer easy to obtain this part.
- There are now many other options for WiFi.
- It's not a good use of developer time to maintain it.
Signed-off-by: Damien George <damien@micropython.org>
Rather than having the autobuild know about the particular variants, have
the mpconfigboard.mk describe them and make autobuild discover them
automatically.
Adds a "query-variants" target to stm32/Makefile to allow the set of
possible variants to be queried.
Removes pybv3 from the autobuild as this isn't use by the downloads page.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
If mboot is built with support for packing (signing/encryption) it needs up
to 32KiB. So for simplicity increase the mboot region to 32KiB
unconditionally for WB55 boards (custom WB55 board configurations can still
provide their own linker scripts to override this).
Since commit e65d1e69e8 there is no longer an
io.FileIO class, so this option is no longer needed.
This option also controlled whether or not files supported being opened in
binary mode (eg 'rb'), and could, if disabled, lead to confusion as to why
opening a file in binary mode silently did the wrong thing (it would just
open in text mode if MICROPY_PY_IO_FILEIO was disabled).
The various VFS implementations (POSIX, FAT, LFS) were the only places
where enabling this option made a difference, and in almost all cases where
one of these filesystems were enabled, MICROPY_PY_IO_FILEIO was also
enabled. So it makes sense to just unconditionally enable this feature
(ability to open a file in binary mode) in all cases, and so just remove
this config option altogether. That makes configuration simpler and means
binary file support always exists (and opening a file in binary mode is
arguably more fundamental than opening in text mode, so if anything should
be configurable then it should be the ability to open in text mode).
Signed-off-by: Damien George <damien@micropython.org>
In-the-field use of these FUS/WS firmware update scripts has exposed some
weak points, causing corrupted FUS/WS firmware to be flashed to the unit.
The problems are mostly caused with the ST GUI application, but sometimes
from un-recognised failures during bin file transfer to the WB55 prior to
running the rfcore_firmware.py script. Other failures were caused by
incorrect load addresses being used, again both from user error copying the
address from the HTML release notes to the GUI tool, but also from
similarly not updating the address correctly in rfcore_firmware.py
To guard against these errors and make it easier to prepare different
versions, this commit adds a few features to the rfcore firmware update
tools:
- When creating the bin file, automatically parse the release note in the
folder to get the correct address.
- Add a footer to the bin file containing the name, version, CRC, address
etc.
- Before flashing rfcore, check if the same version is already installed.
- Verify the CRC and obfuscation key before flashing bin.
- Log the name and version of file being flashed.
This adds support for the LEGO Hub No. 7, aka LEGO Technic Small hub, aka
LEGO SPIKE Essential hub. This board is largely similar to Hub No. 6:
- Same MCU (STM32F413 - different packaging with fewer pins).
- Same Bluetooth chip (TI CC2564).
- Same IMU chip.
- Similar external flash chip - 4MiB instead of 32MiB.
- 2 I/O ports instead of 6.
- No display - only status and battery LEDs.
- Different LED driver chip.
- Only 1 button which is also the power button.
- No speaker.
Signed-off-by: David Lechner <david@pybricks.com>
This adds configurable macros to define the timer and channel used to
provide the Bluetooth 32768 MHz clock. This will allow code to be shared
with LEGO_HUB_NO7.
Signed-off-by: David Lechner <david@pybricks.com>
This changes spiflash.py to read the flash chip ID at runtime to select the
read/write/erase commands. This will allow the code to be shared with
LEGO_HUB_NO7 which doesn't use the 32-bit commands.
Also remove an unused constant while we are touching this.
Signed-off-by: David Lechner <david@pybricks.com>
This changes appupdate.py to get the filesystem size at runtime. This will
allow the code to be shared with LEGO_HUB_NO7 which has a similar flash
chip with a different size.
Signed-off-by: David Lechner <david@pybricks.com>
This changes all uses of pins to use the alias names of the pins. This
makes the code easier to understand and will also allow sharing more code
with LEGO_HUB_NO7.
Signed-off-by: David Lechner <david@pybricks.com>