Commit Graph

55 Commits

Author SHA1 Message Date
iabdalkader
fd202fe757 rp2/boards/ARDUINO_NANO_RP2040_CONNECT: Include "time" in manifest.
Freeze the micropython-lib time module to get strftime.
2023-03-08 00:52:54 +11:00
Jim Mussared
a377302623 extmod/modnetwork: Add network.hostname() and network.country().
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>
2023-03-01 01:26:17 +11:00
Jim Mussared
5812611ab2 rp2/boards/ARDUINO_NANO_RP2040_CONNECT: Use default aioble.
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>
2023-02-16 12:32:03 +11:00
Jim Mussared
6250337c9c ports: Make all network-capable boards use bundle-networking.
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>
2023-02-01 12:42:06 +11:00
Jay Greco
be420bf9bb rp2/boards/NULLBITS_BIT_C_PRO: Add Bit-C PRO board. 2023-01-28 15:14:48 +11:00
iabdalkader
d02f089058 rp2/boards: Add pin CSV files to board definitions.
Pin defines are:
- For Pico define board pins and the default LED pin (WL_GPIO25).
- For Pico-W define board pins, external pins and the default
  LED pin (WL_GPIO0).
- For the Nano-RP2040, define board pins, external pins and
  the default LED pin (GPIO25)
- For all other boards, the pins.csv defines the LED pin (if any)
  for backwards compatibility with code that assumes there's always
  an LED pin.
2023-01-16 11:44:28 +11:00
iabdalkader
7d01f38170 drivers/ninaw10: Implement machine.Pin external pin controls. 2023-01-16 11:44:28 +11:00
iabdalkader
c214c9e648 rp2/machine_pin: Add support for named pins and alternate functions.
This commit adds support for generating named pin mappings for all pins
including CPU, board-defined, LED and externally controlled pins.  CPU pins
are mapped to `pin_GPIO<n>`, externally-controlled pins are mapped to
`pin_EXT_GPIO<n>`, and defined conditionally (up to 10 pins, and can be
expanded in the future), and they are non-const to allow `machine-pin.c` to
write the pin object fields.  Both CPU and externally controlled pins are
generated even if there's no board CSV file; if one exists it will just be
added to board pins.
2023-01-16 11:44:26 +11:00
iabdalkader
66e0cfc3b9 rp2/machine_pin: Refactor the machine.Pin class for external GPIO.
Handle externally controlled GPIO pins more generically, by removing all
CYW43-specific code from `machine_pin.c`, and adding hooks to initialise,
configure, read and write external pins.  This allows any driver for an
on-board module which controls GPIO pins (such as CYW43 or NINA), to
provide its own implementation of those hooks and work seamlessly with
`machine_pin.c`.
2023-01-16 11:37:18 +11:00
iabdalkader
e35bcb0f0b rp2/boards/ARDUINO_NANO_RP2040: Add more modules and enable MD5 hash.
Changes in this commit are:
- Enable MD5 hash to verify Nina WiFi firmware.
- Add ntptime, urequests and espflash to manifest.
2022-11-14 19:06:51 +11:00
Angus Gratton
c8913fdbfa rp2: Allow enabling USB device without enabling USB-CDC.
Requires changing the USB-CDC stdin/stdout guards from
MICROPY_HW_ENABLE_USBDEV to the new (in this port)
MICROPY_HW_USB_CDC.
2022-11-11 16:49:18 +11:00
Jim Mussared
924a3e03ec top: Replace upip with mip everywhere.
Updates all README.md and docs, and manifests to `require("mip")`.

Also extend and improve the documentation on freezing and packaging.

