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

EPISODE · Oct 22, 2021 · 2H 9M

Deep Dive w/Scott: CircuitPython on Raspberry Pi 4

from Adafruit Industries · host Adafruit Industries

Join Scott as he shows all of the CircuitPython on Raspberry Pi 4 progress! After, we dive deep into enabling caches to speed things up. Questions are welcome. Next week is on Friday. Support Adafruit, and by extension me, by purchasing hardware from https://adafruit.com Chat with me and a 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. Thanks to David for notes. 0:00 Hellos 0:01:30 a little behind :-) 0:04:12 housekeeping 0:09:25 review progress from last week 0:10:06 broadcom peripherals on github 0:11:00 CMSIS 0:12:00 backtrace / openocd / gdb target external 0:13:00 broadcom-peripherals cortex-a-gdb.py 0:15:00 ExceptionUnwinder / add_saved_register / match boot.S 0:16:40 Micropython vs. circuitpython object representations (mpconfig.h) lines 73... 0:18:30 MICROPY_OBJ_REPR_D was for 64 bit pointers on a 32 bit system 0:19:11 use MICROPY_OBJ_REPR_A ( line 64) 0:20:00 next task - add HDMI - see rpi4-osdev part5-framebuffer 0:21:15 getting the GPU framebuffer / mailbox call 0:23:22 Cortex A programmer's guide pdf DEN0024A_v8_architecthure_PG.pdf 0:27:46 Raspberry Pi 4 - 2GB HDMI display with HDMI to USB adapter 0:31:33 program image into rpi 0:32:18 CP display ( and REPL ) on rpi HDMI - scroll appears slow - probably due to no caches activated 0:35:57 import board to get GPIO18-21 0:37:44 Question: Pi Pico / trying to make a MIDI sequencer but I can't get a precise ppqn (Pulses Per Quarter Note) clock using time.monotonic_ns. I heard we can't use timer interrupts with circuitpython. What should I do? 0:39:00 back to scrolling 0:43:35 Tak (sp) got USB working - 0:44:20 CP talking over USB! 0:46:33 tiny USB branch 0:48:32 committing ports/broadcom 0:49:00 oops - git reset hard :-( 0:50:12 EMMC2 mapping 0:52:00 needed more USB endpoints ( zero not adequate ) 0:53:18 ARM Cortex A cache chapter in DEN0024A_v8_architecture_PG.pdf 0:57:20 Other sharing of cache ( CPU, GPU, USB, frame buffer, etc ) 1:00:40 time.monotonic / No long integer support 1:02:00 def t() to test cpu performance based on time monotonic 1:03:20 storage not working yet - need to copy/paste from terminal 1:04:10 Instruction vs. Data caching, Flash / RAM 1:04:55 Need to split up RAM into a ‘flash’ area of RAM and a separate ‘RAM area 1:05:57 link.ld memory SECTIONS map 1:07:00 copy stuff from common.template.ld READONLY 1.5M, NORMAL 1022M 1:22:11 recompile and test … 1:26:46 it still works 1:28:00 set up the MAIR register ( and mmu.h ) 1:32:00 see page 3563 ( of 8696 ) of DDIO487G_b_armv8_arm.pdf 1:34:10 mmu.c setup_mmu_flat_map() 1:45:00 add MM_DESCRIPTOR_OUTER_SHAREABLE and INNER to mmu.h and mmu.c 1:48:30 look at all those bits in SCTLR_EL2 1:51:00 set “I” bit 12, and “C” bit 1:52:00 summarizing current status 1:54:50 Is the plan to have the raspberry pi show up as a mass storage device like other cp boards? 1:56:30 recompile, and try “something” out 1:57:00 As I understand it, that's the reason for using the P4 (or Pi Zero), as they support setting a USB port to a mode...the USB-C port on the Pi4, the 2nd port on the Zero 1:57:40 Interesting I'm excited to see what Circuit python can do on a pi board. I was curious how well they would behave as a mass storage drive since they're much closer to being a full fledged pc than other cp devices. 1:57:50 Doesn’t look like it worked - ( getting the rainbow test pattern ) 1:59:06 try just the instruction cache? 2:01:40 obviously we have some more optimizations to do, including the TLB 2:02:20 How is the storage etc working now? do you have an emmc model and use the usbboot thing to copy it over? Or? 2:02:40 ​Is it still recommended for beginners to start with CircuitPython6? I've been finding some of the sensor examples provided don't work with CircuitPython7, as the calls/functions/etc have changed. 2:03:40 So big question...if I submit a PR that allows booty.py as code.py alternative if in Pirate language mode, will it be accepted? 2:04:10 eMMC and SDcard would behave the same, nothing to do there technically 2:05:00 Related question, is it possible for the community to offer pull requests to update those examples? Would that be best done on the particular sensors Github page? Which then would filter to learn.ada 2:05:59 Sooo running CP from a MultiGB SD Card will just work on the RPI? 2:06:50 Wrap-up - remember the US daylight time zone change happening soon - still at 2PM local Follow along at https://github.com/tannewt/circuitpython/tree/rpi 2:09:30 pet the cat 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 shows all of the CircuitPython on Raspberry Pi 4 progress! After, we dive deep into enabling caches to speed things up. Questions are welcome. Next week is on Friday. Support Adafruit, and by extension me, by purchasing hardware from https://adafruit.com Chat with me and a 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. Thanks to David for notes. 0:00 Hellos 0:01:30 a little behind :-) 0:04:12 housekeeping 0:09:25 review progress from last week 0:10:06 broadcom peripherals on github 0:11:00 CMSIS 0:12:00 backtrace / openocd / gdb target external 0:13:00 broadcom-peripherals cortex-a-gdb.py 0:15:00 ExceptionUnwinder / add_saved_register / match boot.S 0:16:40 Micropython vs. circuitpython object representations (mpconfig.h) lines 73... 0:18:30 MICROPY_OBJ_REPR_D was for 64 bit pointers on a 32 bit system 0:19:11 use MICROPY_OBJ_REPR_A ( line 64) 0:20:00 next task - add HDMI - see rpi4-osdev part5-framebuffer 0:21:15 getting the GPU framebuffer / mailbox call 0:23:22 Cortex A programmer's guide pdf DEN0024A_v8_architecthure_PG.pdf 0:27:46 Raspberry Pi 4 - 2GB HDMI display with HDMI to USB adapter 0:31:33 program image into rpi 0:32:18 CP display ( and REPL ) on rpi HDMI - scroll appears slow - probably due to no caches activated 0:35:57 import board to get GPIO18-21 0:37:44 Question: Pi Pico / trying to make a MIDI sequencer but I can't get a precise ppqn (Pulses Per Quarter Note) clock using time.monotonic_ns. I heard we can't use timer interrupts with circuitpython. What should I do? 0:39:00 back to scrolling 0:43:35 Tak (sp) got USB working - 0:44:20 CP talking over USB! 0:46:33 tiny USB branch 0:48:32 committing ports/broadcom 0:49:00 oops - git reset hard :-( 0:50:12 EMMC2 mapping 0:52:00 needed more USB endpoints ( zero not adequate ) 0:53:18 ARM Cortex A cache chapter in DEN0024A_v8_architecture_PG.pdf 0:57:20 Other sharing of cache ( CPU, GPU, USB, frame buffer, etc ) 1:00:40 time.monotonic / No long integer support 1:02:00 def t() to test cpu performance based on time monotonic 1:03:20 storage not working yet - need to copy/paste from terminal 1:04:10 Instruction vs. Data caching, Flash / RAM 1:04:55 Need to split up RAM into a ‘flash’ area of RAM and a separate ‘RAM area 1:05:57 link.ld memory SECTIONS map 1:07:00 copy stuff from common.template.ld READONLY 1.5M, NORMAL 1022M 1:22:11 recompile and test … 1:26:46 it still works 1:28:00 set up the MAIR register ( and mmu.h ) 1:32:00 see page 3563 ( of 8696 ) of DDIO487G_b_armv8_arm.pdf 1:34:10 mmu.c setup_mmu_flat_map() 1:45:00 add MM_DESCRIPTOR_OUTER_SHAREABLE and INNER to mmu.h and mmu.c 1:48:30 look at all those bits in SCTLR_EL2 1:51:00 set “I” bit 12, and “C” bit 1:52:00 summarizing current status 1:54:50 Is the plan to have the raspberry pi show up as a mass storage device like other cp boards? 1:56:30 recompile, and try “something” out 1:57:00 As I understand it, that's the reason for using the P4 (or Pi Zero), as they support setting a USB port to a mode...the USB-C port on the Pi4, the 2nd port on the Zero 1:57:40 Interesting I'm excited to see what Circuit python can do on a pi board. I was curious how well they would behave as a mass storage drive since they're much closer to being a full fledged pc than other cp devices. 1:57:50 Doesn’t look like it worked - ( getting the rainbow test pattern ) 1:59:06 try just the instruction cache? 2:01:40 obviously we have some more optimizations to do, including the TLB 2:02:20 How is the storage etc working now? do you have an emmc model and use the usbboot thing to copy it over? Or? 2:02:40 ​Is it still recommended for beginners to start with CircuitPython6? I've been finding some of the sensor examples provided don't work with CircuitPython7, as the calls/functions/etc have changed. 2:03:40 So big question...if I submit a PR that allows booty.py as code.py alternative if in Pirate language mode, will it be accepted? 2:04:10 eMMC and SDcard would behave the same, nothing to do there technically 2:05:00 Related question, is it possible for the community to offer pull requests to update those examples? Would that be best done on the particular sensors Github page? Which then would filter to learn.ada 2:05:59 Sooo running CP from a MultiGB SD Card will just work on the RPI? 2:06:50 Wrap-up - remember the US daylight time zone change happening soon - still at 2PM local Follow along at https://github.com/tannewt/circuitpython/tree/rpi 2:09:30 pet the cat 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 Raspberry Pi 4

0:00 2:09:59

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 9 minutes long.

When was this Adafruit Industries episode published?

This episode was published on October 22, 2021.

What is this episode about?

Join Scott as he shows all of the CircuitPython on Raspberry Pi 4 progress! After, we dive deep into enabling caches to speed things up. Questions are welcome. Next week is on Friday. Support Adafruit, and by extension me, by purchasing hardware...

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!