Deep Dive w/Scott: CircuitPython on a Raspberry Pi episode artwork

EPISODE · Oct 15, 2021 · 2H 22M

Deep Dive w/Scott: CircuitPython on a Raspberry Pi

from Adafruit Industries · host Adafruit Industries

Join Scott as he works on bringing CircuitPython to the Raspberry Pi. Work on USB has stalled so he's taking a break by working on getting CircuitPython working over UART. Chat with Scott and lot of others on the Adafruit Discord at https://adafru.it/discord. Deep Dive happens every week. Normally Fridays at 2pm Pacific but occasionally shifted to Thursday at 2pm. Typically goes for two hours or more. Questions are welcome. Next week is on Friday. 0:00 Getting started 0:03:25 Hello everyone / Housekeeping 0:05:51 Today - working on Arm Cortex A as bare metal micro (raspberry pi 4) 0:06:37 last week: interrupts / tiny usb 0:07:29 Exception Levels. EL3, EL2 (hypervisor), EL1 (OS), EL0 (applications) 0:09:13 Last week - EL2 hypervisor bits needed to be set 0:10:47 Looked into ARM architecture reference manual HCR_EL2 (64 bit register) 0:12:39 TGE bit Trap General Exception 0:16:19 D1.13 asynchronous exception type, routing, masking and priorities 0:18:09 Non-secure mode, SCR, TDE “C - interrupt remains pending” TGE bit set to 1 0:19:44 the magic bit that needed to be set in broadcom peripherals repo 0:21:00 NVM3722 ARM and AUX_IRQhandler 0:23:25 Pointer boxing ( using ‘extra’ bits in 64 bit pointer ) 0:24:10 Open OCD, Gdb, and uart screens 0:25:06 CP repl on Rasbperry Pi 0:25:33 print(“hello world”) hangs / next week HDMI output, but first fix this bug 0:28:21 ARM exception decoding using cortex-a.py arm8a-exception 0:29:40 pointer greater than 32 bits - probably a problem 0:30:30 Memory mapping ( only the first ‘gig’ of memory mapped ) 0:37:19 question: can a zero 1.3 use with any lcd??? 0:40:55 aapcs arm call stack research / Procedure call standard for the Arm Architecture 0:43:51 decode failing - irq_entry and irq_exit call stack creation 0:45:20 Frame pointer 0:50:58 ARM ABI 0:53:40 Microsoft arm arch 64 ABI documentation - very similar 0:54:54 experiment with h=”hello world” 0:55:58 gdb) info frame 1:02:25 typical C function call 1:05:28 exceptions should save the ‘callers’ state 1:06:13 ‘101’ review of memory ( heap and stack ) 1:25:00 disassemble mp_obj_print_helper to look at use of frame pointer 1:28:00 back to github libunwind 1:34:35 Unwinding frames in python 1:35:10 CP uses PIO for neopixels on RP2040 1:37:52 aarch64-unwind.h 1:41:10 does it come down to the exception entry code needing to update frame pointer (x29) to be stored on the stack to a GDB "correct" value, rather than storing the previous frame pointer value when exception occurs? 1:51:20 Digikey has a small number of the LED glasses and nRF driver boards available 1:54:00 stack-unwind-samples 1:56:10 greyed out command completion from fish shell 1:59:08 code is compiled for 64 bit ARM 2:00:43 oh, my fish extension - otherwise it’s pretty standard .fishrc (omf and bobthefish) 2:02:44 looking at github rsta2/circle for examples 2:03:51 exception stub 2:04:32 edc/bass to use bash utilities in fish shell 2:05:12 circle irq handler - might like what we want “exceptionstub64.S” 2:16:23 trying out the experiment - it’s worse :-( 2:18:55 wrap up - shop at adafruit.com or digikey.com if not in stock 2:20:47 wake the cat - and catch the links at github tannewt rpi branch 2:21:55 bye spook Visit the Adafruit shop online - http://www.adafruit.com ----------------------------------------- LIVE CHAT IS HERE! http://adafru.it/discord Adafruit on Instagram: https://www.instagram.com/adafruit Subscribe to Adafruit on YouTube: http://adafru.it/subscribe New tutorials on the Adafruit Learning System: http://learn.adafruit.com/ -----------------------------------------