This work was funded through GitHub Sponsors.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-09-30 17:34:03 +10:00
Matt Trentini
bdbc44474f rp2/boards/WEACTSTUDIO: Add WEACTSTUDIO with multiple variants.
This supports 2, 4, 8 and 16MB flash variants.
2022-09-26 12:40:14 +10:00
Jim Mussared
dec0ff7a10 rp2/boards: Remove all I2C,SPI pin defs that already match pico-sdk.
I.e. for whichever SPI/I2C instance is PICO_DEFAULT_I2C, there's no need to
set MICROPY_HW_SPIn_SCK.

The only ones remaining are for the non-default instance.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-09-08 14:51:15 +10:00
Jim Mussared
c364301817 rp2/boards: Set PICO_BOARD correctly for each board.
In most cases, it's calculated automatically from the board name, and so
doesn't need to be set at all.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-09-08 14:50:54 +10:00
Jim Mussared
d84c6ef0e8 ports: Use micropython-lib version of drivers in manifests. 2022-09-08 11:27:05 +10:00
Jim Mussared
203dae41fb all: Update all manifest.py files to use new features.
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>
2022-09-05 18:43:18 +10:00
Jim Mussared
da7f2537a1 top: Use micropython-lib unconditionally in manifests.
micropython-lib is now a submodule, and the manifest compilation process
will ensure it is available, so manifests no longer need to check that it
is available.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-09-05 17:00:43 +10:00
omogenot
6e51dbd95a rp2/boards/W5500_EVB_PICO: Add new board definition for W5500_EVB_PICO.
Signed-off-by: github@mymeterinfo.info
2022-08-11 14:12:55 +10:00
Ian Davies
fbe9417b90 extmod/ntptime: Factor out ntptime module from esp8266 port.
The ntptime module was previously only included in the ESP8266 port.  This
commit factors that module out into the extmod directory, makes it support
different epochs, and includes it in the rp2 port.
2022-08-06 00:08:32 +10:00
Jim Mussared
c5563aa024 rp2/mpconfigport: Make networking options consistent across boards.
Enable the same set of networking features on boards with wifi/ethernet.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-07-12 16:28:44 +10:00
Jim Mussared
2efaebc899 rp2/boards/ARDUINO_NANO_RP2040_CONNECT: Add urequests module.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-07-05 23:03:02 +10:00
Damien George
3d76292f37 rp2/boards/GARATRONIC_PYBSTICK26_RP2040: Change pico-sdk board name.
This follows a similar renaming in pico-sdk.

Signed-off-by: Damien George <damien@micropython.org>
2022-07-05 09:45:44 +10:00
Damien George
99c2589778 rp2/boards/PICO_W: Add new Pico W board, an RP2040 with WiFi.
Work done in collaboration with Graham Sanderson and Peter Harper.

Signed-off-by: Damien George <damien@micropython.org>
2022-06-30 17:03:51 +10:00
iabdalkader
de823e7741 rp2/boards/ARDUINO_NANO_RP2040_CONNECT: Enable Arduino 1200bps touch. 2022-06-23 14:32:56 +10:00
Andrew Scheller
cedb93c179 docs: Update Raspberry Pi URLs from .org to .com. 2022-06-14 11:41:13 +10:00
Damien George
9670a156da all: Rename MICROPY_PY_WIZNET5K to MICROPY_PY_NETWORK_WIZNET5K.
To match MICROPY_PY_NETWORK_CYW43 and MICROPY_PY_NETWORK_NINAW10.

Signed-off-by: Damien George <damien@micropython.org>
2022-06-07 16:55:18 +10:00
iabdalkader
2111ca0b8f rp2/boards/ARDUINO_NANO_RP2040_CONNECT: Update USB PID.
This PID is allocated for the Arduino Nano RP2040 running MicroPython.
2022-06-03 16:12:44 +10:00
Andrew Leech
1b80aa9ce3 rp2/boards/W5100S_EVB_PICO: Add Wiznet W5100S-EVB-Pico board.
Signed-off-by: Andrew Leech <andrew@alelec.net>
2022-06-03 14:34:29 +10:00
iabdalkader
875caca504 rp2/boards/ARDUINO_NANO_RP2040_CONNECT: Enable webrepl. 2022-05-25 16:05:50 +02:00
iabdalkader
a22d0bda52 rp2/boards/ARDUINO_NANO_RP2040_CONNECT: Disable internal errno.
* Internal errno can't be used with Nina module due to an issue
with esp-idf config.
2022-05-25 16:05:50 +02:00
Damien George
5c32111fa0 ports: Reformat more C and Python source code.
These files that are reformatted only now fall under the list of files to
apply uncrustify/black formatting to.

