Maybe there is a way to skip adding the badge to the pdf. It doesn't make much sense anyway.
#circuitpython-dev
1 messages ยท Page 86 of 1
I have no idea how Windows 7 allocates COM numbers. I doubt we have any influence over it.
One API comment. Looks great otherwise. Thanks!
Why make this public? I think it can just be static in tick.c.
oh no is there yet another uf2 performance bug on macs !? https://rasterweb.net/raster/2025/05/04/macos-finder-and-usb-flashing-format-uf2/
That it's public is a leftover from attempting to support sub-millisecond delays. Making it static...
@b-blake If you compile your own without CIRCUITPY_SDCARDIO then the second drive won't appear.
We need to be able to include pin_names.h more than once for it to work.
Broken by #9260. Fixes #9957
I see the Finder (or BBEdit) lock up on rare occasions, usually when something is going wrong with the board and I have to unplug it to recover. I believe I also have rare cases of renaming a file in the Finder leading to maybe some corruption (like the file disappears), leading me to erase_filesystem() some boards, as well as experimenting with remounting the drive rather than erase to solve it: https://gist.github.com/Neradoc/c1d0f74c0a3ee7d514d40d38686add7a
@tannewt (Scott),
You have wayyyy too much confidence in my abilities. The last time I compiled code was for the 6502 CPU. back in the 70s and 80s. My first programming experience was using Fortran in the mid 60s on the IBM 1620. (Not Fortran II, III, IV) I also learned Assembly on that machine. I had it compute e to 400 decimal places. It took hours!
Bruce
P.S. @bablokb, You too. ;-) Wayyyy too much confidence.
P.S.S.
It is the job of the programmer to make the user's life easy, no...
If anybody's having trouble with this, a possible workaround might be doing something about like this from a Makefile:
xattr -cr ${BUILD_DIR}; \
rsync -rcvO ${BUILD_DIR} /Volumes/CIRCUITPY; \
sync
That's the pattern I typically use for programming on macOS Sequoia (edit local files in BBEdit then run make from Terminal) and it's given me zero problems.
However, I don't tend to leave boards plugged in when I'm not actively working on code. So, if the issue is something that depends on the board staying plugged in for an extended time, maybe my rsync + sync method is irrelevant.
This makes the following functional changes:
- TilePaletteMapper now has
tilegridas an argument instead ofwidth, andheight - TileGrid now allows
pixel_shaderargument to be None or omitted. But_add_layer()now validates that it it isn't None before it can be added to a Group to be shown on the display. - TileGrid is refactored to have a
displayio_tilegrid_mark_tile_dirty()function that gets called byset_tile - TilePaletteMapper makes use of the new `displayio_tilegri...
Does anybody know where things ended up with refresh rates for Fruit Jam's DVI out? I just tried 10.0.0-alpha.4, and it booted with 640x480 @72Hz. That refresh rate is too high for my capture card to sync to, and my TV initially didn't like it. After a reset, the TV seemed okay. Is there any plan to use 640x480@60Hz?
also, if I try messing with microcontroller.cpu.frequency = ..., it breaks the timing for USB host mode, so I can't do that as a workaround.
FWIW, I got tripped up by this again on 10.0.0-alpha.4. I'm trying to do a Playground guide that uses USB Host and DVI out. I'd like to use my HDMI capture card to take clean images for the guide. At the moment, the best I'll be able to do is photographing a fuzzy upscale off the TV.
After a fresh firmware install, the Fruit Jam boots to 640x480@72Hz (according to my TV). Sync with the TV is marginal (initially refused to sync, then did okay after a reset). Sync with my capture card doesn't...
Currently the builtin Terminal does not show any visual representation for the tab character. If you run print("\thello") in the REPL it will show the visible tab in the serial console in tio, but visually on the display there is nothing shown where the tab would be.
tio:
Display:
This poses a challenge for th...
I didn't end up changing it. You could try changing the cpu frequency before initing usb host
okay, thanks... I'll see if that works
Scott,
What are the usage cases for the "thumb Drive" SD card access by the PC?
Would the PC and the MCU both have simultaneous access to the SD card?
Bruce
Retested with CP 10.0.0-alpha.4, double fault after about 2 hours. Problem still there. ESP-IDF 5.4.1 did not resolve it. I didn't expect it to, but it was worth a try.
Moving on to test with patched longjmp.
I don't seem to be clever enough to find a way of setting microcontroller.cpu.frequency on fruit jam prior to usb host getting initialized. Seems like the port gets constructed in board_init() and any subsequent calls to usb_host.Port() just return that singleton? Am I missing something?
I think you'd need to edit board_init().
P.S. @bablokb, You too. ;-) Wayyyy too much confidence.
Why? There is no programming involved. When you google for "windows more than 26 drives" you will find a lot of instructions on how to do that. Given the fact that you setup so many devices I have a lot of confidence that you can read and follow those instructions. It is about Windows, so it is clicky-clicky and not programming.
This is just a pull to add the Waveshare RP2350 USB-A board (https://www.waveshare.com/wiki/RP2350-USB-A)
I have tested the USB host capabilities with the example from the adafruit usb host descriptors library and it appeared to work flawlessly. Onboard LED also appears to be working just fine straight out of the box.
Sorry, haven't done many pull requests in my time, so I'm a little nervous I've forgotten something
Just noticed the duplicate usb vid/pid, and waveshare don't appear to have submitted it to rpi yet. Just submitted a ticket to waveshare to hopefully get that submitted so that bit can be fixed.
Agree, a critical feature for real consumer applications. Please let me know if there is any progress on this. It would be great to be able to download both Circuitpython and user code over HTTPS and flash in smaller chunks, using Dualbank.
Same root cause as #10002: Missing linker fragment esp32c3.rom.eco3_bt_funcs.ld.
Add missing linker fragment esp32c3.rom.eco3_bt_funcs.ld to resolve early crashes and boot loops on boards with ESP32-C3.
Resolves issues #10016 and #10002.
Tested on espressif_esp32c3_devkitm_1_n4 with:
CIRCUITPY_LEGACY_4MB_FLASH_LAYOUT = 0
CIRCUITPY_BLEIO_NATIVE =1
Also tested with DEBUG=1.
Resolves: #10314
Temporarily remove the weblate badge from the readme file before building latex versions of docs and replace the original readme afterward.
I've made this against main, I'm not sure if it needs to be made for 9.2.x, maybe not if the PDF gets created at release time and then cached somewhere. I'm not certain where all this PDF ends up or when the published ones gets generated. If it gets regenerated in-between releases then we may want to have the same fix for 9.2.x...
@lone axle It's almost as if you read my mind ๐
After 14 hours, no failure with the patched longjmp. I'm going to let it run for another 24 hours to be certain, then push the PR.
@lone axle If you like, I can review 10322.
Yeah that would be great, thank you. I think my change falls in line with Scott's proposal in the issue, and it'll be nice to get it in if we can so that PRs can stop failing. I can always make further tweaks later on if/when Scott or Dan have a chance to look and think there are better ways to handle.
Changes look good to me. All the tests built so seems it worked.
Now you're reading gamblor's mind! ๐
I'm getting good at hitting that big green button ๐
Haha my work laptop is updating so I had a few moments to read it. Figured this was important to get in
would you be open to a PR that added a settings.toml setting to put a conditional around the usb_host init call in board_init()?
no, I don't think many people would need it. Just build it yourself
eh, not worth it then. thanks. I'll just make do with how things are now.
@slender iron I've gone through the 10.0.0 milestone issues and selected these to work on: 9171, 9491, 10153, 9381, 9992, 10197, and 10224. That should keep me busy for a few beats. If you have any others that you'd like me to work on, please let me know.
your capture card is the only one I have heard of that doesn't work
do you have something to measure sleep current with? don't do sleep related things until you do
nordic ppk2 is my goto
I have a PPK II on hand, so it looks like I made the right choice!
Do you have Zephyr support? We're looking to use Zephyr for new platforms.
Otherwise, I'm happy to guide someone on adding support.
Scott,
What are the usage cases for the "thumb Drive" SD card access by the PC? Would the PC and the MCU both have simultaneous access to the SD card?
Bruce
The idea is that CP can save to the SD card and then the host can read it. We can also now switch it the other way so the host can load assets onto the SD card for CP to read.
I think terminal could expand it out into spaces. See https://github.com/adafruit/circuitpython/blob/d142b5453fa1b6c2f131e6411aba76d025a84ae5/shared-module/terminalio/Terminal.c#L227 for related code.
We wouldn't need this if TPM could be constructed without a TG.
I understand there is a circularity to this that needs to be broken. I'd do it the other way so TG always has a pixel_shader. Allow TPM to be constructed without allocating the mapping memory and "bind" the two when the TG is created. This can also check that multiple TG aren't given the TPM. (Or it could track multiple TG to mark dirty.)
I wonder if it makes more sense to reverse this and make TPM not take width, height or tilegrid. That way you could create the TPM and pass it to a TG. The TG can then init it. That makes it fit better within the pixel_shader model I think.
I noticed that this change is showing some edits to the .pot file that I did not knowingly make. I ran pre-commit locally and it seems to have made some of those changes even though they appear unrelated to TileGrid or TilePaletteMapper. I'm not sure if that is a git or update / merge issue or something else. Let me know if I need to do anything further in that file though.
It looks fine to me. I'm not sure why Weblate didn't do it but it seems to be active. Updating these here is fine.
Resolves: #10319
We could maybe use -> if we wanted to try to mimic the little arrows that some IDEs use to show tabs.
I have only done very basic testing with the REPL reproducer from the issue so far.
With this change:
without this change:
It still differs visually from my tio showing the s...
Scott,
How about a third option where nobody can write/read it and it goes away? I know I am being a bit flippant, but...
Will it be switchable real time from within CP. e.g. Red LED, write by CP. Green LED, write by PC. Red or Green read by both.
I assume a status can be tested for completion of any write before code.py flips the LED colors. (Two LEDs, Bi/Tri color LED, or NeoPixel)
Default or boot.py or code.py option.
SD_Card = 0: No write/read Drive gone. Default and availa...
Tested with current tip of main (10.0.0-alpha.4-5-g07ec0c6d09). Works correctly. Test code serves webpage. No panic.
Did not test but change looks good. Four spaces seems pretty standard for a tab in many places so I like the idea.
This fixes RISC-V ESP32 because it ignored registers on that architecture.
The latest commit swaps this over to how you describe. pixel_shader is required for TileGrid as it was originally. TPM no longer accepts width, height, or tilegrid. The new internal bind function links a TPM to a TileGrid and is called when the TileGrid is created with a TPM pixel_shader, or has its pixel_shader set to a TPM.
Tested successfully on fruitjam with the circuitpython matrix code, and the latest version of text editor updated to use the new API.
This sounds very promising. Can you think of an obvious reason this occurs only with HTTPS, or could it just be a fluke that we haven't observed it with HTTP yet? I'll set up to test a few variations this weekend.
Can you think of an obvious reason this occurs only with HTTPS, or could it just be a fluke that we haven't observed it with HTTP yet?
This happens with HTTP, too. The test case I've been working with is a simple HTTP server from #9428. The root cause isn't a networking issue at all, which is kind of surprising. Instead, it's due to the socket polling loop using NLR (Non-Local Return) for every iteration that eventually corrupts the Xtensa windowing registers. In its implementation, NLR us...
@anecdata It's been more than 24 hours, and the test is still running without failure. If it's still running tomorrow morning, I'll push the PR. Besides this issue, this will fix #9428. It is also likely to fix #9003 and #9460. There may be others as well.
Hi, I've got a situation on Pico W where c5c7d11 causes PulseIn to miss input in elaborate circumstances that include "only happens when on wifi", and is only noticeably affecting one type of IR sensor and not a slightly different one. Any ideas where I'd go from here?
Also I wasn't paying attention and did make fetch-all-submodules which takes up several gigabytes, so is there an easy way to undo that or would I just need to delete the clone and make it again?
Also, where can I find the detailed breakdown of RAM and flash usage for the build that I vaguely remember seeing somewhere?
My PR was merged, woohoo: https://github.com/adafruit/circuitpython/pull/10309
Cool experience contributing and having my updates usable for all!
In what stable release version will these changes be included in, and made available on the .UF2 download page (specifically for the PyBadge) (https://circuitpython.org/board/pybadge/)
GitHub
Added an end method to the MixerVoice class within the auidomixer library.
Calling this method will set the object's loop flag to False. This is different than the stop method, which ends t...
The Adafruit PyBadge an all-in-one compact dev board programmable in CircuitPython. Full of features squeezed onto a 3 3โ8 ร 2 1โ8 inch rounded credit card sized rectangle. Itโs a perfect wearable badge, but can be used for many projects.The PyBadge is powered by our favorite microcontroller, the...
Congrats! ๐ Thanks for your contribution! It will be in an alpha release before it makes it into a stable one. The current alpha release is 10.0.0-alpha.4 so it will be in the next one 10.0.0-alpha.5The first stable release that it will be in should be 10.0.0 whenever that is released.
Congrats, I like the idea of what you added and wondering if we should add it to more audio parts. Though MixerVoice usually ends up being the "final" step in the chain so good place to have it.
firmware.elf.map in the build directory will show all sections.
Easiest to start again
How did you get down to that commit? It looks like it should just use DMA earlier. Not sure why it'd fail any more than not using dma.
CircuitPython has support for a single COM serial port.
On the Pico, the only way I see to get it is to sacrifice the console:
boot.py
import usb_cdc
usb_cdc.enable(console=False, data=True) # Disable console, enable data
That's a very awkward solution because programming MicroPython without a console is too hard.
Somewhere the documentation says that there are difficulties in this area with some devices, without giving specifics.
So I don't even know which device to buy to get the re...
You could create an UART and attach an UART-to-USB cable. This will allow to send data and still use the REPL on the USB- console.
You could create an UART and attach an UART-to-USB cable. This will allow to send data and still use the REPL on the USB- console.
Thanks. That's a fairly good idea. I think I could even use a native serial port. But I want the USB serial data port single cable solution.
But I don't understand what your issue is, you intentionally disable the console to reduce the number of com ports ?
But you also want the console at the same time ?
This is supported on RP2040:
import usb_cdc
usb_cdc.enable(console=True, data=True)
The ESP32 S2 and S3 for example (and some other ports) don't have enough USB endpoints to support the drive, HID and 2 serials at the same time, that's why there is that warning.
I don't understand what your issue is, you intentionally disable the console to reduce the number of com ports ? But you also want the console at the same time ?
This is supported on RP2040:
import usb_cdc
usb_cdc.enable(console=True, data=True)
Not intentionally. Not my choice. While it MAY be supported as you write on some RP2040 devices which I don't know what they are, it is not supported on the Pico. I cannot see a single piece of evidence on the web hat shows how it wo...
We've put a lot of work into BLE on the nRF52840 and recommend folks using it. Supporting the Pico W isn't a high priority for us (but we're happy to guide and review if someone else wants to take it on.)
Originally posted by @tannewt in #7693
it is not supported on the Pico
Yes it is, on EVERY raspberry pi board, since this is unrelated to the board, only to the chip's USB support.
It's true that the use of usb_cdc kind of lacks a dedicated guide. See this learn guide though:
https://learn.adafruit.com/customizing-usb-devices-in-circuitpython/circuitpy-midi-serial#usb-serial-console-repl-and-data-3096590
This is a guide that uses usb_cdc.data for "Remote Procedure Calls" from a Macropad to a host:
https://learn.adafruit.com/ma...
This PR resolves issues where Espressif parts with Xtensa cores would crash intermittently, typically while idling with socket polling taking place. Crashes were most often double-faults or WDT timeouts. The root cause of the crashes was use of a version of longjmp in ROM that exposed a window of about 6 instructions that manipulated register windowing control registers. If an interrupt occurred inside this window, a register windowing control register could become corrupted due to interact...
@anecdata The test is still going strong after 36+ hours. The build artifacts are in PR #10328.
@eightycc Sounds great! I'm tied up much of today, but will run it later.
Did not have time to test but the code changes look good to me. Great job tracking this down, interrupts during critical sections are never fun to debug.
I observed that it works reliably in 8.2.8 and 9.0.0-alpha.5, and doesn't work reliably in 8.2.9 and 9.0.0-alpha.6, and then I built a 9.2.7 with that line reverted to const size_t dma_min_size_threshold = 32 and the problem was resolved
We didn't notice the issue until recently because it hadn't been tested with the affected sensor on wifi, only with the unaffected sensor on wifi and the affected sensor not on wifi
We're talking about non-modulated IR with pulses a few microseconds long
A few more changes in the latest commit:
- fix the
pixel_shaderproperty name which was previouslypalette. I'm guessing that was something I originally intended to change when ColorConverter support was added, but didn't do at the time. - Add
tilegridproperty to the locals table - Set
tilegridtoNonewhen the TPM is constructed - disallow TPM to be bound if its TileGrid isn't
Nonestill i.e. TPM can only be bound to a single tilegrid one time, a new one would have to get...
Yes it is [supported], on EVERY raspberry pi board, since this is unrelated to the board, only to the chip's USB support.
Not on the Pico.
If I do in boot.py:
usb_cdc.enable(console=True, data=True)
and nothing else
then I lock myself out of the console and I don't even see safe mode. The CIRCUITPY drive disappears and I have to nuke flash the board.
My request is about the Pico. The docs say it is supported but so far I haven't seen anyone report success with it.
How are you accessing the console? Are you selecting the correct COM port? When you enable the data CDC channel, there will be two COM ports on the pico, make sure your console is connecting to the right one.
The docs say it is supported but so far I haven't seen anyone report success with it.
I have done this before and it was fine. I don't believe you've specified your CircuitPython version in this report.
I wonder why socketpool listing here is so much more specific than the rest
I don't want separate controls for the SD card drive. However, I would like it to be omitted if you do storage.disable_usb_drive() If it doesn't, then let me know. That'll clean up all the drives you have from the multitude of CP devices you have connected.
When I do that, I usually have a button I can press on startup to make it appear. Safe mode can be used for that too.
Please don't make another issue. You clearly found the original on already.
As folks point out, it should work. What version of CircuitPython are you using? What host OS?
What is in your code.py?
Not sure if this is an actual issue that could be guarded against or just a neat way for the user(me) to be an idiot, but the following code causes a hard fault in CircuitPython.
Occurs when using .send() instead of .asyncio_send(). .asyncio_send() in the same code works just fine.
Hardware: Adafruit RP2040 RFM95 915Mhz
Code:
import board
import digitalio
from adafruit_rfm import rfm9x
import asyncio
class TestCode:
def __init__(self):
# Define radio frequency in MHz. M...
Looks good to me! One comment you may want to do in a follow up.
Is there a chance that someone will set the existing mapping again? Maybe we want to detect when nothing is actually changed and not mark the tile dirty then.
These changes improve direct USB host on RP2350 in particular.
The docs say it is supported but so far I haven't seen anyone report success with it.
I have done this before and it was fine. I don't believe you've specified your CircuitPython version in this report.
That is all I needed to hear. If you say that it worked for you with the Pico, then it must be my operating system. I tried the latest CP versions so that can't be the problem.
I will re-install Windows and then see whether I get 2 comm ports. I deleted the USB device multiple times...
Scott,
storage.disable_usb_drive would disable CIRCUITPY and the thumb drive. I guess I stay at 9.2.7.
You are looking for easy for you. I am looking for easy for me. We can't have both, and you are driving.
Adafruit CircuitPython 10.0.0-alpha.4-5-g07ec0c6d09 on 2025-05-08; Adafruit Metro ESP32S2 with ESP32S2
Attempted to reproduce using the Python program at the top of the issue. Using the various connection methods listed in the table, could not reproduce the problem. Dots appear on the serial console at a steady rate regardless of what I do with web workflow. Tried both file browser and full code editor.
It appears that ESP-IDF 5.4.1 resolved this issue.
To be thorough, I will test wi...
I would also prefer to be able to disable it separately from CIRCUITPY.
Could not reproduce the problem (using the method and program at the top of the issue) at 9.2.7, so went back to 9.2.4 and then to 9.0.3, and could not reproduce it. Thinking it might have something to do with tinyuf2, reverted that to 0.18.2, and still could not reproduce the problem. I've been testing on a Metro ESP32S2, the only S2 I have on hand. Next up is Neradoc's program and method.
Tesing using three pairs of QT Py boards, one of each pair running 10.0.0-alpha.4, the other running artifacts from this PR:
- (2) ESP32-S2 running HTTP server
- (2) ESP32-S2 running HTTPS server
- (2) ESP32-S3 running HTTPS server
Looks good so far. Each of the 10.0.0-alpha.4 boards has already encountered a safemode. None of the PR#10328 boards have had any issues. Approving, but will let it run for a few days and report if anything unexpected happens.
HTTPS Server code.py
`...
It already warned about it.
Fixes #9451
@mortal kernel I'm excited to get your stablity fixes out
I liked the register re-work you did in #10325. Just saw your review request, I'll get right on it. Any testing you'd like done?
Yes please. I'm just made sure it compiled. Not exactly sure how to test besides a smoke test.
Since I'm not sure exactly when pointers are only in registers
What I'll do for RISC-V is back out my fix and test. That should show that your change is working for RISC-V. For other targets, the best I can think of is a close reading of the code. So far in my reading I don't see anything that's unclear.
I'm willing to test in the wild in an alpha too. That's why I marked it ready to review
The factored out code for the cortex-m0 shuffles r8 through r13 through r1. Was this ever necessary?
This fixes an issue where a terminal can't be started after being stopped (when tilegrid_tiles is freed and set to NULL.)
Fixes #10241
Yes, the m0 only has limited thumb2 support. In thumb1, the store can only address registers r0-r7. M23 also does this apparently.
Are we sure that xthal_window_spill() will do what's needed on RISC-V? Unless you've already verified that it does, I'll disassemble the blob in the ROM.
NVM, on second pass I see what you're doing. If I understand correctly, you're replacing cpu_get_regs_and_sp() for RISC-V with the custom asm version in cpu_regs.S.
OK, I see you're using the cortex-m0 code for both cortex-m0 and cortex-m4. Now it makes sense.
Looks great! I'll approve and merge now.
I'll test the RISC-V case, but I'm confident your changes will work.
Perfect. Will merge once CI finishes.
Ooops! I meant to have a thumb2 version as well but I'm not sure what happened to it. I must have accidentally replaced it with the RISC-V version.
They have Group specific state so limit them to one group at a time.
Fixes #10226
It is there above the Thumb 1 version. I switched it to using stmia which can save multiple registers in a row from a single instruction.
Your last comment made me go back and look again. R12 is missing from the stmia register list, so that could be a problem. And this is just a nit: R13(SP) doesn't have to be saved, but doing so does no harm.
I don't think it needs to be:
A subroutine must preserve the contents of the registers r4-r8, r10, r11 and SP (and r9 in PCS variants that designate r9 as v6).
You're right, according to the ABI it's the intra-procedure-call scratch register.
Testing with an ESP32-C3, it's crashing in the interpreter again.
I have downloaded and installed a fresh copy of Windows 10 on the same computer. No other competing devices. See device manager screen shot.
When I plug in the Pico, then Windows installs the drivers and as before, I get only 1 COM port, This time is easier than before because there is no other hardware with competing serial ports over USB. From my perspective, the CircuitPython software exposes only one serial port.
On the CIRCUITPY drive I installed adafruit-circuitpython-raspberry_pi_pic...
@slender iron I'm close to done for the week. If you'd like, I can take up the interpreter crash on Monday. It's failing without backing out my change to parse_compile_execute.
It fails even with your change?
Yes, which is unexpected.
I'm done too. Next week is fine. No release with this code anyway
Have a great weekend! We've got the annual beer festival at the fair grounds I live next to. This year's theme is "The Great Lebrewski". I've got my bathrobe ready.
You too! Have a great time.
According our expectations, this should be seen as a bug because we seem to agree that 2 COM ports should be available.
Not quite. By default, you only get one USB CDC ("COM") port. This goes to the CircuitPython REPL.
If you want a second CDC port for non-REPL data transmission, then you must do:
import usb_cdc
usb_cdc.enable(console=True, data=True)
in boot.py and power-cycle / hard reset the board to re-execute boot.py.
The [default usb_cdc setting](https://docs.circuitpy...
import usb_cdc
usb_cdc.enable(console=True, data=True)
You are right. This time it works. boot.py works as advertised. An additional port COM6 is created and the CIRCUITPY drive is still alive.
Many thanks.
FWIW: I have been preoccupied so haven't had a great deal of use with recent builds but since Web Workflow was released I've seen issues similar to those reported here. In my case they seem to come and go, a few times I came close to working up a repeatable recipe only for the problem to go away. I eventually wrote it off to WiFi strength issues as my office is on the edge of WiFi coverage for most of the micro controller boards. I've thrown 10.x on the two continually running WiFi boards and...
This adds support for the extra two optional I/O pins on the Frood Rev9 - D10 (GPIO10) and D11 (GPIO11).
Thanks for submitting a pull request to CircuitPython! Remove these instructions before submitting.
See https://learn.adafruit.com/contribute-to-circuitpython-with-git-and-github for detailed instructions.
- Consider whether to submit this PR against
mainor against (if it exists) the branch for the current stable release or an upcoming minor release. The branch will be namedi.j.x, for example,9.2.x. Bug fixes and minor enhancements can be submitted against the stable release b...
Not sure what I did wrong here?
https://github.com/adafruit/circuitpython/actions/runs/14946735028/job/41991019037
Could only glance, but did you run make translations and also commit the circuitpython.pot file?
I did not, as I can't find any instructions on what to run?
just make translations I think (or to that effect if you type make on its own it gives you the commands). Do that in the root directory.
make: *** No rule to make target `translations'. Stop.```
make translate
Sorry had the wrong command
After that locale/circuitpython.pot should be updated and is required.
I'm not sure if you have the local pre-commit scripts running, they can flag this as well (for the future)
Lol. Found a bug in the Makefile as well, I don't have a "python" command on my system.
Ok, all checks have passed. Thanks!
Awesome! If you feel this issue is resolved, you can go ahead and close it. Thanks!
This PR makes these update to PR #10325:
- Fixes omission of
SAVED_REGISTER_COUNTcalculation for RISC-V builds that caused stack corruption ingc_collectand a crash. - Reverts PR #10301 which is obsoleted by PR #10325.
Tested on ESP32-C3.
@slender iron I couldn't resist, so I spent a few minutes on the RISC-V crash with #10325. It was quick and easy to fix, so I submitted a PR. I also verified that with #10325, #10301 is no longer needed, so I reverted it in the same PR #10337.
Changes look good to me. I think the Makefile fix is okay but will ask someone else to confirm before merging.
I think the
Makefilefix is okay but will ask someone else to confirm before merging.
@tannewt can you take a quick glance at the Makefile. 99% sure it was a bug wherepythonwas used instead of$(PYTHON)but want to ensure that there wasn't some reason I don't know.
@lone axle In case it's relevant to what you're doing with Fruit Jam input devices, I've started working on a USB configuration and HID report descriptor parser as part of a gamepad tester project. The configuration descriptor parser works pretty well, but I'm just getting started on the HID report side. My goal is to be able to distinguish between different types of gamepads, including those that use generic HID with different report structures (e.g. old style DInput vs. new Switch compatible). Link: https://github.com/samblenny/fruit-jam-gamepad-tester
this has nothing to do with us, you can manually set the COM port if desired here
https://learn.microsoft.com/en-us/answers/questions/452998/how-to-assign-static-com-port-number-to-a-device
probably a good idea to update to win 10 sometime soon
https://learn.microsoft.com/en-us/troubleshoot/windows-client/windows-7-eos-faq/windows-7-end-support-faq-general
I have upgraded Windows. It was overdue. All good now.
Thinking that a configuration difference between boards might be involved, I rebuilt CP 9.0.3 for the Metro ESP32S2 with these additional lines from unexpectedmaker_feathers2_neo added to its mpconfigboard.mk:
CIRCUITPY_BITBANG_NEOPIXEL = 1
# Include these Python libraries in firmware.
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel
I was still unable to reproduce the original issue. It's possible that the WiFi signal, as described by @RetiredWizard, may have bee...
I'm running the test code I posted above on a Feather ESP32-S2 on latest.
Adafruit CircuitPython 10.0.0-alpha.4-12-g99d4ea099a on 2025-05-10; Adafruit Feather ESP32S2 with ESP32S2
0:00:00 ok
0:00:05 ERROR
0:00:22 ERROR
And at this point the board disconnected from USB.
Testing it connected to power only:
0:00:00 ok
0:00:15 ERROR...
That looks quite nifty! thank you for sharing.
@mortal kernel heh I was running tests and adding to my post when you posted on the issue. Running alpha 4 on the Feather ESP32 S2, with this code:
import board
import time
import neopixel
import adafruit_dotstar
pixel = neopixel.NeoPixel(board.NEOPIXEL, 90)
pidots = adafruit_dotstar.DotStar(board.SCK, board.MISO, 90)
while True:
for color in [0x200020, 0x002020]:
pixel.fill(color)
pidots.fill(color)
time.sleep(0.5)
The board crashes within 15 seconds (never mind the ctrl-C issue I mention)
(wifi.radio.ap_info.rssi is -41)
I plan to do more on parsing the HID report descriptors, but not sure how deep into it I'll go. The descriptors supposedly describe the different possible HID reports and how the button bitfields, hat-switch controls (dpad), joystick analog values, etc. are laid out. From what I read, it sounds like the cheaper DInput protocol gamepads are really quirky with non-standard device-specific reports. Probably a lot easier to deal with Switch compatible controllers that are still HID but more standardized. (XInput is non-HID but it's also pretty easy to deal with)
@jaunty juniper It looks like we're seeing different behavior. The current tip of main has trouble due to #10325. If that's what you're testing with, that may be why your testing is failing while mine isn't.
maybe this functionality can move into https://github.com/adafruit/Adafruit_CircuitPython_USB_Host_Descriptors or else in a community bundle library. It would make it easier for people swap in different controllers to use with the projects that get published.
I restested with alpha 4 right now, I don't have a Metro to see if it's different
Interesting. I'm thinking there's a ROM difference between the Feather and the Metro. I'll re-open the issue and defer working on it until I've got a Feather on hand.
esptool could give the ROM version ?
Good suggestion, let me see...
I can get that
Detecting chip type... ESP32-S2
Chip is ESP32-S2FNR2 (revision v0.0)
(I did chip_id, which also results in Warning: ESP32-S2 has no Chip ID. Reading MAC instead.)
this does say to use chip_id to get the chip revision
https://docs.espressif.com/projects/esp-idf/en/stable/esp32s2/api-reference/system/chip_revision.html#backward-compatibility-with-bootloaders-built-by-older-esp-idf-versions
I'm having usb/serial problems. I'll need to reboot, back in a minute or two.
I'm back. esptool.py does not want to connect to the Metro. Maybe I need to somehow exit tinyuf2?
Thanks, that worked. Seeing the same info you were:
Warning: ESP32-S2 has no Chip ID. Reading MAC instead.
MAC: 60:55:f9:da:bb:f4
what about the revision ?
v0.0
well ๐คท
The chip's tin says it's ESP32-S2-WROVER, but no ECO number visible.
I wonder if the wifi network could affect it ๐คท
note that beyond the test code, I originally encountered the issue because I have a QTPY piloting 2 LED strips while running a server with a web page to change the animations and colors, and opening Discotool Manager would be enough to make it freeze. Discotool Manager scans MDNS for CP boards and does 3 or 4 requests to get the board info (to which I added some delays to try to mitigate the issue). So I would put the board in safe mode so I could edit the code without moving the board.
I now switched to a QTPY S3, since the issue is harder to reproduce there.
I also tried erasing the feather and putting the alpha 4 bin directly with the same result
(situations where 2 people see different results have been related to the version/presence of the bootloader in the past even if it seemed to make no sense)
I've tried tinyuf2 0.18.2, 0.21.0, and 0.30.0, all with the same results.
@Neradoc is able to reproduce the issue with 10.0.0-alpha.4 on slightly different hardware. I've re-opened the issue and will investigate further once I have hardware on hand that can reproduce the issue.
CircuitPython version and board name
Adafruit CircuitPython 9.2.6 on 2025-03-23; Raspberry Pi Pico 2 W with rp2350a
Code/REPL
import os
import wifi
import adafruit_connection_manager
import adafruit_requests
ssid = os.getenv("WIFI_SSID")
wifikey = os.getenv("WIFI_PASSWORD")
wifi.radio.connect(ssid, wifikey)
pool = adafruit_connection_manager.get_radio_socketpool(wifi.radio)
ssl_context = adafruit_connection_manager.get_radio_ssl_context(wifi.radio)
with o...
Hi, I've got a situation on Pico W where
<@&356864093652516868> The weekly meeting is set to occur here on discord at the usual time 11am US Pacific / 2pm US Eastern here on discord. That is about 1 hour and 15 minutes from now. Feel free to fill in your status updates and hug reports to the document ahead of time if you like https://docs.google.com/document/d/1SeffJXPObzSCRRPUpaYE8T5QIz8m8bc2UfMYpH9Rop0/edit?tab=t.0 we look forward to hearing from everyone.
Google Docs
CircuitPython Weekly Meeting for May 12, 2025 Welcome to the CircuitPython Weekly meeting notes! Feel free to add your Hug Reports and Status Updates before the meeting, alphabetically by your username. During the meeting, we go through them in order. If you canโt make the meeting and would stil...
Please try 10.0.0-alpha.4 as well and 9.2.7 in case those versions fixed this issue.
One more file to fully move over. Thanks!
There are two more spots in this file to change. That's why it is in circuitpython.pot still.
Thanks for the testing and fix!
Thanks Tim!
Thank you, Tim.
Thanks, foamyguy, for all that talking ๐
Thanks everyone, have a great week!
Here is the notes document for next Mondayโs CircuitPython Weekly Meeting. It is at the normal time of 11am Pacific / 2pm US Eastern here on Discord. Add your hug reports and status updates to the document before the meeting. If you are unable to attend but would still like to contribute, feel free to add your notes and weโll read them off during the meeting. Hope to see you there! <@&356864093652516868> https://docs.google.com/document/d/19MYKsKO3_4BN_Xw3mpOf1Tfc3urLAIPSewX-TWIro2E/edit?usp=sharing
Google Docs
CircuitPython Weekly Meeting for May 19, 2025 Welcome to the CircuitPython Weekly meeting notes! Feel free to add your Hug Reports and Status Updates before the meeting, alphabetically by your username. During the meeting, we go through them in order. If you canโt make the meeting and would stil...
The issue persists Pico 2 W on 9.2.7 (same result and error as 9.2.6).
On 10.0.0-alpha.4 on the Pico 2 W, requests.get() times out. I added some print statements to check how far it got (as it looked like it wouldn't return at all), but eventually it exits with ETIMEOUT. Revised test code (with print statements), as follows, along with 10.0.0-alpha.4 output:
import os
import wifi
import adafruit_connection_manager
import adafruit_requests
ssid = os.getenv("WIFI_SSID")
wifikey = os....
I think I'll do an alpha.5 after #10332 is in
Previous numbers were from S3 direct logs. Cloud front requests from S3 on cache miss only. The user agent was also cloud front instead of the actual requester. Cloud front logs have the actual user agent and we use it to filter out bot requests.
So, the old numbers (relatively) under counted popular boards and over counted boards that only bots cared about. These numbers should be truer to reality.
#10332 passed CI for whenever someone is ready to review
Changes look good to me. I think the Makefile fix is okay but will ask someone else to confirm before merging.
Ah, seems I used case sensitive search. Fixed.
Currently the user needs to run circuitpython_setboard in order to get usable stubs for the board module.
Have you considered making the default board/__init__.py contain the constants for all different boards, something like https://github.com/thonny/thonny/blob/master/thonny/plugins/circuitpython/typeshed/stdlib/board/__init__.pyi ?
IMO this would be more useful default.
It was discussed at the time when we implemented circuitpython_setboard but iirc we thought that it could lead to confusion and be more complex to support.
Having it be a comprehensive list means that it could list many pins and other properties that are not valid or relevant to the device the user has plugged in. Seeing things like board.I2C() and board.SPI() listed for raspberry Pi Pico and Pico2 could be very confusing for somehow who does not realize those device do not actually h...
Is this issue present in MicroPython upstream, or since they added a RISCV-specific nlr impl, did it go away? If the former, maybe worth opening an issue there to point it out to them.
Is this something to note for the MicroPython folks with an issue?
Is this issue present in MicroPython upstream? If so, maybe worth opening an issue there to point it out to them.
Good thought. I'll have a look.
Is this something to note for the MicroPython folks with an issue?
I'll look into it while I'm checking #10328.
@danh When you have time, I'd like you to help me sanity check a couple things re: RP2 IRQs. No hurry.
@dhalbert Because MicroPython links ESP-IDF using ESP-IDF's CMAKE (CircuityPython uses its own custom
Makefile), it automatically picks up the wrapper. Verified by building MicroPython and examiningmicropython.map.
Thanks for looking!
hi - I missed this. go ahead (@danh is in plain text and didn't ping me)
NP. I just finished eating a hummus, olive, tomato, marinated tofu sandwich on toasted sprouted wheat. Breakfast of Champions!
I've been working out how to implement #9992. First off, after reading through the SDK implementation of external interrupts, I think we want to use DMA_IRQ_0 on core 0 and DMA_IRQ_1 on core 1. The reason we need to keep these separated is that the SDK only supports a shared vector table, so the only way I can see to ensure routing these IRQs to the proper core is by splitting them up like this.
(This is essentially what we're doing now)
looking at some stuff...
So my impression from the above is that when you set up the handler, it's for the core that the setup routine was running on, and gets routed properly. I don't think you need to keep them separate. The underlying handlers take care of this, it appears?
though I see this: https://forums.raspberrypi.com/viewtopic.php?t=336613#p2014763
- Currently by default (we will add a #define option to address this) the same exception vector table is shared between the two cores. This is not usually a problem, as most people don't want to enable the same IRQ on both cores....
- ... the problem with enabling the IRQ on both cores, is that both cores will keep taking the IRQ until one of them has serviced it....
- ... this is one of the reasons for having multiple DMA IRQs, such that you can divvy the DMAs IRQs up between core1) Currently by default (we will add a #define option to address this) the same exception vector table is shared between the two cores. This is not usually a problem, as most people don't want to enable the same IRQ on both cores....
- ... the problem with enabling the IRQ on both cores, is that both cores will keep taking the IRQ until one of them has serviced it....
- ... this is one of the reasons for having multiple DMA IRQs, such that you can divvy the DMAs IRQs up between cores.s.
Your final reference agrees with my reading of the SDK code.
so you don't have to use separate irq's, since you can find out the current core, and only handle the IRQ if it's for you.
whether it's better I'm not sure. If a core gets an irq and says, that's not for me, it doesn't take a lot of time.
are we currently doing DMA on more than one core?
OK, but then would there be any utility to having the IRQ fire on both cores?
no, but that's just how it works?
Yes, RP2040 DVI, for example.
Not really, since each core has its own NVIC, it can mask off IRQ sources its not interested in.
well, I think my idea when writing the issue is that we could use a shared irq, and use the shared-irq API to take care of that. RIght now they are separate irq's because the code was written without considering that that API ws available. Basically I didn't want statically-allocated irq's, because we run out really fast
so maybe that's in line with your conclusion,
Agree we need to share. Just saying that we share IRQ_0 on core 0 and IRQ_1 on core 1. And that gets us to the next interesting topic, sharing an IRQ.
there is something in one of those links about "the SDK doesn't do x yet", but I can't find it now again (I was looking at dozens of forum threads)
this makes sense to me, then
but now the sharing issue...
Right. What it doesn't do is support a vector table per core.
First off, I see something in the current implementation that looks like a problem.
I guess it could demux that in software, but it doesn't do that yet? Is that what they were saying?
Less than that, it's completely, totally not there. If the control to turn it on is set, it will throw a pre-processor error.
Back to the current implementations. In isr_dma0, when a DMA_IRQ_0 comes in, it scans playing_audio, background_pio_read, and background_pio_write for DMA channels in use and calls everyone it finds indicating the DMA transfer is complete.
The called code doesn't check whether the DMA has actually finished. When concurrent DMA is in use, this could cause problems, like weird audio artifacts.
yeah, so I thought using the shared_handler mechanism would help us without having to put that code explicitly in the fixed handler (and we don't want to use the fixed handler)
Well, the problem there is that at the IRQ level, it's completely non-specific as to which of several sources might be causing the IRQ to get fired.
there isn't a register with the DMA control block address or whatever?
eh, so what good is a shared handler? I thought it could demux it
shared DMA IRQ use has to be serialized then, can't be parallel?
There is, but the NVIC knows nothing about it. When a shared IRQ comes in, all of the sharing clients get invoked in priority order. It's just a raw xxx(void) call, no context.
So, what I'm proposing is a layered approach.
We register a shared handler in audio_dma and another in rp2pio. Each of those handlers looks at the interrupt status bits in the DMA block along with whether an object is attached to its table (playing_audio, for example) and then calls when it needs to signal completion of a DMA transfer.
this makes sense, and I was just reading this post, which I think proposes exactly what you said https://forums.raspberrypi.com/viewtopic.php?p=2123216
Yes, that's the definition of shared handler - with shared handlers, all of the handlers will get called for each IRQ (from both sources), and the handlers have to check if it's "for them" and return quickly if not.
The overhead of doing this is small (a few instructions (the beginning of each handler should be to read a status register, check if the relevant bit is set, and if not return without doing anything), so for many purposes it's acceptable.
the whole thread is about exactly this
Yes, that's the essence of what I'm proposing. Clearly I'm not the first getting here.
great minds think alike
I have been to this particular rodeo a few times.
so yes, doing shared irq's forces such a mechanism. The current code was done at a time when there was so little being done with DMA IRQ's that only two seemed necessary. (Some lack of foresight, i guess).
The SDK API could help with this but doesn't, I guess.
I appreciate your careful thinking on this, and your experience
Going back to what we're currently doing, sorting out which DMA channel(s) is causing the IRQ could clear up some intermittent weirdness.
definitely, at the very least it would be clearer when one thing was starving out another. the whole "which is worse: flickering RGB matrix or glitchy audio" is kind of a use case thing, and I'm not sure we want to provide a choice on that right now (ideally the glitches are actually due to the kind of bug you suggested rather than just lack of memory bandwidth), but we don't know now, I think
I'm going to go ahead. I appreciate your help and expertise vetting this. Thank you!
not sure if I have expertise, but I always think "someone else has already had this problem, there must be a discussion" of it
Is this something to note for the MicroPython folks with an issue?
They factor out the register collection already here: https://github.com/micropython/micropython/tree/master/shared/runtime in gchelper.
They don't grab pointers out of floating point registers though. (I'm not sure how common it is for a compiler to do that though.)
Including @tylerdcooper for when he gets back.
There are some new ones I merged in recently, however I just need to add them manually. I will likely work on that as soon as I'm done with the guide I'm finishing up.
I'll also verify the sorting is working at the same time because the latest board has a date of July last year.
Closing this for now, due to the age. Note that https://github.com/micropython/micropython/pull/13000 is still open as well.
Closing this for now, as it appears to be stalled.
Ok, looks correct. The last PR Blinka boards were added was in https://github.com/adafruit/circuitpython-org/pull/1436.
is there a safe way to use load when debugging espressif with gdb? Seems to put my boards in a reset loop if I use it. I assume that has something to do with the bootloader.
The new automount feature of sdcardio added in https://github.com/adafruit/circuitpython/pull/10129 is great for devices which host an SD card connector directly on board. This feature is currently unavailable on devices which have an SD card added on via a breakout or some other daughter board. In my case, I am using a Raspberry Pi Pico 2W with a Camera PiCowbell.
I suggest that new constants be added to settings.toml to define the pins, SPI device, and other properties used by this fea...
are you loading it at the same offset as you would with esptool? And you're loading the equivalent of the .bin?
My esptool offset is 0x0 so I'm not sure what extra info I'd be including. It's the equivalent .elf file for the bin yes
Something might be borked with my whole setup though. GDB is giving me blatantly wrong information on variable values and it won't respect stepping over functions with n. My feeling is it probably originates from my pre-compiled microros library, which has been the source of a lot of frustration since it only seems to compile on linux and has limited information on how to compile with debug symbols.
I've never had any luck with gdb load with Espressif parts. Breakpoints and stepping are also problematic. This doc has some useful tips: https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-guides/jtag-debugging/tips-and-quirks.html. When your shell is in the ESP-IDF virtual environment (source esp-idf/export.sh) the toolchain that matches the version of ESP-IDF you're using, including gdb, is in your path. I've found that's the best one to use.
I am using the esp-idf gdb, particularly since it's xtensa-specific
What is Espressif chip you're targeting?
I'm on the esp32s3. I could maybe just use advice on my overall strategic approach. I've been trying to pin down why rclc_support_init in my microros port is returning a failure, which has been challenging since microros does not support human-readable logging. I pre-compile the library on ubuntu 24.04 and have gotten it to include debug symbols, but since GDB is not providing accurate variable prints and isn't stepping as expected, it hasn't been helpful in identifying the cause of the failure.
Can reproduce issue on Adafruit Feather ESP32C6. Investigating.
Really what I need to do is be able to break on various lines within the execution of the rclc init process and bisect to see where the error return value originates. But that's hard to do when I can't get it to correctly print what the return value actually is.
It's possible this originates from how I'm building the esp microros component, which is all in CMAKE and it's not entirely clear to me how they're enabling the debug flags in the first place.
The compiler flags you want are: -Og and -ggdb. The first is similar to -O2, but turns off some optimizations that can be confusing when debugging with gdb. The second turns on symbols, so it sounds like you're already doing that.
It sounds like the .elf file you're loading into gdb might not match the binary you're flashing into the 'S3.
I'm not familiar with microros, so I'm not going to be able to help much there.
Generally speaking, when all else fails I resort to an LED on a GPIO pin.
If the library is compiled with different debug flags than the final build, would that mess it up? The library has its own debug information
I'd typically go with a hardware logic analyzer kind of approach too but the precompiled nature of the esp-idf components is throwing me off.
I think I need to understand better how cmake deals with debug flags.
I don't think mixing flags for the various components of your final link would break debugging. I've been doing that with CircuitPython builds with no issues. Are you loading the .elf from the final link into gdb?
yes, it's xtensa-esp32s2-elf-gdb build-espressif_esp32s3_devkitc_1_n8r2_ros/firmware.elf
I'm seeing some sources say that register storage of variables can throw off what GDB returns?
Since this isn't CircuitPython development specific, we should move to another channel. #help-with-projects maybe?
It's for integration of an espressif component into circuitpython's build system, and Scott suggested I post here. That said, we can put it on pause until I research cmake's handling of debug flags more thoroughly. It's weird that I can't even grep for ggdb in the component, despite it building with the symbols I need.
That said, if it sounds like I'm doing anything terribly misguided and ought to take a different high level approach, I'd be open to feedback
I've been banging my head on this final init failure for over a month now
It can be a bear when the debugging tools require debugging. Factor in a multi-layered build process, and it can be a head-banger deluxe.
PR Summary
This PR resolves the deprecation warnings of the logger library:
DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead
@ionic elk my suggestion would be to get a setup where you can build microros in circuitpython directly. That way you can add ESP_LOG statements into its code. I exclusively debug ESPs with ESP_LOG
I don't really want to do this because it is up to code.py to set things up for things off the board. Setting up the sdcard there should still make it available to the host via USB though.
@tulip sleet we probably want this USB update PR in alpha 5: https://github.com/adafruit/circuitpython/pull/10331
๐ If you've tested it, I'll just approve.
nordic doesn't really deep sleep: it light-sleeps with low current draw. There was some logic that tried to be careful about determining the micrcontroller.cpu.reset_reason in such cases, but it didn't work when micrcontroller.reset() was called. This clears some saved state to make sure the reset reason is correct.
Found when helping @bradanlane with a BLE HID problem.
Tested on a CPB that this fix works, using the following test program, which was cobbled from @bradanlane's test...
ok, draft alpha.5 notes are saved
For the ESP32-C6, only pins GPIO0 through GPIO7 may be used for alarms. In low-power states, these are the only pins whose pads are powered. CircuitPython should be throwing a value error on the attempt to use GPIO20 as an alarm. From section 12.4 of "ESP32-C6 Technical Resource Manual":
Eight LP GPIO pins (GPIO0 โผ GPIO7): These pins are always powered up and are not affected by any low-power modes, which makes them suitable for working as wake-up sources when the chip is in low-power mode...
I will probably have to modify the component build process to achieve this, since it fetches the ROS source as part of the build process rather than including it in the module itself. But it may be worth trying.
Especially since I'm hearing that GDB has some unreliability with espressif
maybe I should have started out with the stm32 microros port huh ๐ฎโ๐จ
@tannewt I think that is my end goal here, to allow the second drive to be presented by the device to directly access the SD card. In my testing with 10.0.0-alpha.4, this hasn't been the case. Does the sd card configuration need to be defined within boot.py or has the implementation not been completed at this point?
CircuitPython version and board name
Circuitpython:
Version 9.2.7
Hardware:
1) Adafruit ESP32-S3 feather (4MB FLASH / 2MB PSRAM) + Adafruit Ethernet Featherwing
2) RP2040 PicoW + Adafruit Ethernet Featherwing (with minor modifications to the example code to address the differences between this platform and the ESP32-S3 platform)
Code/REPL
# Experiment with ethernet/ssl/tls and Circuitpython.
# Hardware: Adafruit ESP32-S3 4MB FLASH/2MB PSRAM + Adafruit Ether...
pystack default is getting increased in CP 10. For now, you could try in settings.toml:
CIRCUITPY_PYSTACK_SIZE=2048
@anecdata Thank you for this suggestion! That indeed resolves my problem and allows the get to successfully receive a response.
Force-pushed a commit to fix simmel build. Needed to guard when CIRCUITPY_ALARM was not set.
You must use native sdcardio for it to work I believe. What is your code.py?
Looks like I have a check to ensure it isn't heap allocated. Try removing the gc_nbytes() check:
https://github.com/adafruit/circuitpython/blob/bbefbd6ce4986f66f12c87350e1610e8bc1318aa/supervisor/shared/usb/usb_msc_flash.c#L143-L144
@slender iron I was thinking about how to stage the TinyUF2 no-OTA update, and also how to write it up in the guides. it seems to me that we could update the TinyUF2 version presented for S2/S3 in the web installer, etc., because I don't see any S2 or S3 board that has dualbank turned on. So 9.2.7 would work with the new no-OTA partition scheme. Originally I was wondering the installer shouldchoose the version of TinyUF2 based on CircuitPython, but I think that's not necessary. This also simplifies the guide updates. I wonder if I am missing something.
what boards do have dualbank?
8MB boards, and boards with CIRCUITPY_LEGACY_4MB_FLASH_LAYOUT set.
It likely still caches the source and you can modify it after
but none of the latter are S2, S3
I did test 9.2.7 is OK on various S3 boards, and that dualbank is off
Thach just submitted a new PR for S2 boards: https://github.com/adafruit/tinyuf2/pull/445
this is a follow-on to https://github.com/adafruit/tinyuf2/issues/432#issuecomment-2814042915
it looks like CIRCUITPY_LEGACY_4MB_FLASH_LAYOUT only ever applied to non-UF2 builds
yeah, I thought it was for S2 or S3, but apparently not. That's good. So it's a change for those plain ESP32 and C3 and C6 boards, but not terrible. I already made that change in my comprehensive draft PR. I have a Feather S3 only branch I could make into a PR too.
https://github.com/adafruit/circuitpython/pull/9222 turned off dualbank in 9.1 it looks like
@jedgarpark had some issues with a test build. However, my limited testing seems to be working well. I think it'd be worth getting this out in an alpha to get wider testing.
(I'm testing with the mouse demo from https://learn.adafruit.com/using-a-mouse-with-usb-host/circuitpython#.) @jedgarpark is testing with a version of larsio.
@slender iron do you want to do the alpha release or do you want me to do it tomw or whenever? Which unmerged PR's do you want to be in it?
I think it'd be good for it to have: 10331
you can do it. I'm off the clock
(trying the linker modification stuff via llm agent)
I saw the testing. We'll have to see about the larsio flakiness but maybe we can characterize that better for Thach to look at.
should only need to add a note about the usb changes to the release notes
and your nordic fix
I am also doing a PR for the Feather S3 4/2 board to use the new layout. WIll assign Limor to review it. We discussed in the meeting. That doesn't have to be in this release, but might make it easier to test.
- This is an interim PR to test the changes needed for #9533 and #10229 for a single board, the Adafruit Feather S3 4MB flash / 2MB PSRAM board.
Currently TinyUF2 Espressif-based boards most have two code partitions: ota_0 and ota_1, which are the same size, and were originally mean to allow over-the-air upgrades. However, the limited size made it not possible to enable BLE on S3 boards, and limited other features on S2 and S3 boards.
This PR combines the ota_0 and ota_1 partiti...
This is terrific! Happy to see it happening.
Hey folks - on my test jigs, I have a script that allows me to specify a CP version, and have it wget all of that version of CP for each of my boards, backup the old firmware, and set the downloaded firmware as the current one for flashing and testing...
Been working great for years - but now I'm blocked out from grabbing them...
HTTP request sent, awaiting response... 403 Forbidden
2025-05-15 15:18:04 ERROR 403: Forbidden.
Any idea what has changed? I've also tried curl but I also get forbidden.
Fill command for each board is:
wget \
--user-agent="Mozilla/5.0 (X11; Linux x86_64)" \
--header="Referer: https://circuitpython.org/board/unexpectedmaker_tinys3/" \
https://downloads.circuitpython.org/bin/unexpectedmaker_tinys3/en_US/adafruit-circuitpython-unexpectedmaker_tinys3-en_US-9.2.7.uf2
--2025-05-15 15:18:04-- https://downloads.circuitpython.org/bin/unexpectedmaker_tinys3/en_US/adafruit-circuitpython-unexpectedmaker_tinys3-en_US-9.2.7.uf2
Resolving downloads.circuitpython.org (downloads.circuitpython.org)... 18.65.11.76, 18.65.11.190, 18.65.11.59, ...
Connecting to downloads.circuitpython.org (downloads.circuitpython.org)|18.65.11.76|:443... connected.
HTTP request sent, awaiting response... 403 Forbidden
2025-05-15 15:18:04 ERROR 403: Forbidden.
I run this script on up to 5 different jigs and it allows me to keep all CP versions current, but also switch to older ones easily for testing/comparisons.
CircuitPython version and board name
Adafruit CircuitPython 10.0.0-alpha.4-19-gd52beb2e33-dirty on 2025-05-14; Adafruit Circuit Playground Bluefruit with nRF52840
Also tested with 9.2.7
Code/REPL
# Bluefruit Bluetooth Presentation Remote
# Bradรกn Lane STUDIO (c) 2025
# based on SPDX-FileCopyrightText
# 2020 John Park for Adafruit Industries
# License: MIT
"""
This example acts as a BLE HID keyboard to be used as a presentation remote
uses the Adafruit Circ...
I am also getting this problem with wget. It fetches OK in the browser. I saw a similar issue with circfirm yesterday. I'll report it.
Ahh, ok, I'm glad it's not just a decision to block wget/curl access, thanks for letting me know Dan ๐
I just reported it, thanks for this. I thought I had some local problem. It's probably a CloudFront misconfiguration.
I got it to work for now by altering the user agent, e.g.
wget --user-agent "Mozilla/5.0 (X11; Linux i686; rv:10.0) Gecko/20100101 Firefox/10.0" https://downloads.circuitpython.org/bin/unexpectedmaker_tinys3/en_US/adafruit-circuitpython-unexpectedmaker_tinys3-en_US-9.2.7.uf2
--2025-05-15 07:50:42-- https://downloads.circuitpython.org/bin/unexpectedmaker_tinys3/en_US/adafruit-circuitpython-unexpectedmaker_tinys3-en_US-9.2.7.uf2
just some random Firefox user agent I plucked off an explanatory webpage
I don't see mention of audiopwmio for ESP32 in the issues, has there been any discussion on that ?
It could be a long-term issue for tag:espressif. I think it is just an oversight that there isn't such an issue. But with audiobusio and and audioio (latter not great), maybe not such high priority. But it might not be that hard to implement.
If there is zephyr support for pwm audio, maybe we'd just wait for that.
I see the query in #help-with-circuitpython . Could use audiobusio with more pins
yeah the Qualia S3 doesn't have easy audio out
This user agent works:
Mozilla/5.0 (X11; Linux x86_64; rv:10.0)
This does not:
Mozilla/5.0 (X11; Linux x86_64)
I didn't see an existing issue, or mention of that, so there it is.
There is no analog out on S3, so it might be particularly interesting for that.
I noticed that my translations are added using my "@bergdahl" Github account, which is my business account. Not sure how this works, but I want it to be my "@cobalt grail" account instead as I am nearing retirement and will eventually close down the business.
How do I change this?
I think this has to do with how you are logged into weblate.
Summary
This small PR resolves the datetime library warnings:
DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(timestamp, datetime.UTC).
You must use native sdcardio for it to work I believe. What is your
code.py?
Here's a stripped down example from my program which is just a basic sd card mounting procedure with card detect:
import board, digitalio, os, storage, time
from busio import SPI
from sdcardio import SDCard
led = digitalio.DigitalInOut(board.LED)
led.direction = digitalio.Direction.OUTPUT
sd_detect = digitalio.DigitalInOut(board.GP15)
sd_detect.direction = digitalio.Direction.INPUT
sd_detect.pull...
Thanks! Making one change that pre-commit wanted.
pre-commit wanted a formatting change
int(os.environ["SOURCE_DATE_EPOCH"]), datetime.timezone.utc
@tannewt Huzzah! Removing the gc_nbytes(sdcard) == 0 does in fact fix the situation and works for both examples even with removal and re-insertion. Awesome!
Disregard my initial settings.toml request. This is exactly what I was hoping for.
I'll make a quick PR for it and tie this issue to it to close as soon as it is merged. Thanks!
Fixes #10342
SD cards where previously not populating into the second drive. This change fixes that issue and presents the drive as intended by removing the gc_nbytes(...) check on sdcard during LUN mapping.
@tannewt for interest
adding adafruit sparkle motion stick (https://www.adafruit.com/product/6332)
creation ID PR is here: https://github.com/adafruit/adafruit-creations/pull/9
Yes, that is the strange thing. I can't find anything in my profile that is Github related.
Checked against the schematic: looks good! Thanks -- I'll merge after the build completes successfully.
Since this is freeing up flash space, it could be a good time to change optimization flags for Espressif RISC-V builds from -Os to -O2 and turn -DDEBUG on again for debug builds:
https://github.com/adafruit/circuitpython/blob/b0ebbb115b95829cf3ec0e8bce6043233a6b916e/ports/espressif/Makefile#L168-L189
When you set up your weblate account, did you use the option to authenticate using GitHub?
also look here: https://hosted.weblate.org/accounts/profile/#account
maybe it's the email associated with the commits ? I just noticed weblate used my weblate email which is why it didn't credit me with my github account when I used it. I can change it to my githtub email
(you might need to add your other github email to your weblate account with the "Verify new email address")
This is now fixed, and you should be able to use your original user agents. We were interested in blocking bot fetches, but it was not fine-grained enough.
I did not. But the email address I used is the one I use for the "bergdahl" github.
Will try to change the email adress.
Automated website update for release 10.0.0-alpha.5 by Blinka.
New boards:
- adafruit_sparkle_motion_stick
Thanks heaps Dan for following this up. Time to update all of my TestJigs to CP 9.2.7 !
Pico W, trying to change from building 9 to 8, changed the compiler to 10-2020-q4-major, did make fetch-port-submodules, rebuilt mpy-cross, did make clean, and I'm getting this error when trying to build. Have I missed something?
In file included from /home/xubuntu/circuitpython/ports/raspberrypi/sdk/tools/pioasm/pio_disassembler.cpp:10:
/home/xubuntu/circuitpython/ports/raspberrypi/sdk/tools/pioasm/pio_disassembler.h:16:25: error: โuint16_tโ was not declared in this scope
you may need to back up the version of pioasm, for some reason, not sure to what
what is your goal for doing an 8.x.x build, if I may ask?
Still trying to track down my problem here https://discord.com/channels/327254708534116352/1370201051336019968
also do git status to see if any submodules are skewed
There are various untracked libs
I have this alias for getting the submodules at the right commits:
alias gitsubupdate='git submodule sync --quiet --recursive && git submodule update --init --filter=blob:none'
Ah I thought the other command was supposed to do it
and if you see that various submodules are "modified', you need to inside them and run that as well
no, it just fetches, it doesn't correct. You could do make remove-all-submodules at the top level and then do the fetch-port-submodules. Another thing to do is just to clone your fork again, with a different name, so you have a fresh start. Then you don't lose context on main or whateger.
https://blog.adafruit.com/2025/05/15/circuitpython-10-0-0-alpha-5-released/
Highlights:
- Add stability fixes for Espressif port builds.
- Add fixes for direct connecting USB devices to PIO USB host.
- Improve accuracy of
time.sleep()and similar functions. - Add
MixerVoice.end(). - Change partition layout for Adafruit Feather ESP32-S3 4MB Flash 2MB PSRAM board, allowing BLE and other features to be enabled.
Looks like the alias fetches everything? So need to do one of these instead if I only want the one port?
it updates everything. You don't need it if you did make fetch-port-submodules on a fresh clone
Looked like it was fetching modules I didn't have yet but maybe I was mistaken
not sure; I think it should not fetch modules that were not inited at all
remove-all-submodules and fetch-port-submodules hasn't helped
you mean you still have the uint16_t error?
Yes
is this on a fresh clone?
No, might have to do that then
i am just trying it on a fresh clone myself
ok, this might be due to the wrong compiler being used. What does arm-none-eabi-gcc --version print?
arm-none-eabi-gcc (GNU Arm Embedded Toolchain 10-2020-q4-major) 10.2.1 20201103 (release)
an easy fix seems to be to go into ports/raspberrypi/sdk and there do git checkout 1.5.1.
at that point I was able to use gcc 13.2 and the picow build built
no wrong, still some issue
This adds 16 new Blinka boards putting us at 162. This also updates the U2IF boards to clarify how they are running.
I don't have gcc10 available right now, need to download it
I think it's the one the instructions told me to download for circuitpython 8
that is right. I think there is something odd going on with cmake, though. In the output I see -- The C compiler identification is GNU 13.3.0
so it's using a newer /usr/bin/gcc to build pioasm, and that's what's complaining (it's not something in the circuitpython tree). so you might need to roll back the system-installed gcc as well to get it to compile. This is going to be a rathole.
CircuitPython 8.2.7 was released Oct 2023, so it was being build on Ubuntu 22.04 more or less, using whatever the standard /usr/bin/gcc was at the time.
pico-sdk 1.5.1 helps a lot, but there are further issues about warnings, which I wasn't able to work around
could maybe disable the warnings-as-errors flag; I didn't try that
Hmm I've got an older VM I can try
@danh This may or may not be a bug, what do you think? Unless deep sleep is entered from code.py or friends in run_code_py deep sleep never happens. For example, executing alarm_io1.py from the REPL by typing import alarm_io1 will not enter deep sleep.
alarm_io1.py:
import board
import alarm
import microcontroller
import digitalio
LED_PIN = microcontroller.pin.GPIO15
led = digitalio.DigitalInOut(LED_PIN)
led.direction = digitalio.Direction.OUTPUT
led.value = True
pin_alarm = alarm.pin.PinAlarm(pin=board.IO1, value=False, pull=False)
alarm.exit_and_deep_sleep_until_alarms(pin_alarm)
that sounds like a bug, but just to be sure, are you running disconnected from USB, since that will be fake deep sleep?
[hit tab after typing @danh otherwise it does not complete into a username]
Not sure what you mean by "running disconnected from USB"? In this case, it's an ESP32-C6, so it doesn't have a USB MSC endpoint.
From my reading of the code, the reason that code run from REPL doesn't enter deep sleep is that both pyexec_friendly_repl and pyexec_raw_repl don't break out of their process loops on a PYEXEC_DEEP_SLEEP.
I remember that it didn't work from REPL, but it didn't seem important at the time, since at that time there were no non-USB boards, so it was going to be fake deep sleep anyway. If you can fix that's fine, but it's not high priority.
Thanks, confirmed it builds on ubuntu 22
ok, whew ๐
Yes, probably not important. I've been chasing #10224 and since I was testing with the import blah.py method from REPL it looked like the root cause for a bit. I've learned how deep sleep works in the process, so it was worth it.
i don't remember why I did the exception thing to initiate deep sleep, but it was the easiest at the time
It makes sense. Kind of like NLR. Trying to pass a result up from down deep can be, well, problematic.
But I thought I was building dd9ecc8 and os.uname().version says it's 9072fe6
what does git log -1 say?
It does indeed say the latter
did you checkout 8.2.7 or whatever you wanted to start with? are you going to do a bisect?
I did check it out but at some point it seems to have decided to checkout main again for some reason
is it because you started working in a new clone?
It was after that. But I'm also pretty sure this board has v8 mpy on it and it's working
Confirmed it does
it should build what is checked out -- there's nothing that would alter the current commit
make sure you do a clean build
git checkout dd9ecc81
cd ../..
make remove-all-submodules
cd ports/raspberrypi/
make fetch-port-submodules
cd ../..
make -C mpy-cross
cd ports/raspberrypi/
make clean BOARD=raspberry_pi_pico_w
make BOARD=raspberry_pi_pico_w
And after this, main is checked out, and I have a build that says it's main but appears to be a v8
i don't understand what you mean by "And after this, main is checked out"
Git status now says it's on main, rather than detached head at dd9ecc81
I don't see that problem locally
My VM just crashed, probably something wrong with it
i just did the above except with an atmel-samd build (to avoid the build issues you saw), and didn't see any change in the checkout.
off to bed, good night!
Good night
good night and good luck
I thought disk might be full again but it's not
Worked that time
oh wow, someone translated the SAM speech synth to plain micropython! https://github.com/jacklinquan/micropython-samtts
The provided example is attempting deep sleep on GPIO20, a pin that is not supported for that purpose on the ESP32-C6. Attempting to use an unsupported pin on an Adafruit Feather ESP32C6 correctly results in a Value Error like this code.py:
import board
import alarm
import microcontroller
import digitalio
import time
LED_PIN = microcontroller.pin.GPIO15
led = digitalio.DigitalInOut(LED_PIN)
led.direction = digitalio.Direction.OUTPUT
led.value = True
time.sleep(10)
pin_alarm = ...
Attempting deep sleep from REPL by alarm.exit_and_deep_sleep_until_alarms exits immediately without sleeping. This is because the REPL implementation does not exit its process loop when a PYEXEC_DEEP_SLEEP is thrown.
This should be fixed or documented as a limitation.
I think this is documented, even in bold, see https://docs.circuitpython.org/en/latest/shared-bindings/alarm/index.html
I think this is documented, even in bold, see https://docs.circuitpython.org/en/latest/shared-bindings/alarm/index.html
I'm not seeing it, or I'm misunderstanding the text.
I think @bablokb is referring to:
If CircuitPython is connected to a host computer, the connection will be maintained, and the microcontroller may not actually go into a light sleep.
which is about a different but related thing.
BNO055 operation is greatly improved starting with ESP-IDF 5.3.2 (CircuitPython 9.2.2) and later, without needing this workaround. BNO085 is still very flaky. Closing as investigated.
Further down under exit_and_deep_sleep_until_alarms is:
If CircuitPython is connected to a host computer via USB or BLE the first time a deep sleep is requested, the connection will be maintained and the system will not go into deep sleep.
(But TIL:
If CircuitPython goes into a true deep sleep, and USB or BLE is reconnected, the next deep sleep will still be a true deep sleep. You must do a hard reset or power-cycle to exit a true deep sleep loop.
)
import board
import time
import alarm
import time
import digitalio
import microcontroller
LED_PIN = microcontroller.pin.GPIO15
led = digitalio.DigitalInOut(LED_PIN)
m_d8 = microcontroller.pin.GPIO19
m_d9 = microcontroller.pin.GPIO20
led.direction = digitalio.Direction.OUTPUT
for i in range(5):
led.value = False # turn on LED
time.sleep(1)
led.value = True # turn off LED
time.sleep(1)
pin_alarmD2 = alarm.pin.PinAlarm(pin=board.D2, value=False, pull=True) # doesn't work...
This is an experiment to see how big the builds are when we use the full Mozilla root certifacte bundle, which can be generated by the ESP-IDF build process.
Tested this locally with the usual Guide wifi test script on Feather ESP32-S3 4/2 (whose ota_0 partition was just doubled in size). Its https fetches to various places are working.
The builds that are failing have OTA partitions, so after #10346 I think they might all fit.
The size difference on the Feather S3 build is about 50kB larger for the full bundle. This is not terrible and maybe we should just use the full cert bundle, instead of trying to tune which certificates are most common. https://github.com/adafruit/nina-fw/pull/70 (in progress), which revamps NINA-FW extensively, also uses the full bundle and it fits.
@slender iron have you had bad experiences with gdb on espressif in the past that influenced you to do only ESP_LOGI debugging? GDB is continuing to be really weird and if this is just inherent to the platform I guess I'll pivot faster than I thought
CircuitPython version and board name
Adafruit CircuitPython 10.0.0-alpha.5 on 2025-05-15; Adafruit QT Py RP2040 with rp2040
Adafruit CircuitPython 10.0.0-alpha.5 on 2025-05-15; Raspberry Pi Pico W with rp2040
Code/REPL
print("Hello World!")
Behavior
On reset, REPL prints:
Running in safe mode! Not running saved code.
You are in safe mode because:
CircuitPython core code crashed hard. Whoops!
Hard fault: memory access or instruction error.
Plea...
Has anyone gotten GDB with JTAG to actually work on an esp32s3, for that matter?
Seems like I must be missing a crucial memory configuration or build flag step
I have. For a narrow definition of working, anyway. Did you check out the Espressif tips link I posted recently?
print logging has the benefit of not interfering with time sensitive things like USB and wifi
since it doesn't stop the world
With a Feather ESP32-S2 running 10.0.0-alpha.5:
Adafruit CircuitPython 10.0.0-alpha.5-dirty on 2025-05-16; Adafruit Feather ESP32S2 with ESP32S2
Issue reproduces as described by @Neradoc:
โช python test.py
0:00:00 ok
0:00:40 ERROR
0:04:52 ERROR
Board freezes. With DEBUG=1 build, no informative messages logged by ESP-IDF on serial console. ...
Thanks for the report! We'll check on this as soon as possible.
RP2350 is OK, and I also tried nRF52840 and atmel-samd, which are OK.
@tulip sleet Would you like me to have a look at #10355. I can get SWD debug up pretty quick.
sure - I was going to do a bisect but not tonight
I'll give it shot for an hour or so.
it's an alpha, expectations are not high ๐
True that.๐
Fix #9666
Implements the fix I mention in https://github.com/adafruit/circuitpython/issues/9666#issuecomment-2781484747
Tilegrid/Bitmap using a displayio.Palette don't have the same issue and don't need a fix.
@tulip sleet No progress on #10355. This was the first time I've tried SWD with debugprobe on the new Mac. A cornucopia of tool failures ensued!
i have never gotten debugging to work on RP2040, but I haven't tried very hard
I am working with a user here: https://forums.adafruit.com/viewtopic.php?t=218315, which may be of interest. CPX board. time accuracy is better with 10.0.0-alpha.5, apparently, but there is a MemoryError: might be due to the new collect/no_collect logic. Would you expect an improvement of whole-second sleeps on atmel-samd after your PR?
Which port is that?
CPX is atmel-samd
Ah, CPX is Circuit Playground Express. Sleep is now accurate (or as close as it can be given we're not an RTOS) to subticks for all ports that go down to that level of precision.
+/- ~30us
do you think that before your subticks fix whole-second sleeps were noticeably inaccurate? The CPX does not have a crystal. When used with a battery it is going to use its internal RC oscillator for timing. (If USB is connected it can do clock recovery from USB timing)
2 minutes in an hour that the user saw seems like a lot
i'm not sure they did the testing consistently with USB not connected; have to ask that
It depends on the interrupt rate, but if it's high enough the cumulative error could have been pretty large.
they are using countio to count button pushes, but I think that's the only interrupt. and the neopixel usage is low
countio is going to interrupt just on pin transitions
i think so, but there was also something we did to avoid that, and I can't remember now...
On the RP2040, I suspect it's the factored assembly code for register unloads.
That's the only change from 4->5 that's plausible.
I'll take a look to see if anything jumps out.
On the CPX timing, the issue is that it's improved but you're not sure why?
@tulip sleet On M0, the register unload area is too small by 8 bytes. I'm going to patch and test now.
since CPX et al are also M0, same issue, maybe?
Yes, there's also a second bug I'm hunting down now. Something to do with the __ARM_ARCH_ISA_THUMB symbol.
The unload area size is definitely a bug. With that patched, I'm still falling into safe mode. I've disassembled the code, and it's building with the M0 version of the unload, and it's identical to code it replaces, so there's something else going on. It's not the __ARM_ARCH_ISA_THUMB, I've verified that is correct and the usage is correct. When I've tested, I've been careful to fully nuke the flash between tests. I'll be AWK for the next few hours for my walking club.
@tulip sleet The Mac is causing difficulties that are messing with debug. I've switched back to Linux, and the register unload size patch does correct the safe mode issue. I'm out the door, I'll PR it when I get back.
The register unload area for Arm thumb 1 processor cores (Cortex M0/M0+/M1/M23) was undersized by 8 bytes causing stack corruption.
Resolves #10355.
@tulip sleet I'm giving up on MacOS as development platform for now. There appears to be a new issue that silently prevents uf2 flashing from completing, resulting in an incomplete or corrupted image.
@mortal kernel is that on 15.5? This sounds like a recurrence of an old problem ๐ฆ
I'm sad to say it does sound like they've regressed.
I'll test your PR on some boards after it complete and make an alpha.6
silently is worse; the old bug threw an error
I've spent the last few weeks struggling with my new M4 Mini. It's just not up to being my main development ax. Unfortunately for me, I'm past the return window. It's back to Linux for me.
but you can run Linux on it under parallels?
I can. I've hit some flakiness with USB passthru that affects debugging, though.
looks like dual-boot is possible, e.g. https://umatechnology.org/linux-can-now-be-run-on-the-mac-mini-with-apple-silicon/
but that may not be the non-work workflow you want
I had high hopes for a one system solution.
our CI did not do a good job deciding which builds to do. I'll build some manually and test.
I don't think there's any potential downside to the patch, but the upside is huge. There won't be any code size change. There's no chance of build breakage. After a couple of smoke tests, I'd say ship it!
for the forum post I mentioned above, that's still getting a MemoryError on the relatively small code.py the user posted. But I added a print statement one place, and it went away :/
we're going out for a bit; I'll look more later. If I add print("foo") before the #Create PIN line, it works. If I add it before vcm =0 instead, it does not ??
Nevertheless 10355 works fine on rp2040, so I think I will move ahead
I think that deserves a closer look. Was that issue new with Alpha 5?
thank you for the saturday fix!
I haven't tried an earlier alpha yet. It works ok with 9.2.7
ok, back in an hour or two
My pleasure. See you Monday.
I've read both the tips and quirks page, and also your setup gist, if that's what you mean. Unfortunately, neither has helped much with the incorrect memory readings from GDB. I'm trying scott's suggestion of switching my whole build setup to Linux and trying some print debugging.
If this doesn't work, I may bail on espressif and see if I can implement STM32 or something to salvage the project
MemoryError with that program on alpha.3 and later, not on alpha.2
CI did not build enough things, but I tested locally. RP2040 working again. Thanks!
[adafruit/circuitpython] New tag created: 10.0.0-alpha.6
Automated website update for release 10.0.0-alpha.6 by Blinka.
We are getting a lot of Failed to restore: Cache service responded with 422 warnings during GitHub Actions builds. This is apparently due to carlosperate/arm-none-eabi-gcc-action not updating its use of actions/cache yet to actions/cache@v4. @carlosperate is planning to fix this: https://github.com/carlosperate/arm-none-eabi-gcc-action/issues/64#issuecomment-2829760318
Created a full debug build that does not overflow dram0_0_seg by setting:
CONFIG_ESP_WIFI_IRAM_OPT=n
and that does not overflow flash by using a Makefile extract from #10265 to remove the second OTA partition from flash. Built with DEBUG=1.
Got an assert from socket_select_task:
assert failed: socket_select_task Socket.c:95 (num_triggered > 0)
Backtrace: 0x4002c921:0x3ffd6360 0x40035741:0x3ffd6380 0x40039f65:0x3ffd63a0 0x400b6c02:0x3ffd64c0 0x4003625e:0x3ffd6500
https://blog.adafruit.com/2025/05/17/circuitpython-10-0-0-alpha-6-released/
Highlights of this release:
- Fix regression causing errors on ARM processors.
apologies for necro-replying but that's to show the build has IPv6 enabled. Otherwise, there's no AF_INET6 property in socketpool.
From https://forums.adafruit.com/viewtopic.php?t=218315
A program mentioned in the thread above happens to trigger a MemoryError in recent 10.0.0 alpha builds. Very slight changes cause the error to go away. This seems like it might be some kind of edge case related to the recent gc changes.
Program is below. This is running on a CPX with 10.0.0-alpha.6. As is, it causes:
MemoryError: memory allocation failed, allocating 1472 bytes
If the line
### a=1 ### uncommenting this c...
I am just booting for the first time a Metro RP2350 (10.0.0.-alpha.6) and while contemplating my DVI output, I notice that the blinking cursor is missing.
Maybe it has always been missing, from all the REPL I have seen on an LCD, but there on a big screen where I can compare the serial REPL and the DVI output... it feel like it is kind of missing.
This could become an issue for an editor, I guess I need to watch some streaming when FoamyGuy was working on the FruitJam, and see if there is one or not, or if this issue has already been discussed.
CircuitPython version and board name
Teensy 4.0; all versions of CircuitPython
Code/REPL
pass
Behavior
Hello,
I am trying to my Teensy 4.0 with USB libraries and I noticed that none of the USB libraries are supported for the Teensy 4.0, however, they are supported for the Teensy 4.1. As far as I am aware the Teensy 4.0 and Teensy 4.1 have the same USB functionality. Would it be possible to add the USB libraries to the Teensy 4.0?
Descriptio...
Can you describe exactly which libraries are missing? I tried the below in the REPL on a Teensy 4.0 and seems like they're all there:
Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 9.2.7 on 2025-04-01; Teensy 4.0 with IMXRT1062DVJ6A
>>> import usb_hid, usb_cdc, usb_midi
>>>
If you're talking about the libraries adafruit_hid or adafruit_midi, those you copy yourself or use circup to install. The official library bundles live at https://circuit...
Hi @todbot, the missing libraries are theusb library and usb_host library. I need to use my Teensy 4.0 as a USB host as opposed to a USB device. These libraries are included for the Teensy 4.1 but not the Teensy 4.0.
In case folks might be interested in more test code to trigger USB bugs on Fruit Jam, I just posted a guide for the gamepad tester thing I've been working on. It will pretty frequently trigger a glitch where unplugged devices only raise usb.core.USBTimeoutError (which is indistinguishable from normal timeouts) rather than a usb.core.USBError (useful for detecting unplugs, but doesn't always happen). https://adafruit-playground.com/u/SamBlenny/pages/fruit-jam-gamepad-tester
I haven't found a way to reliably reproduce the glitch, but it seems to be more likely with a Full-Speed device than with a Low-Speed device.
Feels like some kind of a race condition thing. Perhaps involving the interaction of display updates and USB polling.
It's also possible to induce more glitchy behavior by doing display updates that take longer. For example, re-drawing 5-lines of text in a bitmap_label every time an analog joystick axis changes its value is a pretty good way to bog things down and trigger strange behaviors. Drawing a one line hexdump in a bitmap_label is generally fine though.
oh, also, if I try to flash new code while a USB device is connected and actively being polled for input, that will pretty frequently lock up the board (host computer is M1 mini with Sequoia). As long as I unplug the USB device before flashing new code, it's usually fine. The behavior I've mentioned happens on 10.0.0-alpha.6.
As far as I am aware there never has been a visible cursor in the REPL that can be seen on the microcontroller display. If you are connected to the REPL from the PC it can show a cursor on the PC side depending on what software you use for connecting. But on the microcontroller display there is no visible cursor, when you type the characters just start appearing.
For the editor app that I've been working on there is a visible editor that is currently handled "manually" in the editor app code. It keeps track of cursor location, and uses the tilepalettemapper module to inverse the colors of the location the cursor is at. It's solid inverted instead of blinking.
Inside of terminalio.Terminal in the core technically there is some cursor position variables and logic IIRC, but it's internal only and not currently "hooked up" to do anything. It is on my radar to eventually try to implement proper visible cursor handling inside of terminalio.Terminal, which if it were to exist could allow the REPL to show a visible cursor on the MCU display.
Ahhhh, thank you!
I have been seeing this too, we should make an issue for it.
It is just a "nice to have" feature.
Maybe if you can add that (optional) to terminalio.Terminal, then you could avoid specific code in the editor.
There might be a lot of good reason to not always enable the cursor... like e-Ink screen, or if one use terminalio to display stuff, but there is no user input expected.
It is just my first feelting when testing my "Franken Fruit Jam", there was something missing, and it took me a few seconds to figure out why that terminal was uncanny.
@tulip sleet I did some noodling around with the OTA partition change on an Adafruit Metro ESP32-S2 device. Using tinyuf2 0.31: On a fully erased device, I can install tinyuf2 and then load my new CP firmware.uf2 using the newly installed tinyuf2, but it will not boot CP on a subsequent reset. I can flash the same firmware.uf2 with esptool.py and that boots successfully on reset.
i did not try esp32-s2 yet. esp32-s3 was owrking for me. There is a 0.32 release but I think the bootloader is the same
with esptool.py, you loaded the firmware.bin?
Yes, I mistyped. .bin.
Dear @lone axle , would you consider renaming this guide https://learn.adafruit.com/usb-game-controller-with-snes-like-layout to something similar to what you did for Keyboard and Mouse, such as:
"Using a USB Game Controller with SNES-like Layout with USB Host"?
The "Upload stubs to PyPi" step when doing a new release is now complaining about a version issue. See this build:
https://github.com/adafruit/circuitpython/actions/runs/15088880323/job/42414925264#step:13:34
Maybe could be due to #10312, but I'm not at all sure.
Run # python -m build was run by 'make stubs'
# python -m build was run by 'make stubs'
[ -z "$TWINE_USERNAME" ] || echo "Uploading dev release to PyPi"
[ -z "$TWINE_USERNAME" ] || twine upload circuitpython-stubs/dist/*
...
<@&356864093652516868> We'll have our weekly meeting in about 50 minutes from now in this text channel and in the circuitpython voice channel. Please take the time to add your notes in advance to the document: https://docs.google.com/document/d/19MYKsKO3_4BN_Xw3mpOf1Tfc3urLAIPSewX-TWIro2E/edit?usp=sharing -- Looking forward to everyone's updates!
Yes, I am set up to take one.
thanks!!
In this video, I will show you how you can use the UART-bootloader of the RP2350 to run it from another controller to build e.g. a smart port-expander.
Check out my blog article:
https://pfister.dev/blog/2025/rp2350-uart-bl.html
And find my code here:
https://codeberg.org/retsifp/rp2350_uart
0:00 Introduction
0:31 USB-Bootloader with a NO-FLAS...
btw, diagram below was generated by Claude Code, given the .csv files as input, and tweaked with several further requests (please center this, please make this taller so it's legible, etc.)
Thanks for hosting Bob. Have a great week everyone!
Thank you, Bob!
A few users have confused the original Feather HUZZAH32 and Fthe eather ESP32 V2. Add some cautionary text. The latest user with this issue also asked that the name include "HUZZA32" (which is on the bottom of the board).
I also added some alert boxes already in the two guides.
I deliberately took the link to the original HUZZAH32 Feather out of the description of the V2. I also removed some obsolete "it's early" language from the original description.
Here is the notes document for next Mondayโs CircuitPython Weekly Meeting. It is at the normal time of 11am Pacific / 2pm US Eastern here on Discord. Add your hug reports and status updates to the document before the meeting. If you are unable to attend but would still like to contribute, feel free to add your notes and weโll read them off during the meeting. Hope to see you there! <@&356864093652516868> https://docs.google.com/document/d/11ZlI_p6ie_kbPV95FjjcOoiUu-Hy6aI8pnxyoOxxGXk/edit?usp=sharing
Google Docs
CircuitPython Weekly Meeting for May 27, 2025 Welcome to the CircuitPython Weekly meeting notes! Feel free to add your Hug Reports and Status Updates before the meeting, alphabetically by your username. During the meeting, we go through them in order. If you canโt make the meeting and would stil...
I'm seeing the same behavior with CP 10.0.0-alpha6 as CP 9.2.7 on the ESP32-V2 + MAX3241.
Adafruit CircuitPython 10.0.0-alpha.6 on 2025-05-17; Adafruit Feather ESP32 V2 with ESP32
Finding devices:
Finding devices:
Finding devices:
Finding devices:
Since #10040 (9.2.5 and after) this happens with the i2ctarget example:
code starting...
9.789: INFO - read request to address '0x40'
Traceback (most recent call last):
File "code.py", line 38, in
AttributeError: 'I2CTargetRequest' object has no attribute 'deinit'
This is apparently because the new default __exit__ requires the presence of deinit in the object's dictionary, and I2CTargetRequest doesn't have one. It has a close() though, (which incidentally doesn't have ...
CircuitPython version and board name
Adafruit CircuitPython 10.0.0-alpha.6 on 2025-05-17; Adafruit Metro RP2350 with rp2350b
Code/REPL
= TilePaletteMapper(shader_palette, 2, SCREEN_WIDTH, SCREEN_HEIGHT)
from https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/54ab01feadf4206fa5ec1b5f22c6e2f646e2c0bc/Metro/Metro_RP2350_CircuitPython_Matrix/code.py#L67
(works fine in 9.x and fail in 10.0.0-alpha6)
Behavior
File "code.py", line 67...
That is true that the API changed and the old code is no longer working. Sorry, I have updated versions for the new API but have not PR'd them yet.
Under the new API you need to create the TilePalletteMapper first with no height or width, and then assign it to the TileGrid as a pixel_shader like normal. When that asignment happens the TilePaletteMapper gets the appropriate height and width from the TileGrid automatically now.
Here is the updated code section for the initialization of tpm a...
I think this is the following omission: if you look in the dict_table for, say I2CTarget, you'll see:
{ MP_ROM_QSTR(MP_QSTR_deinit), MP_ROM_PTR(&i2ctarget_i2c_target_deinit_obj) },
{ MP_ROM_QSTR(MP_QSTR___del__), MP_ROM_PTR(&i2ctarget_i2c_target_deinit_obj) },
The presence of the __del__ entry is true for all objects with a finaliser, which should be true for enter/exit objects. In i2ctarget_i2c_target_make_new(), the object created is created with `mp_obj_malloc_wit...
I wrote a RISC-V emulator in pure Python (https://github.com/ccattuto/riscv-python) and ported CircuitPython to it (https://github.com/ccattuto/riscv-python/tree/main/advanced/circuitpython). It features an emulated UART backed by a pseudo-terminal on the host, an emulated block device backed by a filesystem image, interrupt-driven timer and tick support, CTRL+C support for tight Python loops, autoreload, and a little more.
@eightycc: since you self-assigned this, please have a look at my PR. It works fine on all of my systems. And in contrast to the discussion, it does not "change semantics" (except for a single academic border case which is not relevant for any practical real-life scenario).
It does change the documentation bringing it in line with reality. The docs currently claims things that the code does not stand up to and never will ("It does not shut down WiFi, BLE, or other communications, or ongoin...
Thank you, @bablokb! I'll be looking closely at your work on #9965 and #10023.
actually, it slipped my mind when I made the previous comment, but I had already submitted a PR to update these here: https://github.com/adafruit/Adafruit_Learning_System_Guides/pull/3034
From what I can see, the USB OTG2 pins that could be used on the teensy 4.0 are the two pads on the bottom of the board (that despite their placement are actually not the same as the USB connector. So, it looks like it should be possible to enable USB host via those pins, but I don't know if replicating the configuration from the Teensy 4.1 will work.
Also, I don't want to solder on the bottom pads of my teensy for testing and I don't know if it needs additional components.
I've made a commi...
That fix is merged now and the guide code is updated to support both versions of the API.
An example of the hangup:
ESP-IDF verbose debug tracing with additional log messages:
D (124289) socket_select_task: select
D (124443) socket_select_task: num_triggered: 1
D (124443) socket_select_task: waking CP
D (124443) supervisor_web_workflow_background: workflow_background
D (124445) supervisor_web_workflow_background: workflow_background calls socketpool_socket_accept
D (124454) socket: socketpool_socket_accept
D (124459) socket: register_open_socket fd: 57
D (124464) socket: CP p...
Per the comments above, the choice is to make this board an alias of the other board. It could have different photos.
After some more thorough testing, this appears just to be a program that is too big. The current behavior is a bit idiosyncratic, but when re-testing on a Metro M0, it's clear that a slightly smaller or larger program affects whether the MemoryError occurs.
updates the IR pin name on the Sparkle Motion Stick to use IR which matches the name used on the original Sparkle Motion: https://github.com/adafruit/circuitpython/blob/main/ports/espressif/boards/adafruit_sparkle_motion/pins.c#L13
I looked at the original PR, #1064, which mostly survives as is in the current code. I think the best thing to do here is to remove a user-accessible close() method, add deinit(), and have __exit__() call the common-hal target close() and then do a deinit(). I am working on a PR.
Take feather_nrf52840_express as an example, it uses W25Q16JVxQ with 3.3V flash. Now I need to use a 1.8V power system, equipped with W25Q16JWxQ with 1.8V flash. What code should I modify to achieve this?
I'm curious - beyond searching the Adafruit and community bundles, is there any standard(-ish) process to search for method usage in a wider body of existing CircuitPython code? Obviously it needs to be something a bit more intelligent than simply grep close ..., but there are a variety of options for finding references to python method use that (try to and usually succeed at least partially) filter on the type, i.e. find invocations of close() on an I2CTargetRequest. But I'm n...
I search GitHub in general, both in the Adafruit org and elsewhere, and often do a general websearch, if I can make it specific enough.
- Fixes #10362.
Removes visible I2CTargetRequest.close() method. Adds I2CTargetRequest.deinit(). Does close() and deinit() in I2CTargetRequest.__exit__(). Makes I2CTargetRequest have a finalizer: __del__() calls deinit().
I tried testing with the more extensive example in the I2CTarget documentation, which tries to write and then read a value to an I2C register. It did not work, but I could not get that example to work with 8.2.9 or 9.2.3 either.
@Neradoc if you or ...
@tulip sleet FYI -- just followed the guide to update the bootloader on an esp32s3 feather with 4Mbyte Flash 2Mbyte PSRAM and loaded 10.0.0 -alpha6 -- My espcamera (OV5640) test code runs well! I no longer have to do a "custom build"
I had one "glitch" updating the boot loader -- After erasing the flash, My Chromium Browser would not reconnect to the board -- I rebooted the computer (Raspberry Pi 5) and everything went well after that -- loading the combined.bin and then the .uf2.
Also -- I went through the process on a second board and it all worked fine. No glitch.
Thanks for your testing! Did you try simply unpluggingand replugging the board, or try a different port?
Yes - I unplugged it several times -- finally resorted to reboot.
did you also try shutting down and restarting Chromium?
sometimes I see the boards switch ports from ACM0 to ACM1, etc.
yes -- that too -- appeared to be something odd with the port detection.
No problems at all on the second board
This wa using the WEB Flasher
I can add a warning about that.
Right now the main procedure is to load the "Factory Reset + UF2" .bin. We plan to update those .bin's, we think.
So the somewhat tortured instructions now of "use these instructions", but use this other ".bin" will not be soe tortured
It was clear to me what to do.
good ๐
This is only implmented for the 4Mbyte/2MBPSRAM board now, correct? not for the reverse TFT.
We wanted to do just one board, to vet the procedure, before doing a big bang. We really appreciate your testing.
There is this draft PR: https://github.com/adafruit/circuitpython/pull/10265. I have to fix the boards that didn't build.
No problem -- just curious -- It's nice to have this one available -- without needing the custom build any more.
I'm seeing the same behavior in a custom ATSAMD51G19A board. This is unfortunate, as it's causing DC where I'd really there rather not be, when using it for audio generation.
The following test code triggers the issue in 9.2.7 and works as expected with this PR.
Controller code (running on a tiny2350)
import busio
import board
import random
import time
from adafruit_bus_device.i2c_device import I2CDevice
i2c = busio.I2C(board.SCL, board.SDA)
device = I2CDevice(i2c, 0x40)
buffer = bytearray(1)
while True:
try:
with device:
device.readinto(buffer)
print(f"device responded with #{buffer[0]:02X}")
...
Could we have the call to
common_hal_i2ctarget_i2c_target_closein deinit ? It is possible (though ill advised) to not use the context manager and call deinit manually, in which case I believe close wouldn't be called.
And then we could remove the custom__exit__.
I considered that, but wasn't sure if there was another use case. But I think not. I'll do that, yes, thanks.
You can change the GPIO voltage by setting bits in the UICR (search for that in the datasheet, etc.). Is everything 1.8V? I am not sure if there is brownout detection setup in the bootloader, in https://github.com/adafruit/Adafruit_nRF52_Bootloader. Look to see.
https://devzone.nordicsemi.com/ is the Nordic forum area, which may have answers for other questions you may have.
I found my Teensy 4.0 with a USB jack soldered to it and tested this out. Yep, works!
It works with a USB hub too. But if you unplug the hub and then go back to the device plugged in directly, it's not recognized. Is this a known bug? I've not played with USB host stuff recently in CirPy.
Anyway, here's what my Teensy 4.0 USB host wiring from six years ago looks like:
Also, since `usb.core.Devi...
Fixes #10360 by enabling USB host on the USB host pads.
I did not enable it by default in board.c, maybe it should be like it is on the teensy 4.1 ?
Thanks @todbot for testing.
Test code:
import time, board
import usb, usb_host
port = usb_host.Port(board.USB_HOST_DP, board.USB_HOST_DM)
while True:
for device in usb.core.find(find_all=True):
print(device.product, device.manufacturer, hex(device.idProduct), hex(device.idVendor), time.monotonic())
time.sl...
@tulip sleet I wonder if we should have the i2ctarget fix in a 9.2.8 ?
We don't have much else for 9.2.8, and the 10.0.0 alphas are pretty stable (maybe that's a matter of opinion ๐ ), so I think main is fine.
You can change the GPIO voltage by setting bits in the UICR (search for that in the datasheet, etc.). Is everything 1.8V? I am not sure if there is brownout detection setup in the bootloader, in https://github.com/adafruit/Adafruit_nRF52_Bootloader. Look to see.
https://devzone.nordicsemi.com/ is the Nordic forum area, which may have answers for other questions you may have.
Yes, everything 1.8V. You mean the REGOUT0? It seems only work in high voltage mode, but my circuit is not ...
The latest release updates de action cache lib and fixes the warnings. Thanks for the reminder @dhalbert !
Just chiming in to say I think I'm having the same issue. I've designed a custom circuitpy board based around a raytac module but it uses the a split 1.8/3.3v rail where the nrf52480 and nvm run off 1.8v (VDD and VDDH are tied so it's in 'normal' mode). My status led's post circuit python uf2 upload seem to be working and suggest it's running, but I get no usb activity so I can't load programs onto it. The adafruit UF2 bootloader works without issue as well while things are in bootloader mo...
I hit this one when building this project https://github.com/rafgaj/Mouse-Ring-v2
The bug is very nasty as I spent around 2 month to figure out what's going on because it appears randomly.
Then it sounds like you really have to do nothing except change the device ID for the different flash. The datasheets look pretty much identical except for the Device ID and the voltages (see screenshow below). The flash chips are described in https://github.com/adafruit/nvm.toml, which is a submodule. You could just edit that locally to add the new chip in the winbond directory, or fork it, or submit a PR to add the chip.
In ports/nordic/supervisor/port.c, in port_init(), the brownou...
Fixed by https://github.com/carlosperate/arm-none-eabi-gcc-action/releases/tag/v1.10.1, which we should get automatically, because it's still @v1.
https://github.com/adafruit/circuitpython/issues/6501 may possibly be an issue for you? Are you using USB?
are there any circuit python based firmware or kernels for a digital synthesyzer
?
how much processing power do i need for that ?
Yes. Certain microcontrollers have built-in support for synthio after flashing CircuitPython. Read through this guide for more information: https://learn.adafruit.com/audio-synthesis-with-circuitpython-synthio
RP2350 Deep Sleep
same here, woud love some indents.
Unclear why the wrong version was used. Compare this with https://github.com/adafruit/circuitpython/actions/runs/14828564282.
I cannot tell where stubs-10.0.0a7.dev0+gd88fe10647.d20250517-py3-none-any comes from.
Here is a zip of two cleaned-up logs for comparison.
##[group]Run ./.github/actions/upload_aws
with:
source: circuitpython-stubs/dist/*.tar.gz
destination: stubs/circuitpython-stubs-10.0.0-al...
Then it sounds like you really have to do nothing except change the device ID for the different flash. The datasheets look pretty much identical except for the Device ID and the voltages (see screenshow below). The flash chips are described in https://github.com/adafruit/nvm.toml, which is a submodule. You could just edit that locally to add the new chip in the
winbonddirectory, or fork it, or submit a PR to add the chip. And you need to change the flash chip name inmpconfigboard.mk.
...
Just chiming in to say I think I'm having the same issue. I've designed a custom circuitpy board based around a raytac module but it uses the a split 1.8/3.3v rail where the nrf52480 and nvm run off 1.8v (VDD and VDDH are tied so it's in 'normal' mode). My status led's post circuit python uf2 upload seem to be working and suggest it's running, but I get no usb activity so I can't load programs onto it. The adafruit UF2 bootloader works without issue as well while things are in bootloader mo...
CircuitPython version and board name
Adafruit CircuitPython 9.2.7 on 2025-04-01; Raspberry Pi Pico W with rp2040
Code/REPL
import array
import time
import board
import digitalio
import displayio
import rp2pio
import busio
import i2cdisplaybus
import terminalio
import adafruit_displayio_ssd1306
import adafruit_pioasm
from adafruit_display_text.bitmap_label import Label
program = adafruit_pioasm.assemble("""
pull
mov osr ~ osr
set pins 1 [8]
...
Requesting a 5ms sleep after the display update really sleeps for 5ms and has no effect on the problem. Requesting a 20ms sleep actually sleeps for 100ms but resolves the problem.
This patch introduces the support of the Noise Nugget 2040, an all in one dev board for making audio gadgets.
The USB PID has been allocated by the Raspberry Pi foundation: https://github.com/raspberrypi/usb-pid
This has been tested on the Noise Nugget breakout and dev-kit, as well as the PGB-1 (a pocket synth based on Noise Nugget).
Could you try 10.0.0-alpha.6 and see if it's different? The sleep behavior you just mentioned may be different. This seems like two memory-heavy operations competing.
Merge latest 9.2.x changes, post 9.2.7, into main.
Incorporates:
- #10252
- #10279
- #10284
- #10316
- #10335
The delay is still present on 10.0.0-alpha.6
The updates look fine. Changes were previously tested/approved on the 9.2.x branch.
@dmcomm Thanks for the issue!
With #8700, compute_fifo_depth() returns the PIO FIFO depth in 32-bit words, but _transfer() treats it as bytes. This causes _transfer() to select DMA for the transfer for some transfer sizes smaller than the PIO FIFO size. While this isn't a breaking bug, it does shed some light on the results you're seeing.
At the conclusion of _transfer(), a while loop waits for the PIO's stall bit to go off before concluding the operation: https://github.com/adafrui...
I was interested to know whether removing RUN_BACKGROUND_TASKS there would prevent the delay, but it doesn't seem to.
And from what I wrote in the OP, I thought the workaround would be easy, but in my real program something else seems to be having this effect too.
@dmcomm Please try adding wait_for_tx_stall=False to the argument list for the state machine constructor.
It makes no difference.
Sorry, to be clearer, it does correctly make the probe line on the scope trace drop one byte earlier in the case where there isn't a delay, but it doesn't resolve the delay.
Returning before "Wait for the state machine to finish" doesn't resolve the delay, so the delay isn't in that section, even though according to the scope the transmission is finished. The times when the delay does not occur, it returns after 6 bytes with 9 remaining, which is 8 in the FIFO and 1 in progress as expected.
When I reported this over four years ago, my usage was exactly as described, no BLE or anything else involved -- all six lines of code are there, excepting the text of my print statement which was redacted due to boo-hoo.
The reality is that Pythons aren't a particularly good choice for semi-realtime use due to internals of its design that can make it a pretty bad fit for tight-timing applications. Just as it took about 30 years for Un*x OSes to be usable for "kind of" realtime applications...
I think this still might be a bug, so I'm reopening it. @slaxor505: which version of CircuitPython were you using? How often does it appear? If you could re-test with 10.0.0-alpha.6, which has some time stuff rewritten, that would be great, but if it takes a potentially long time for the extra-long sleep to appear, it might be hard to test.
Then this bug was submitted it took seconds to reproduce. But a LOT has likely changed since then, so all old bets are probably off as to how far this tick has burrowed down.
I think this still might be a bug, so I'm reopening it. @slaxor505: which version of CircuitPython were you using? How often does it appear? If you could re-test with 10.0.0-alpha.6, which has some time stuff rewritten, that would be great, but if it takes a potentially long time for t...
I can repro in 9.2.7, though it took some time (I pressed keys in the terminal to unblock in this case)
455.072 - 27.475098 <--
514.549 - 13.310059 <--
In alpha 6 I get a different pattern with smaller waits, but still an issue.
Adafruit CircuitPython 10.0.0-alpha.6 on 2025-05-17; Adafruit CLUE nRF52840 Express with nRF52840
14.740 - 0.485001 <--
30.436 - 0.829002 <--
36.513 - 0.766998 <--
47.760 - 0.552002 <--
79.700 - 0.687012 <--
Off...
I think this still might be a bug, so I'm reopening it. @slaxor505: which version of CircuitPython were you using? How often does it appear? If you could re-test with 10.0.0-alpha.6, which has some time stuff rewritten, that would be great, but if it takes a potentially long time for the extra-long sleep to appear, it might be hard to test.
I tried on both 9.2.1 and 9.2.6 - the same behaviour. Bug appears randomly - sometimes I can use the device for an hour...
What I get on windows (10)
21.964 - 0.227997 <--
34.988 - 0.264008 <--
45.696 - 0.618988 <--
47.172 - 0.142990 <--
71.120 - 0.332001 <--
88.958 - 0.605011 <--
103.320 - 0.342010 <--
109.096 - 0.602020 <--
What I get on a Pi 3:
20.142 - 0.973999 <--
72.701 - 0.415009 <--
76.340 - 0.936005 <--
80.227 - 1.208984 <--
136.793 - 0.801025 <--
That's different from the patterns I had with 9.x.
_Also, to be sure...
Hi,
I'm a fan of Helium LoRaWAN IoT, Python and SenseCAP T1000-A GPS tracker.
This device is closed-source and ready for endusers and applications.
This tracker exists as OpenSource variant T1000-E with similar hardware and sensors,
projects like Meshtastic support it already:
It would be cool to have T1000-E as board in official CircuitPython releases!
(MCU is nRF52840, it has only the internal 1MByte flash storage)
=>As experiment I compiled CircuitPython with T1000-E support (it...
I also ran into this issue.
If I see correctly, pulsio.PulseIn was implemented for the espressif port before ESP-IDF version 5. Back then, DMA mode for the RMT peripheral was not implemented (see here). But now in ESP-IDF Version >5, there is
[rmt_rx_channel_config_t::with_dma](https://docs.espressif.com/projects/esp-idf/en/v5.4.1/esp32s3/api-reference/peripherals/rmt.html#_CPPv4...
This mostly means changing void foo() to void foo(void) at the function definition site. This was previously only an error if the declaration site didn't have (void), but the unix coverage build enables the more strict warning and there's little difficulty in resolving these diagnostics.
.. other ports can be done too, if desired.
CircuitPython version and board name
CircuitPython 9.2.7, rpi pico rp2040
Code/REPL
class RGBLockStatus(LockStatus):
def set_lock_leds(self):
if self.get_caps_lock():
print("Never print this when use a USB HUB")
def after_hid_send(self, sandbox):
super().after_hid_send(sandbox)
print("always None when use a USB HUB: ", self.hid.get_last_received_report())
if self.report_updated:
self.set_lock_l...
Why didn't you install a SMP RTOS below CircuitPython? Let the backend have both cores. End users get the benefit without the tax.
Why didn't you install a SMP RTOS below CircuitPython?
Easier said than done. But we are working in the long-term on zephyr support as a base for most ports.
The stm32f411ve_discovery board build does not come up. I tested older versions: 5.0.0 work, but 6.3.0 and later do not. I tried making a few changes in the build to match the blackpill build more, but did not succeed.
See https://forums.adafruit.com/viewtopic.php?t=218381 for some background.
The board cannot be powered just from the OTG (micro-USB) port. Voltage must be supplied at the mini-USB ST-LINK port. Maybe there's a way to jumper around this.
To load CircuitPython, you can use ...
Hi there, I was hoping for some help with my Pyportal, I can't seem to get the sdcard to mount, it's stating that it can't set the block size to 512, (OSError: can't set 512 block size). I've tried both the adafruit_sdcard and sdcardio imports, using the latest circuitpython-9 release at the moment (tried the latest 10 alpha release with the same result previously)
wrong channel sorry
There have been a lot of USB improvements between CircuitPython 9.2.7 and 10.0.0-alpha.6. Does anything change if you try your code with CircuitPython 10.0.0-alpha.6?
If you want to try writing a minimal program to reproduce the problem in CircuitPython (without KMK), these guides talk about how to use the usb_hid library:
Here is the notes document for next Tuesday's CircuitPython Weekly Meeting. It is delayed one day due to a US holiday. It is at the normal time of 11am Pacific / 2pm US Eastern here on Discord. Add your hug reports and status updates to the document before the meeting. If you are unable to attend but would still like to contribute, feel free to add your notes and weโll read them off during the meeting. Hope to see you there! <@&356864093652516868> https://docs.google.com/document/d/11ZlI_p6ie_kbPV95FjjcOoiUu-Hy6aI8pnxyoOxxGXk/edit?usp=sharing
Google Docs
CircuitPython Weekly Meeting for May 27, 2025 Welcome to the CircuitPython Weekly meeting notes! Feel free to add your Hug Reports and Status Updates before the meeting, alphabetically by your username. During the meeting, we go through them in order. If you canโt make the meeting and would stil...
Zephyr currently also does not support the second core: "As with the Pico 1, thereโs no support for running any code on the second core." (from: https://docs.zephyrproject.org/latest/boards/raspberrypi/rpi_pico2/doc/index.html)
Follow up to #10372, next port.
keypad already has a Warning that the RP2350 Erratum E-9 could cause issues, but it doesn't explain how to get around the issues. I just wrote https://learn.adafruit.com/key-pad-matrix-scanning-in-circuitpython/raspberry-pi-rp2350-erratum-workarounds. Link to that or just copy it, more or less, into keypad
Hi! I am trying to change the hardcoded resolution on the Pi Zero 2W. I've followed https://learn.adafruit.com/building-circuitpython/linux and gotten to the Run Your Build! step, but I'm getting errors without having made any changes.
../../shared-module/lvfontio/OnDiskFont.c: In function 'get_char_id':
../../shared-module/lvfontio/OnDiskFont.c:327:21: error: a label can only be part of a statement and a declaration is not a statement
327 | uint16_t idx = codepoint - self->cmap_ranges[i].range_start;
| ^~~~~~~~
../../shared-module/lvfontio/OnDiskFont.c:328:21: error: expected expression before 'uint16_t'
328 | uint16_t glyph_id = self->cmap_ranges[i].glyph_offset + idx;
| ^~~~~~~~
../../shared-module/lvfontio/OnDiskFont.c:329:28: error: 'glyph_id' undeclared (first use in this function)
329 | return glyph_id;
| ^~~~~~~~
../../shared-module/lvfontio/OnDiskFont.c:329:28: note: each undeclared identifier is reported only once for each function it appears in
../../shared-module/lvfontio/OnDiskFont.c:327:30: error: unused variable 'idx' [-Werror=unused-variable]
327 | uint16_t idx = codepoint - self->cmap_ranges[i].range_start;
| ^~~
../../shared-module/lvfontio/OnDiskFont.c:327:30: error: this statement may fall through [-Werror=implicit-fallthrough=]
../../shared-module/lvfontio/OnDiskFont.c:331:17: note: here
331 | case 3: { // Direct mapping - need to look up in the table
| ^~~~
cc1: all warnings being treated as errors
-e See https://learn.adafruit.com/building-circuitpython; Adafruit Discord #circuitpython-dev
make: *** [../../py/mkrules.mk:93: build-raspberrypi_zero2w/shared-module/lvfontio/OnDiskFont.o] Error 1
I assume the main branch should build, so -- any idea what I'm missing?
can you show us the diff of the changes you made?
I haven't made any changes
I just cloned it and tried to get through the instructions
are you using the correct version of gcc?
I'm using 10.3-2021.07 because it's for Pi Zero 2W, which is a broadcom port
then I have no other ideas, I can't try it myself right now, sorry
no worries, thank you
yeah that sounds like a difference in version of gcc ๐ค
Is there a different branch I should be using for the broadcom make?
I just want to change the resolution so it's not 640x480 ๐ญ
Can I just make a GitHub Action to do the build? I assume that's how the final versions get made?
it (the CI) seems to use 13.3.rel1 like other ports ?
arm-gnu-toolchain-13.3.rel1-x86_64-aarch64-none-elf.tar.xz
yeah it should do it if you upload a change to your fork
I'll try that first and then go back and try the more recent toolchain if that doesn't work
(If it's supposed to be the latest, might need to update the directions on https://learn.adafruit.com/building-circuitpython/linux)
hmmmm
oh I see the version and the link are wrong, but later in the text mentions "13.2.Rel1"
dunno if Dan is still around, I'll leave feedback on the guide
looks like the CI uses a different version for M and A, 13.2 versus 13.3
well, on the one hand, it looks like the CI completed. on the other hand, did it Upload to S3??
0s so hopefully not
it makes a disk image, not a uf2
no it doesn't upload
phew
ah okay
(which is main, you'd have to checkout for stables)
oh, neat
so main is alpha
so i should change to 13.3
thank you! i will try that
hm, that also makes a disk img
(.py) kevin@tinkerbell:~/circuitpython/ports/broadcom$ make BOARD=raspberrypi_zero2w
- Verbosity options: any combination of "steps commands rules", as `make V=...` or env var BUILD_VERBOSE
Memory region Used Size Region Size %age Used
READONLY: 976849 B 1536 KB 62.11%
RAM: 32104 B 1022 MB 0.00%
aarch64-none-elf-objcopy -O binary build-raspberrypi_zero2w/kernel8.elf build-raspberrypi_zero2w/kernel8.img
cp build-raspberrypi_zero2w/kernel8.img build-raspberrypi_zero2w/firmware.kernel8.img
0+0 records in
0+0 records out
0 bytes copied, 5.1987e-05 s, 0.0 kB/s
mkfs.fat 4.2 (2021-01-31)
adding: build-raspberrypi_zero2w/circuitpython-disk.img (deflated 95%)
that seems correct, you put that image on the SD card
there's no bootloader for pi zero
also don't forget that's not a solid port, it's pretty experimental
oh right
got stuck on following the directions, but we use the raspberry pi imager
Looks like it worked! Thank you!!
Weirdly, it's got a bit of a border that I didn't expect to be there, because it goes full screen normally and that's 1920x1080 i think
@jaunty juniper @cerulean acorn Sorry, i misread "Pi Zero 2W" as "Pi Pico 2W", and was specifying the version based on that.
I'd like to echo the desire to have this functionality added for wave files! I have a couple of long duration effect files that I would like to start playing at random points to give the illusion that it's a unique effect each time it gets played. (If you start at the beginning of the file each time, it's very easy to hear that the same sample is being played)
It would also be great to still allow for looping even if you 'seek' to a certain point in the file if it's possible?
I've tried loo...
[some of these I can't build at all on my travel laptop so I'll be using CI as a crutch a bit more than usual]
I'm surprised that this one affected just one board
../../shared-module/usb_cdc/__init__.c:359:8: error: old-style function definition [-Werror=old-style-definition]
359 | size_t vendor_ms_os_20_descriptor_length() {
it seems to be a function that may only be built when CIRCUITPY_USB_VENDOR is enabled, which has something to do with webserial. but isn't webserial enabled across multiple boards? Is this a vestige?
Having tried a few variants of the boot descriptor from above comments and also just
usb_hid.enable((Device.KEYBOARD,), boot_device=1)
as documented here, I am still not able to get a working boot mode keyboard implementation to work with MacOS cold-boot (FileVault) login.
Can anyone confirm that they have boot-mode keyboard working for MacOS? (specifically a cold-boot, FileVault login).
[adafruit/circuitpython] Issue opened: #10378 board.DISPLAY returns None on Badger2040 / Badger2040W
CircuitPython version and board name
Adafruit CircuitPython 9.2.7 on 2025-04-01; Pimoroni Badger 2040 W with rp2040
Code/REPL
import board
display = board.DISPLAY
print(display)
Behavior
code.py output:
None
Code done running.
Description
board.DISPLAY should return a displayio object but instead returns None.
Additional information
No response
According to this issue (https://github.com/pimoroni/pico-circuitpython-examples/issues/6), the problem occured at least as far back as Adafruit CircuitPython 9.2.4 on 2025-01-29; Pimoroni Badger 2040 W with rp2040
Hi Guys
I need help connecting wm8960 audio codec module to raspberry pi pico using circuit python.
How can I do that? I just need to check that pico is connected successfully to wm8960 codec and able to detect it
My main objective is to output audio and input microphone voice when connected to computer using that codec. I can later update the code to c++
Thanks in advance!!
try #help-with-circuitpython or #help-with-projects, this channel is about development of circuitpython itself
I cannot confirm this bug:
[13:37:30.722] Adafruit CircuitPython 9.2.7 on 2025-04-01; Pimoroni Badger 2040 W with rp2040
[13:37:30.722] >>> import board
[13:37:36.341] >>> board.DISPLAY
[13:37:39.111] <EPaperDisplay>
This is with a freshly downloaded 9.2.7 version. And my application also works as expected.
thanks
Are your running some code that does displayio.release_displays() at some point ? This is normally used for external displays, and is found in many example code. If that happens, board.DISPLAY will be None, and you need a hard reset for it to be inited again.
I was thinking about this too, but the code in the linked issue is clean. But this might not be the full story.
The problem persists when using CircuitPython 10.0.0-alpha.6. The simple test code is as follows:
# code.py
# While this code is running, press the Caps Lock key on another keyboard once a second and observe if the output is different.
import time
import usb_hid
while True:
time.sleep(1)
print()
for device in usb_hid.devices:
x = device.get_last_received_report()
print(x)
After doing some tests, I found that this problem only occurs when this USB HUB i...
@meng89 Try adding a delay of several seconds before the while True loop of several seconds, to give time for USB enumeration.
After inserting time.sleep(10) before the while true loop, the problem still exists.
Yeah, the minimal example that I ran on my badger doesn't have release_displays():
I was able to get the display to work with the following (paired down from what I'd been using originally). I had realized that adafruit_il0373 was the wrong driver when I was trying to display bitmaps and was trying to move off of it when I realized that board.DISPLAY was supposed to provide a pre-configured display object.
import board
import displayio
import fourwire
import adafruit_il0373
import terminalio
from adafruit_display_text import label
from adafruit_display_shape...
I tested this on a Badger 2040W device with the code provided:
import board
display = board.DISPLAY
print(display)
And it is always outputting the expected result I believe:
code.py output:
<EPaperDisplay>
I tested on both 9.2.7 and 10.0.0-alpha.6
I think that the display was likely released before this code was run when you got the None results. Note that calling displayio.release_displays() clears the display and it stays gone even across soft resets. So if you run `di...
<@&356864093652516868> The weekly meeting is today on Tuesday this week due to the US holiday yesterday. We'll be meeting here on discord at the usual time of 11am Pacific / 2pm Eastern which is about 2 hours from now. You can add hug reports and status updates to the notes doc any time: https://docs.google.com/document/d/11ZlI_p6ie_kbPV95FjjcOoiUu-Hy6aI8pnxyoOxxGXk/edit?usp=sharing We look forward to hearing from everyone at the meeting.
Google Docs
CircuitPython Weekly Meeting for May 27, 2025 Welcome to the CircuitPython Weekly meeting notes! Feel free to add your Hug Reports and Status Updates before the meeting, alphabetically by your username. During the meeting, we go through them in order. If you canโt make the meeting and would stil...
@FoamyGuy, I just tested with a hard reset (this means unpowering, waiting a while, powering back on, right)? and can confirm that what you said works. The minimal example in my initial message and the more complicated example with the text display both produce the expected
code.py output:
<EPaperDisplay>
after the reset. That whole displayio.release_displays() thing is pretty unexpected behavior. I'd only seen display stuff with that included before.
I wonder if it's worth a ...
I don' think calling it out on specific board pages makes sense because the same behavior applies to all devices with a built-in display.
We could perhaps add more explicit info about how it persists across soft resets to the release_displays() docs here: https://docs.circuitpython.org/en/latest/shared-bindings/displayio/index.html#displayio.release_displays.
The display is one of the few things in CircuitPython that behaves this way (persisting beyond soft resets of CircuitPython). So i...
I am present, but will stay without mic.
hi folks! Just listening in today!
GitHub
CircuitPython - a Python implementation for teaching coding with microcontrollers - GitHub - jepler/circuitpython at unix-sound-sdl
Thanks, Tim! Have a great week, everyone!
๐
Thanks everyone! have a great week.
Thanks.
I have a question about "network stack"...
I am analysing the minimqtt.loop() for either non-blocking or play nicely with asyncio.
Basically, I read all the related Open and Closed issues for hint.
I try to see what are the "usecase" to test if ever I find a fix.
What are the various IP network stack in CircuitPython:
- ESP32SPI (aka AirLift) build on some board like PyPortal or as a module
- Espressif (ESP32, ESP32S2, ESP32S3, ...) use native network stack
- WizNet (Ethernet) use the specific library
- PicoW (onboard wifi chip on PicoW, does not support Pico2W)
- Anything else?
I have a doubt about PicoW...
Is that a specific stack?
Does this have a name?
Does it only work on/with the RP2040 or Pico"1"W? (not Pico2W)
Wait Anne made a nice Networking learning guide... maybe it has some answer?
The IP stack for the Pico's is LWIP, same as Espressif. It is supported by both the Pico W and Pico 2W.
Updated IP stack list:
- ESP32SPI (aka AirLift) build on some board like PyPortal or as a module
- Espressif+LWIP (ESP32, ESP32S2, ESP32S3, ... and Pico W + Pico 2W) use native network stack
- WizNet (Ethernet) use the specific library
- Anything else?
Here is the notes document for next Mondayโs CircuitPython Weekly Meeting. It is at the normal time of 11am Pacific / 2pm US Eastern here on Discord. Add your hug reports and status updates to the document before the meeting. If you are unable to attend but would still like to contribute, feel free to add your notes and weโll read them off during the meeting. Hope to see you there! <@&356864093652516868> https://docs.google.com/document/d/1LkWa9fIlK7wzdpeyxYi2RbaUSO2Dx84AvcDQm40nA7s/edit?usp=sharing
Google Docs
CircuitPython Weekly Meeting for June 2, 2025 Welcome to the CircuitPython Weekly meeting notes! Feel free to add your Hug Reports and Status Updates before the meeting, alphabetically by your username. During the meeting, we go through them in order. If you canโt make the meeting and would stil...
A useful procedure to learn how a CircuitPython library implementation works is:
- Find the importable names of the relevant libraries by looking at learn guide code examples or other docs. In this case, for playing wave files, what you probably want is
from audiocore import WaveFile
combined with an audio output class like
from audiopwmio import PWMAudioOut as AudioOut
or
from audiobusio import I2SOut
or
from audioio import AudioOut
(see [Play...
@samblenny Thank you for the tips and very detailed reply!
Quick question that I can't find a definite answer to: what is the difference between a module and binding? I see them reference one another in some of the code, and I saw in an Adafruit article that the binding is described as "the plumbing that connects the implementation to the CircuitPython runtime". Is this effectively saying that the module defines the specific functionality and the related binding is what connect that module c...
what is the difference between a module and binding?
Honestly... no clue, but I haven't found the mystery of it to be an obstacle. Mostly, I just write higher level CircuitPython code. When I go spelunking through the core, I'm usually looking for answers to questions that aren't obvious from the documentation, or else trying to understand quirky behaviors.
The build system and code layout grew organically out of the original stuff from the MicroPython fork 8+ years ago. Everything is the...
Quick question that I can't find a definite answer to: what is the difference between a module and binding?
The shared-bindings directory contains the code that handles Python-style invocation (e.g. when you call wav = audiocore.WaveFile() you're calling shared-bindings/audiocore/WaveFile.c. The shared-binding is where you do the parsing of Python arguments into C variables an...
This is a verbatim upstream patch for the implementation of deques, see https://github.com/micropython/micropython/pull/16108.
I know upstream is merged once in a while, but this bug basically makes deques unusable, so please consider merging it now.
Tested with a Pico using the code from the original PR.
@tulip sleet I'm considering putting my attempts to use RP2350 power manager aside for now. While it's theoretically possible to achieve significant power savings with this facility, there are too many problems to solve (including possible SDK bugs and/or bad datasheet info) that I think I can better use my time thoroughly testing and tuning the SLEEP and DORMANT states.I have a specific issue with an interrupt window during transition to DORMANT state that I'd like to go over with you.
@tulip sleet I looked at #10380 and think it's a worthy fix. Do we have a policy for taking an upstream PR from Micropython outside of the periodic mass merge?
I've reviewed these changes as well as the upstream PR https://github.com/micropython/micropython/pull/16108 and it looks good. Thank you! I'll check with @dhalbert before merging it.
-
Fixes #10348
-
Re-initializes BLE properly after a deep sleep.
-
Copy-edit a comment in
main.c. -
Clean up some enums a bit and add a constant for future
TouchAlarmsupport.
I think maybe eventually the nordic sleep code could be further simplified. The NRF_SLEEP_WAKEUP... and the SLEEPMEM_WAKEUP... enums could probably be merged. In the long run nordic should do real deep sleep, which it does not do now. #5318, etc.
I will watch for the CircuitPython build with this PR and test with the Circuit Playground Bluefruit.
@mortal kernel & @tulip sleet - THANKS !!
If it's a really good/important fix, definitely.
I can talk now, no problem. Getting alarms to work at all is more important.
Thank you! I offered your change to the micropython project (https://github.com/micropython/micropython/pull/17383) with an attribution to you.
By the way this is the current compiled CircuitPython firmware for T1000-E for getting the console output above,
just in case someone wants to test it without "getting hands dirty" setting up development environment.
It's the naked firmware, without libraries for directly reading battery level, light level, gyroscope, acceleration, GPS, BLE beacons, WiFi SSID sniffing, and sending data over LoRa-peer-to-peer or LoRaWAN...
[firmware.zip](https://github.com/user-attachments/files/20493965/fir...
Add more information about the RP2350 E-9 erratum as it applies to keypad. This is meant to convey more or less the same info as https://learn.adafruit.com/key-pad-matrix-scanning-in-circuitpython/raspberry-pi-rp2350-erratum-workarounds
- Merge
9.2.xfix #10380 intomain.
Automated website update for release 9.2.8 by Blinka.
CircuitPython version and board name
CircuitPython main at 116b29b65789dc8c10802b0f5cbb8b4130b07197 (May 27th, post 10.0 alpha 6) on RP2040.
Code/REPL
Adafruit CircuitPython 10.0.0-alpha.6-9-gaf95f3c82a-dirty on 2025-05-28; denki-oto rin with rp2040
>>> import board, rp2pio, adafruit_pioasm
>>> rx = board.RXPIN0
>>> bits = 8
>>> baudrate = 100000
>>> program = adafruit_pioasm.Program(
... ".program uart_rx_mini\n"
... ".fifo auto\n"
... "start:\n...
https://blog.adafruit.com/2025/05/28/circuitpython-9-2-8-released/
Highlights of this release
- Fix deque bug.
- Fix I2S audio file read causing memory corruption.
- Support โSpectra6โ six-color e-ink displays.
- Fix audiodelays.Delay when freq_shift=True.
- Board fixes.
I will be doing a MicroPython merge soon so I think I will wait on this a bit.
I need to deinitialize specific objects within my circuitpython module in order - I can't run the cleanup function safely on "Node" objects until all "Publisher" objects have already been cleaned up. Is the best way to do this with a manual registry of objects and cleaning them up in order in my reset function?
Is there any support for the continuous capture methods of imagecapture.ParallelImageCapture? I can't find it implemented anywhere. ๐คทโโ๏ธ https://github.com/adafruit/circuitpython/blob/002881826a04669abaaa4f2d5220379f786cb159/shared-module/imagecapture/ParallelImageCapture.c#L10-L24
do Publisher objects point to Node objects? Could Publisher objects do the deinit of Nodes themselves?
can gc do the cleanup, or does it have to be manual? If you make gc by making __del__() point to deinit(), then gc would clean up everything, but not in any particular order. The deinit functions could be careful and not try to deinit something that is already deinited if deinit is not idempotent
There might be multiple publishers per node so they'd need to keep track of other publishers
it's a tree that has to be deconstructed from the outside in
I'd have the gc do it if it wasn't random in order. My impression is that if I only ran checks on whether something is "valid" to deinit, it'd leave me with leftover objects that I'd have to manually clean up anyway
if you don't deinit them what happens?
do they hold resources?
if you broke all links to them so they could be gc'd, then all the unconnected-from-the-outside nodes would have __del__() called on them eventually, once each. If they marked themselves as deinited (often by zeroing out a pointer, etc.), then you could use that as a "deinited?" check
this is how our current deinit stuff works
during gc, all the reachable objects are marked. if an object isn't marked, then it isn't reachable and its finaliser can be called
so a publisher would just take care of itself, and not try to deinit its nodes. the unmarked (unreachable) nodes would clean up themselves when their finaliser was called.
microros has its own allocation system and manages objects internally, plus it actually has to send a message to a co-operating agent on a linux machine to remove the nodes/publishers from the ros map
so this could be considered more like a hardware deinit than a software one, hence why I was thinking maybe a registry
Trying to understand the GC here, so a publisher object of type:
typedef struct {
mp_obj_base_t base;
rclcpy_node_obj_t * node;
rcl_publisher_t rcl_publisher;
} rclcpy_publisher_obj_t;
after circuitpython execution ends, would not be linked anywhere, and could be collected. And then once it's removed, the node would not be reached and could also be collected? So this might happen automatically already?
in the correct order, I mean
ie all I maybe have to do is add the correct _fini calls (microros destroy functions) to the deinits and maybe it will work out the gate?
You'll need to use mp_obj_alloc_with_finaliser() in the make_new() and have something like this in the dict_table:
{ MP_ROM_QSTR(MP_QSTR_deinit), MP_ROM_PTR(&busio_i2c_deinit_obj) },
{ MP_ROM_QSTR(MP_QSTR___del__), MP_ROM_PTR(&busio_i2c_deinit_obj) },
When you call the _fini() routines, then NULL out at least one of those pointers so _deinited() can tell. Also you need to check for deinited everywhere. A good example would be, say, shared-bindings/busio/I2C.c (it sets a pin value to a invalid value, but same idea)
Notes on progress
- Had to rebase to include updates to esp-idf.
- Fixed issue with initialization, after spending a lot of time messing with debug messages. Had to do with connecting to the host linux agent, which will cause a failure at the first initialization, rather than at the publish stage, where I expected it. The module now works successfully for the first reset of Circuitpython.
- Agent information has been added to the init API.
- Currently working on reset support, which is a ...
CircuitPython version and board name
Adafruit CircuitPython 9.2.8 on 2025-05-28; Raspberry Pi Pico W with rp2040
Code/REPL
import wifi
wifi.radio.connect(ssid="myssid", password="mypass")
Behavior
main.py output:
Traceback (most recent call last):
File "main.py", line 3, in
ConnectionError: Unknown failure 1
The RPi Pico W fails to connect to the WPA3 WLAN network; the handshake also does not appear in the hostapd logs at all (as...
There is available WPA3 support in recent versions of the underlying driver. Could you try 10.0.0-alpha.6? I'm not sure it's been enabled, but that will give us a starting point. Thanks.
@timchinowsky Are you available to take a look?
Now running on Adafruit CircuitPython 10.0.0-alpha.6 on 2025-05-17; Raspberry Pi Pico W with rp2040, but still the exactly same error. I'll try to check if I can setup and reproduce it with another WPA3-only access point to ensure it's not a problem with my hostapd.
Try updating to gcc 14.2Rel1 from https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads
Try updating broadcom to gcc14 as well.
I'll update the Building CircuitPython guide after this is merged to say that this is the compiler to use for post 10.0.0-alpha.6 builds, and it will probably work backwards as well. But I haven't tried building 9.2.x with gcc 14. I'll bet @tannewt did, and it's probably fine.
#1013 added changes to mpy-cross/Makefile to do static builds. Somewhere along the line, these changes were lost, and the mpy-cross executables we are now building are not static. Fix this.
-- Fixes #10387.
mpy-cross STATIC_BUILD flag checking from #1013 and #2551 was lost in #8481. Restore it.
I'll check the artifacts after they're built.
Looks good, except .devcontainer/cortex-m-toolchain.sh needs updating.
[adafruit/circuitpython] New comment on pull request #10388: restore mpy-cross STATIC_BUILD checking
I tested the Windows executable and the Linux excutable, and they work. The user who was on an older Linux said the new build worked for them. The macOS builds do not deal with STATIC_BUILD, but they are working as well.
CircuitPython builders: Note https://github.com/adafruit/circuitpython/pull/10386, which has updated the gcc version to use to 14.2Rel1. You'll be notified if you try to build with an earlier version. Download that version from https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads.
What's the best practice for handling a failure that happens in a deinit function? Given that they can run during GC
Ignore? Have a preprocessor option for non-circuitpython debug message?
As of the latest commit with reset support, this is now feature complete (tested on Devkit C with microros's suggested docker agent). Working on inline documentation.
Yes, ignore, give up, or go into safe mode or something.
I updated this action to be a Python-based composite action to simplify maintaining it. The user-facing API was kept the same, but since it was a decently large internal overhaul, it got a bump to the major version.
I looked at the action code, which looks fine. How did you test it?
Yeah, I have a private repository I've been using to develop and test - works as expected!
CircuitPython version and board name
Waveshare ESP32-S3-Zero 10.0.0-alpha.6 with Windows 11
Code/REPL
Doesn't matter
Behavior
After erasing flash and flashing 10.0.0-alpha.6, no CIRCUITPY drive appears after plugging in.
main.py seems to run, but I can't interact with the board via usb serial.
I see the same behaviour on main at https://github.com/adafruit/circuitpython/commit/002881826a04669abaaa4f2d5220379f786cb159.
Flashing 9.2.8 again and ev...
Update: The CIRCUITPY drive did eventually appear, but only after around 3-4 minutes of being plugged in. After this time I was also able to interact with the board via usb serial again. After unplugging the board, it again takes this large amout of time until the drive is available.
What's the recommended way of writing the RST in the shared-bindings layer? I don't see anything about it in the contribution docs. It's kind of fiddly to do by hand
If anyone's interested in trying this out, this test script includes the basic functionality of this PR:
import os, wifi, time
import rclcpy
time.sleep(2) # give USB a bit of time to see first session
print("connecting...")
wifi.radio.connect(ssid=os.getenv('CIRCUITPY_WIFI_SSID'),
password=os.getenv('CIRCUITPY_WIFI_PASSWORD'))
print("my IP addr:", wifi.radio.ipv4_address)
rclcpy.init("<IP ADDRESS>", "8888")
mynode = rclcpy.Node("foo")
print(mynode.get_name(...
CircuitPython version and board name
adafruit-circuitpython-lilygo_tdongle_s3-en_GB-9.2.5.bin
Code/REPL
The REPL never reaches a point to execute code and the CIRCUITPY drive never appears.
Behavior
After flashing the circuitpython binary, no USB drive appears and the REPL prints the following repeatedly.
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0xc (RTC_SW_CPU_RST),boot:0x28 (SPI_FAST_FLASH_BOOT)
Saved PC:0x40378b81
SPIWP:0xee
mode:DIO, ...
The waveshare_esp32_s3_zero/mpconfigboard.h
file does not have SPI nor IC2 defined. I suspect this board was built off another board and while the SPI and IC2 definitions were correctly removed from the mpconfigboard.h file, they were accidentally left in the pins.c file. So if you call a board.I2C or board.SPI you get an error even though they show up in 'dir (board)'.
The board does not have any silkscreen for these busses nor are the specifically called out in the schematic. https://ww...
Is the garbled video that I'm experiencing related to this issue? I'm finally trying HSTX DVI output on Metro RP2350 and the demo code in the Learn Guide is scrambled like the timing is off on my little test HDMI display (see below).
I notice that microcontroller.cpu.frequency defaults to 150 MHz and if I change it to 125 MHz, then the display can parse the output and the image shows up correctly. A handful of other other CPU...