Join Scott as he works on bringing CircuitPython to the Raspberry Pi. Work on USB has stalled so he's taking a break by working on getting CircuitPython working over UART. Chat with Scott and lot of others on the Adafruit Discord at https://adafru.it/discord. Deep Dive happens every week. Normally Fridays at 2pm Pacific but occasionally shifted to Thursday at 2pm. Typically goes for two hours or more. Questions are welcome. Next week is on Friday. 0:00 Getting started 0:03:25 Hello everyone / Housekeeping 0:05:51 Today - working on Arm Cortex A as bare metal micro (raspberry pi 4) 0:06:37 last week: interrupts / tiny usb 0:07:29 Exception Levels. EL3, EL2 (hypervisor), EL1 (OS), EL0 (applications) 0:09:13 Last week - EL2 hypervisor bits needed to be set 0:10:47 Looked into ARM architecture reference manual HCR_EL2 (64 bit register) 0:12:39 TGE bit Trap General Exception 0:16:19 D1.13 asynchronous exception type, routing, masking and priorities 0:18:09 Non-secure mode, SCR, TDE “C - interrupt remains pending” TGE bit set to 1 0:19:44 the magic bit that needed to be set in broadcom peripherals repo 0:21:00 NVM3722 ARM and AUX_IRQhandler 0:23:25 Pointer boxing ( using ‘extra’ bits in 64 bit pointer ) 0:24:10 Open OCD, Gdb, and uart screens 0:25:06 CP repl on Rasbperry Pi 0:25:33 print(“hello world”) hangs / next week HDMI output, but first fix this bug 0:28:21 ARM exception decoding using cortex-a.py arm8a-exception 0:29:40 pointer greater than 32 bits - probably a problem 0:30:30 Memory mapping ( only the first ‘gig’ of memory mapped ) 0:37:19 question: can a zero 1.3 use with any lcd??? 0:40:55 aapcs arm call stack research / Procedure call standard for the Arm Architecture 0:43:51 decode failing - irq_entry and irq_exit call stack creation 0:45:20 Frame pointer 0:50:58 ARM ABI 0:53:40 Microsoft arm arch 64 ABI documentation - very similar 0:54:54 experiment with h=”hello world” 0:55:58 gdb) info frame 1:02:25 typical C function call 1:05:28 exceptions should save the ‘callers’ state 1:06:13 ‘101’ review of memory ( heap and stack ) 1:25:00 disassemble mp_obj_print_helper to look at use of frame pointer 1:28:00 back to github libunwind 1:34:35 Unwinding frames in python 1:35:10 CP uses PIO for neopixels on RP2040 1:37:52 aarch64-unwind.h 1:41:10 does it come down to the exception entry code needing to update frame pointer (x29) to be stored on the stack to a GDB "correct" value, rather than storing the previous frame pointer value when exception occurs? 1:51:20 Digikey has a small number of the LED glasses and nRF driver boards available 1:54:00 stack-unwind-samples 1:56:10 greyed out command completion from fish shell 1:59:08 code is compiled for 64 bit ARM 2:00:43 oh, my fish extension - otherwise it’s pretty standard .fishrc (omf and bobthefish) 2:02:44 looking at github rsta2/circle for examples 2:03:51 exception stub 2:04:32 edc/bass to use bash utilities in fish shell 2:05:12 circle irq handler - might like what we want “exceptionstub64.S” 2:16:23 trying out the experiment - it’s worse :-( 2:18:55 wrap up - shop at adafruit.com or digikey.com if not in stock 2:20:47 wake the cat - and catch the links at github tannewt rpi branch 2:21:55 bye spook Visit the Adafruit shop online - http://www.adafruit.com ----------------------------------------- LIVE CHAT IS HERE! http://adafru.it/discord Adafruit on Instagram: https://www.instagram.com/adafruit Subscribe to Adafruit on YouTube: http://adafru.it/subscribe New tutorials on the Adafruit Learning System: http://learn.adafruit.com/ -----------------------------------------

NOW PLAYING

Deep Dive w/Scott: CircuitPython on a Raspberry Pi

0:00 2:22:21

No transcript for this episode yet

We transcribe on demand. Request one and we'll notify you when it's ready — usually under 10 minutes.

API Intersection Stoplight Building a successful API requires more than just coding. It starts with collaborative design, focuses on creating a great developer experience, and ends with getting your company on board, maintaining consistency, and maximizing your API’s profitability.In the API Intersection, you’ll learn from experienced API practitioners who transformed their organizations, and get tangible advice to build quality APIs with collaborative API-first design.Jason Harmon brings over a decade of industry-recognized REST API experience to discuss topics around API design, governance, identity/auth versioning, and more.They’ll answer listener questions, and discuss best practices on API design (definition, modeling, grammar), Governance (multi-team design, reviewing new API’s), Platform Transformation (culture, internal education, versioning) and more.They’ll also chat with experienced API practitioners from a wide array of industries to draw out practical takeaways and insights you can use.H TV Podcast Industries Chris Jones, Derek O'Neill and John Harrison. TV Podcast Industries TV Podcast Industries is a podcast that provides discussions and reviews of various TV shows, including recent popular series like Alien Earth, The Sandman, The Last of Us, The Boys, and Daredevil Born Again. They also cover shows such as Ironheart, Star Trek: Picard, The Rings of Power, and many more, spanning both Marvel and DC universes, as well as other genres. Heart to Heart Podcast One on One / Next Level Studios In the Heart to Heart Podcast, we talk to some of our favorite & most interesting people in the entertainment industry so you can feel empowered and learn that even in the most challenging of industries, where there’s a will there’s a way.Whether you’re an actor, a writer, a casting director, a talent rep, or just someone interested in the behind the scene happenings of the entertainment industry, this podcast will have something for you. NOW, this isn’t just another How To podcast for actors. Plenty of those shows already exist. In Heart to Heart, every guest will share stories inspired by their sometimes winding path to success on their own terms. Revisionist History Pushkin Industries Revisionist History is Malcolm Gladwell's journey through the overlooked and the misunderstood. Every episode re-examines something from the past—an event, a person, an idea, even a song—and asks whether we got it right the first time. From Pushkin Industries. Because sometimes the past deserves a second chance.To get early access to ad-free episodes and extra content, subscribe to Pushkin+ in Apple Podcasts or at pushkin.fm/plus.iHeartMedia is the exclusive podcast partner of Pushkin Industries.

Frequently Asked Questions

How long is this episode of Adafruit Industries?

This episode is 2 hours and 22 minutes long.

When was this Adafruit Industries episode published?

This episode was published on October 15, 2021.

What is this episode about?

Join Scott as he works on bringing CircuitPython to the Raspberry Pi. Work on USB has stalled so he's taking a break by working on getting CircuitPython working over UART. Chat with Scott and lot of others on the Adafruit Discord at...

Can I download this Adafruit Industries episode?

Yes, you can download this episode by clicking the download button on the episode player, or subscribe to the podcast in your preferred podcast app for automatic downloads.
URL copied to clipboard!