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/

-----------------------------------------

Podden och tillhörande omslagsbild på den här sidan tillhör Adafruit Industries. Innehållet i podden är skapat av Adafruit Industries och inte av, eller tillsammans med, Poddtoppen.