Skip to content

Initial broadcom port for Raspberry Pi #5610

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

Merged
merged 6 commits into from
Nov 25, 2021
Merged

Initial broadcom port for Raspberry Pi #5610

merged 6 commits into from
Nov 25, 2021

Conversation

tannewt
Copy link
Member

@tannewt tannewt commented Nov 22, 2021

This targets the 64-bit CPU Raspberry Pis. The BCM2711 on the Pi 4
and the BCM2837 on the Pi 3 and Zero 2W. There are 64-bit fixes
outside of the ports directory for it.

There are a couple other cleanups that were incidental:

  • Use const mcu_pin_obj_t instead of omitting the const. The structs
    themselves are const because they are in ROM.
  • Use PTR <-> OBJ conversions in more places. They were found when
    mp_obj_t was set to an integer type rather than pointer.
  • Optimize submodule checkout because the Pi submodules are heavy
    and unnecessary for the vast majority of builds.

Fixes #4314

This targets the 64-bit CPU Raspberry Pis. The BCM2711 on the Pi 4
and the BCM2837 on the Pi 3 and Zero 2W. There are 64-bit fixes
outside of the ports directory for it.

There are a couple other cleanups that were incidental:
* Use const mcu_pin_obj_t instead of omitting the const. The structs
  themselves are const because they are in ROM.
* Use PTR <-> OBJ conversions in more places. They were found when
  mp_obj_t was set to an integer type rather than pointer.
* Optimize submodule checkout because the Pi submodules are heavy
  and unnecessary for the vast majority of builds.

Fixes micropython#4314
@tannewt tannewt added the broadcom Raspberry Pis with Broadcom chips label Nov 22, 2021
@tannewt
Copy link
Member Author

tannewt commented Nov 22, 2021

These are temporary USB PIDs under the Raspberry Pi VID. I'm waiting to hear from @ghollingworth about the official values.

Copy link
Collaborator

@dhalbert dhalbert 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! Lots of good cleanup removing 32-bit assumptions.

@tannewt
Copy link
Member Author

tannewt commented Nov 24, 2021

Ok, I've pushed a new version. It includes I2C support too.

@dhalbert
Copy link
Collaborator

Thanks for the updates, and hurrah for I2C! zero2w port is failing for some compilation reason, but the pi4b is working.

@dhalbert
Copy link
Collaborator

Thanks for the updates, and hurrah for I2C! zero2w port is failing for some compilation reason, but the pi4b is working.

Looks like a simple fix: I added a #include. If this works I will merge.

@dhalbert
Copy link
Collaborator

dhalbert commented Nov 24, 2021

@tannewt Making a commit from the GitHub web interface seems to have upset the build cloning optimizations you added. (EDIT: MAYBE NOT) From https://github.com/adafruit/circuitpython/runs/4313459204?check_suite_focus=true:

Run git describe --dirty --tags
  git describe --dirty --tags
  echo >>$GITHUB_ENV CP_VERSION=$(git describe --dirty --tags)
  shell: /usr/bin/bash -e {0}
  env:
    pythonLocation: /opt/hostedtoolcache/Python/3.8.12/x64
fatal: No tags can describe 'e98223cbae0c9dfe636badcc49bb85fa3f905cfa'.
Try --always, or create some tags.
Error: Process completed with exit code 128.

@dhalbert
Copy link
Collaborator

@tannewt I pushed an empty commit from your repo, and it didn't fix the problem. Hmm.

@dhalbert dhalbert merged commit 95c09ac into adafruit:main Nov 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
broadcom Raspberry Pis with Broadcom chips
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BCM2711 port (for Raspberry Pi 4 support)
3 participants