Signed-off-by: Damien George <damien@micropython.org>
2022-04-20 16:17:35 +10:00
iabdalkader
507ad03329 rp2: Add USB MSC support.
It is currently not enabled by default on any board.
2022-03-09 00:38:07 +11:00
Damien George
000b001fc1 rp2/boards/GARATRONIC_PYBSTICK26_RP2040: Use correct pico-sdk board cfg.
Signed-off-by: Damien George <damien@micropython.org>
2022-01-06 16:50:20 +11:00
iabdalkader
908e4cf5c3 rp2: Add support for DHT11 and DHT22 sensors. 2022-01-06 14:00:03 +11:00
iabdalkader
f4487a0049 rp2/boards/ARDUINO_NANO_RP2040_CONNECT: Set default I2C pins. 2022-01-06 13:35:20 +11:00
Frédéric Pierson
c422ca3da1 rp2/boards: Add PYBSTICK26 RP2040 board definition. 2021-11-25 21:05:21 +11:00
Mike Causer
172a031dff rp2/boards/PIMORONI_PICOLIPO_16MB: Fix 16MB flash size.
Was incorrectly added as 7MB for an 8MB SPI flash, but this board has a
16MB chip, not 8MB, so it should be 15MB leaving 1MB for MicroPython.

Thanks to @robert-hh
2021-11-19 15:34:07 +11:00
robert-hh
5ed7a748f0 rp2/boards: Add neopixel.py to manifest.py.
Because machine.bitstream is now implemented on the rp2 port.
2021-11-17 10:02:32 +11:00
iabdalkader
c3dceb1c32 rp2/boards: Add support for Arduino Nano RP2040. 2021-11-16 15:05:10 +11:00
Mike Causer
7f14344428 ports: Add images, features and urls to board.json. 2021-10-28 15:25:38 +11:00
Jim Mussared
e359b077dd ports: Add board.json for all boards.
This will be used by https://micropython.org/download/ to generate the
full listing of boards and firmware files.

Optionally supports a board.md for additional customisation of the
download page, as well as deploy.md for flashing instructions.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-10-27 14:04:53 +11:00
Mike Causer
71722c84ca rp2/boards: Add Pimoroni Tiny 2040. 2021-08-01 23:07:57 +10:00
Mike Causer
042a4bebc3 rp2/boards: Add Pimoroni Pico LiPo 16MB. 2021-08-01 23:07:05 +10:00
Mike Causer
95eff8d96a rp2/boards: Add Pimoroni Pico LiPo 4MB. 2021-08-01 23:06:06 +10:00
Mike Causer
02cbe018a5 rp2/boards: Add Adafruit QT Py RP2040. 2021-08-01 23:04:59 +10:00
Mike Causer
043848158d rp2/boards: Add Adafruit ItsyBitsy RP2040. 2021-08-01 23:03:30 +10:00
Mike Causer
e7a3e6ee6a rp2/boards/SPARKFUN_THINGPLUS: Configure I2C/SPI default pins. 2021-08-01 23:02:30 +10:00
Mike Causer
6986a8d680 rp2/boards/SPARKFUN_PROMICRO: Configure UART/I2C/SPI default pins. 2021-08-01 23:01:36 +10:00
Mike Causer
49497084f1 rp2/boards/ADAFRUIT_FEATHER_RP2040: Configure I2C/SPI default pins. 2021-08-01 17:15:18 +10:00