[riot-notifications] [RIOT-OS/RIOT] cpu/rp2040: port RIOT to the Raspberry Pi RP2040 MCU (#16609)

Marian Buschsieweke notifications at github.com
Mon Jul 5 10:15:55 CEST 2021


### Contribution description

This provides:

- Support for the RP2040 MCU
     - Only `periph_gpio`, `periph_gpio_int`, and `periph_uart` are provided in this PR. Other than that no timers, no SPI, no nothing is provided.
     - Work on additional drivers can more easily be parallelized once basic support is upstream, which this PR tries to do.
- Support for the Raspberry Pi Pico board (`rpi-pico`), the reference board for the RP2040 MCU, is provided

### Acknowledgements

This code was developed as part of a software project in a combined effort of students and mentors. Thanks to @nickw96, @MaestroOnICe, and @Franz2000.

Most of the low level code and especially the boot sequence and clock configuration was developed by @fabian18.

### Testing procedure

The following test applications will be useful:

- `examples/default`
    - stdio via UART should work
    - Via SAUL the on-board LED should be controllable
- `tests/periph_gpio`
    - The GPIO pins should work as input (floating, with pull up, with pull down) and output and IRQs should be supported on rising, falling, and both edges

It would be useful to test all of the flashing options:

- Using OpenOCD and `pico-debug` (currently the default option)
     - Beware: First "flash" the gimmechace variant from here https://github.com/majbthrd/pico-debug/releases via the UF2 bootloader into RAM. (Needs to be re-"flashed" after each cold boot, or RAM corruption.)
- Using J-Link
- Using the UF2 bootloader

### Issues/PRs references

None

You can view, comment on, or merge this pull request online at:

  https://github.com/RIOT-OS/RIOT/pull/16609

-- Commit Summary --

  * cpu/rp2040: add support for the RP2040 MCU
  * cpu/rp2040: implement periph_uart
  * boards/rpi-pico: add the Raspberry Pi Pico

-- File Changes --

    A boards/rpi-pico/Makefile (3)
    A boards/rpi-pico/Makefile.dep (4)
    A boards/rpi-pico/Makefile.features (4)
    A boards/rpi-pico/Makefile.include (1)
    A boards/rpi-pico/board.c (29)
    A boards/rpi-pico/dist/openocd.cfg (3)
    A boards/rpi-pico/doc.txt (138)
    A boards/rpi-pico/include/board.h (52)
    A boards/rpi-pico/include/gpio_params.h (48)
    A boards/rpi-pico/include/periph_conf.h (55)
    A cpu/rp2040/Makefile (5)
    A cpu/rp2040/Makefile.dep (1)
    A cpu/rp2040/Makefile.features (5)
    A cpu/rp2040/Makefile.include (20)
    A cpu/rp2040/boot2_w25q080_padded_checksummed.S (23)
    A cpu/rp2040/boot_stage2/Makefile (33)
    A cpu/rp2040/boot_stage2/README.md (5)
    A cpu/rp2040/boot_stage2/boot2_at25sf128a.S (285)
    A cpu/rp2040/boot_stage2/boot2_generic_03h.S (103)
    A cpu/rp2040/boot_stage2/boot2_is25lp080.S (262)
    A cpu/rp2040/boot_stage2/boot2_usb_blinky.S (53)
    A cpu/rp2040/boot_stage2/boot2_w25q080.S (287)
    A cpu/rp2040/boot_stage2/boot2_w25x10cl.S (196)
    A cpu/rp2040/boot_stage2/boot_stage2.ld (13)
    A cpu/rp2040/boot_stage2/compile_time_choice.S (19)
    A cpu/rp2040/boot_stage2/config.h (92)
    A cpu/rp2040/boot_stage2/include/boot2_helpers/exit_from_boot2.S (28)
    A cpu/rp2040/boot_stage2/include/boot2_helpers/read_flash_sreg.S (30)
    A cpu/rp2040/boot_stage2/include/boot2_helpers/wait_ssi_ready.S (26)
    A cpu/rp2040/boot_stage2/include/hardware/platform_defs.h (55)
    A cpu/rp2040/boot_stage2/include/hardware/regs/adc.h (314)
    A cpu/rp2040/boot_stage2/include/hardware/regs/addressmap.h (74)
    A cpu/rp2040/boot_stage2/include/hardware/regs/busctrl.h (324)
    A cpu/rp2040/boot_stage2/include/hardware/regs/clocks.h (2409)
    A cpu/rp2040/boot_stage2/include/hardware/regs/dma.h (5313)
    A cpu/rp2040/boot_stage2/include/hardware/regs/dreq.h (50)
    A cpu/rp2040/boot_stage2/include/hardware/regs/i2c.h (2639)
    A cpu/rp2040/boot_stage2/include/hardware/regs/intctrl.h (63)
    A cpu/rp2040/boot_stage2/include/hardware/regs/io_bank0.h (14937)
    A cpu/rp2040/boot_stage2/include/hardware/regs/io_qspi.h (2931)
    A cpu/rp2040/boot_stage2/include/hardware/regs/m0plus.h (1149)
    A cpu/rp2040/boot_stage2/include/hardware/regs/pads_bank0.h (2300)
    A cpu/rp2040/boot_stage2/include/hardware/regs/pads_qspi.h (454)
    A cpu/rp2040/boot_stage2/include/hardware/regs/pio.h (2762)
    A cpu/rp2040/boot_stage2/include/hardware/regs/pll.h (135)
    A cpu/rp2040/boot_stage2/include/hardware/regs/psm.h (584)
    A cpu/rp2040/boot_stage2/include/hardware/regs/pwm.h (1505)
    A cpu/rp2040/boot_stage2/include/hardware/regs/resets.h (637)
    A cpu/rp2040/boot_stage2/include/hardware/regs/rosc.h (312)
    A cpu/rp2040/boot_stage2/include/hardware/regs/rtc.h (398)
    A cpu/rp2040/boot_stage2/include/hardware/regs/sio.h (1656)
    A cpu/rp2040/boot_stage2/include/hardware/regs/spi.h (521)
    A cpu/rp2040/boot_stage2/include/hardware/regs/ssi.h (809)
    A cpu/rp2040/boot_stage2/include/hardware/regs/syscfg.h (257)
    A cpu/rp2040/boot_stage2/include/hardware/regs/sysinfo.h (77)
    A cpu/rp2040/boot_stage2/include/hardware/regs/tbman.h (38)
    A cpu/rp2040/boot_stage2/include/hardware/regs/timer.h (332)
    A cpu/rp2040/boot_stage2/include/hardware/regs/uart.h (1148)
    A cpu/rp2040/boot_stage2/include/hardware/regs/usb.h (3603)
    A cpu/rp2040/boot_stage2/include/hardware/regs/vreg_and_chip_reset.h (151)
    A cpu/rp2040/boot_stage2/include/hardware/regs/watchdog.h (226)
    A cpu/rp2040/boot_stage2/include/hardware/regs/xip.h (187)
    A cpu/rp2040/boot_stage2/include/hardware/regs/xosc.h (159)
    A cpu/rp2040/boot_stage2/include/pico/asm_helper.S (38)
    A cpu/rp2040/boot_stage2/include/pico/config.h (85)
    A cpu/rp2040/boot_stage2/include/pico/platform.h (180)
    A cpu/rp2040/boot_stage2/pad_checksum (55)
    A cpu/rp2040/boot_stage2/read_flash_sreg.S (30)
    A cpu/rp2040/clock.c (183)
    A cpu/rp2040/cpu.c (89)
    A cpu/rp2040/doc.txt (8)
    A cpu/rp2040/include/.gitignore (1)
    A cpu/rp2040/include/cpu_conf.h (47)
    A cpu/rp2040/include/io_reg.h (138)
    A cpu/rp2040/include/periph_cpu.h (496)
    A cpu/rp2040/include/vendor/RP2040.h (29410)
    A cpu/rp2040/include/vendor/system_RP2040.h (67)
    A cpu/rp2040/ldscripts/RP2040.ld (46)
    A cpu/rp2040/periph/Makefile (1)
    A cpu/rp2040/periph/gpio.c (212)
    A cpu/rp2040/periph/uart.c (211)
    A cpu/rp2040/pll.c (131)
    A cpu/rp2040/rosc.c (57)
    A cpu/rp2040/system_RP2040.c (53)
    A cpu/rp2040/vectors.c (95)
    A cpu/rp2040/xosc.c (48)

-- Patch Links --

https://github.com/RIOT-OS/RIOT/pull/16609.patch
https://github.com/RIOT-OS/RIOT/pull/16609.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/16609
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210705/9bcfc72e/attachment-0001.htm>


More information about the notifications mailing list