Skip to content

Add STEMMA_I2C() object to Picos for Cowbells. #7116

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 1 commit into from
Oct 25, 2022

Conversation

kattni
Copy link

@kattni kattni commented Oct 24, 2022

Tested successfully on Pico by myself, and on Pico W by Jeff.

I chose to use the #define CIRCUITPY_BOARD_I2C_PIN method in case there is some hardware in the future that defines a different I2C, or in the event that they choose to specify a default for the Pico at some point.

@kattni kattni requested review from jepler and dhalbert October 24, 2022 20:29
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.

This looks good to me. I checked the definition style against other boards.

@jepler jepler merged commit f67d279 into adafruit:main Oct 25, 2022
KurtE pushed a commit to KurtE/circuitpython that referenced this pull request Jan 11, 2023
Prior to this fix the follow crash occurred.  With a GC layout of:

    GC layout:
      alloc table at 0x3fd80428, length 32001 bytes, 128004 blocks
      finaliser table at 0x3fd88129, length 16001 bytes, 128008 blocks
      pool at 0x3fd8bfc0, length 2048064 bytes, 128004 blocks

Block 128003 is an AT_HEAD and eventually is passed to gc_mark_subtree.
This causes gc_mark_subtree to call ATB_GET_KIND(128004).  When block 1 is
created with a finaliser, the first byte of the finaliser table becomes
0x2, but ATB_GET_KIND(128004) reads these bits as AT_TAIL, and then
gc_mark_subtree references past the end of the heap, which happened to be
past the end of PSRAM on the esp32-s2.

The fix in this commit is to ensure there is a one-byte gap after the ATB
filled permanently with AT_FREE.

Fixes issue adafruit#7116.

See also adafruit#5021

Signed-off-by: Jeff Epler <[email protected]>
Signed-off-by: Damien George <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants