Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for RP2040 #806

Merged
merged 18 commits into from Jan 24, 2022
Merged

Add support for RP2040 #806

merged 18 commits into from Jan 24, 2022

Conversation

andryblack
Copy link
Contributor

@andryblack andryblack commented Jan 5, 2022

Initial RP2040 support.
For now implemented basic functional of core, clock, gpio, uart, spi and usb modules.
Same examples buildable and worked on device.
Early implementation added to align structure and naming conventions.

  • Implement dma
  • Update HAL support matrix in Readme to work with RP2040

Copy link
Member

@salkinium salkinium left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nicely done, I love it!

(Copyright notice need to be updated in most files, either add yourself or replace the authors if the file is new)

.gitmodules Outdated Show resolved Hide resolved
ext/rp/module.lb Outdated Show resolved Hide resolved
src/modm/board/rp_pico/board.hpp Outdated Show resolved Hide resolved
src/modm/board/rp_pico/module.lb Outdated Show resolved Hide resolved
src/modm/board/rp_pico/module.lb Outdated Show resolved Hide resolved
src/modm/platform/core/rp/module.md Outdated Show resolved Hide resolved
src/modm/platform/gpio/rp/config.hpp.in Outdated Show resolved Hide resolved
tools/build_script_generator/module.lb Outdated Show resolved Hide resolved
tools/scripts/generate_rp_boot2.py Outdated Show resolved Hide resolved
tools/scripts/build_elf2uf2.py Outdated Show resolved Hide resolved
@salkinium
Copy link
Member

You should also add the example to the CI under here: https://github.com/modm-io/modm/blob/develop/.github/workflows/linux.yml#L82

(I think the CI is failing because you force pushed the modm-devices commit away.)

@andryblack andryblack force-pushed the rp2040 branch 4 times, most recently from 14a7dc6 to 0eebf74 Compare January 7, 2022 12:08
Copy link
Member

@salkinium salkinium left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastic work, I'm very impressed!

src/modm/platform/uart/rp/module.lb Outdated Show resolved Hide resolved
ext/rp/pico.h Outdated Show resolved Hide resolved
ext/rp/pico.h Show resolved Hide resolved
ext/rp/pico.cpp Outdated Show resolved Hide resolved
ext/rp/module.lb Outdated Show resolved Hide resolved
src/modm/platform/usb/rp/module.lb Outdated Show resolved Hide resolved
ext/rp/irq.h Outdated Show resolved Hide resolved
src/modm/platform/core/rp/module.lb Outdated Show resolved Hide resolved
tools/modm_tools/elf2uf2.py Show resolved Hide resolved
tools/modm_tools/elf2uf2.py Outdated Show resolved Hide resolved
@andryblack andryblack force-pushed the rp2040 branch 3 times, most recently from d9e53e7 to e230f4d Compare January 9, 2022 17:10
Copy link
Member

@salkinium salkinium left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regarding fiber communications (channels, semaphores etc) there is some unfinished work in this commit, that still has bugs: https://github.com/salkinium/modm/tree/feature/fiber_waitable

src/modm/platform/core/rp/multicore.hpp Outdated Show resolved Hide resolved
src/modm/platform/core/rp/multicore.hpp Outdated Show resolved Hide resolved
src/modm/platform/core/rp/multicore.hpp Outdated Show resolved Hide resolved
examples/rp_pico/fiber/main.cpp Outdated Show resolved Hide resolved
src/modm/processing/fiber/fiber.hpp.in Outdated Show resolved Hide resolved
src/modm/board/rp_pico/board.xml Outdated Show resolved Hide resolved
src/modm/processing/fiber/scheduler.hpp.in Outdated Show resolved Hide resolved
src/modm/processing/fiber/scheduler.hpp.in Outdated Show resolved Hide resolved
@andryblack andryblack changed the title WIP: [rp2040] initial support [rp2040] initial support Jan 11, 2022
@rleh

This comment has been minimized.

@chris-durand

This comment has been minimized.

src/modm/platform/dma/rp/dma.hpp.in Outdated Show resolved Hide resolved
src/modm/platform/spi/rp/spi_master.hpp.in Outdated Show resolved Hide resolved
src/modm/platform/spi/rp/spi_master_dma_impl.hpp.in Outdated Show resolved Hide resolved
src/modm/processing/fiber/scheduler.hpp.in Show resolved Hide resolved
src/modm/platform/clock/rp/module.lb Outdated Show resolved Hide resolved
src/modm/platform/core/rp/module.md Outdated Show resolved Hide resolved
@salkinium
Copy link
Member

Great work as usual, very nice refactor of the fibers to support multicore!

@salkinium salkinium added ci:hal Triggers the exhaustive HAL compile CI jobs and removed ci:hal Triggers the exhaustive HAL compile CI jobs labels Jan 23, 2022
Copy link
Member

@salkinium salkinium left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chris-durand This is now ready to be rebased/merged, please review.

Copy link
Member

@chris-durand chris-durand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing work! Thank you very much!

examples/rp_pico/fiber/main.cpp Outdated Show resolved Hide resolved
examples/rp_pico/logger/main.cpp Outdated Show resolved Hide resolved
examples/rp_pico/mclogger/main.cpp Outdated Show resolved Hide resolved
ext/rp/address_mapped.h Show resolved Hide resolved
src/modm/platform/core/rp/module.md Outdated Show resolved Hide resolved
src/modm/platform/dma/rp/dma.hpp.in Outdated Show resolved Hide resolved
src/modm/platform/uart/rp/uart.hpp.in Show resolved Hide resolved
src/modm/platform/usb/rp/usb.hpp Outdated Show resolved Hide resolved
@salkinium salkinium merged commit 1c9c0b6 into modm-io:develop Jan 24, 2022
@salkinium
Copy link
Member

Thanks to @andryblack, this PR was a lot of fun to accompany!

@salkinium
Copy link
Member

Docs are now online: https://docs.modm.io/develop/api/rp2040/modules.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
advanced 🤯 ci:hal Triggers the exhaustive HAL compile CI jobs feature 🚧 modm-devices 🎛
Development

Successfully merging this pull request may close these issues.

None yet

4 participants