#circuitpython-dev

1 messages Β· Page 25 of 1

slender iron
#

ya, that's fine

jaunty juniper
#

and the nightly links are 404 πŸ€”

slender iron
#

it hasn't changed much

#

ok, so pip install pysigrok-hardware-raspberrypi-pico

#

should be version 0.1.0

tidal kiln
#

ok to use venv?

slender iron
#

should also install pysigrok

#

yup

#

it should pull in pyserial too

#

but I may not have the deps set right

tidal kiln
#
$ python3 -m pip install pysigrok-hardware-raspberrypi-pico
Collecting pysigrok-hardware-raspberrypi-pico
  Downloading pysigrok_hardware_raspberrypi_pico-0.1.0-py2.py3-none-any.whl (5.3 kB)
Installing collected packages: pysigrok-hardware-raspberrypi-pico
Successfully installed pysigrok-hardware-raspberrypi-pico-0.1.0
#

maybe not?

slender iron
#

ah ya...

tidal kiln
#

can just work around it for now. anything else other than pyserial?

slender iron
#

try updating

#

just pushed 0.1.1

#

er "upgrading"

#

whatever the pip term is

jaunty juniper
#

U-ing πŸ˜‰ (-U)

slender iron
#

πŸ™‚

#

thats the firmware for the pico

tidal kiln
#

that worked. also grabbed click looks like

slender iron
#

pysigrok-cli -d raspberrypi-pico:conn=/dev/ttyACM2 -C GPIO16 --samples 1000 -c samplerate=1000000 -o test.sr

#

yup click is needed for pysigrok

#

pysigrok-cli --list-serial to find the right name

#

/dev/ttyACM2 - Pico - Board CDC is mine

#

the first command will capture to the test.sr file which you can then open in pulseview

#

pysigrok-cli --list-supported may be helpful too

tidal kiln
#
ModuleNotFoundError: No module named 'importlib_metadata'
slender iron
#

what version of python?

tidal kiln
#

3.8

#

.10

slender iron
#

ok, its built into 3.10

#

but I should be able to add it as a dep for < 3.10

tidal kiln
#

i could upgrade too. no reason i'm at 3.8 other than just haven't upgraded.

slender iron
#

I can add importlib-metadata as a dep and it should work back to 3.7

tidal kiln
#

ok. i'll hold off then. can be your test case for <3.10

slender iron
#

ok, pushed a new pysigrok version

tidal kiln
#
$ pysigrok-cli --list-serial
Available serial ports:
  /dev/ttyS4 - n/a
  /dev/ttyS0 - ttyS0
  /dev/ttyACM0 - Pico - Board CDC
slender iron
#

that sets min python to 3.7 and adds importlib dep

tidal kiln
#

just confirming it works with a manual install of metadata lib

slender iron
#

πŸ‘

#

ACM0 is the port you'll want to use

tidal kiln
#

i'm going to just dump this venv and start over to test the deps.

slender iron
#

(should I make a pysigrok channel?)

tidal kiln
#

yep - agrees with dmesg πŸ™‚

jaunty juniper
#

it has the pyserial bug that we fixed 2 years ago but was never merged but I would use discotool to find the serial port anyway πŸ˜‰

tidal kiln
#

ok, looks like the dep stuff is working ok now.

slender iron
jaunty juniper
#

(where on mac the ports have the same name)

slender iron
#

let's move there

brazen hatch
#

With the help of the decoder I have deducted that yea pystack cannot be resizable.
The value is stored in bss.
Not sure what that is, but doesn't sound fun to play with.

#

And btw main wasn't happy either with getenv included.

#

It's up to you guys.
I am not putting any more time into this.

slender iron
#

Thanks for looking into it @brazen hatch

manic glacierBOT
blissful pollen
#

I've been doing some tests on displayio speed ups tangentially to the GIF work I've been doing. Is there a pre-existing issue where I could post about my results? If not I can create a new one.

I couldn't find one search so just checking as I know jepler did some work previously looking at this.

manic glacierBOT
manic glacierBOT
jaunty juniper
#

so that is puzzling:

latest on ξ‚  main [$] via C v14.0.0-clang via 🐍 v3.9.6 
❯ git status
fatal: cannot chdir to '../../../../../../ports/espressif/certificates/nina-fw': No such file or directory
fatal: 'git status --porcelain=2' failed in submodule lib/certificates/nina-fw
#

I'll just reclone, but what a weird error

twin sapphire
#

Any circuitpython devs looking for work? I need help with programming for my new toy project.

manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

At the moment displayio makes many assumptions on the format of the display controller commands, limiting the controllers it can support.

In my particular case I tried to create a driver for the Waveshare 1.54inch e-Paper V2 display (datasheet). While the display has a 200x200 pixels resolution, the row addressing commands (0x45 and 0x4F) use a two byte, LSB first, parameter for the row. Function displayio_displa...

manic glacierBOT
blissful pollen
#

@onyx hinge I remember you doing some work on displayio speeds. Could you let me know where you posted it? Sorry I can’t recall and I wanted to compare it to what I’ve been looking at.

onyx hinge
blissful pollen
#

Yes that was it I think. Somehow I missed it searching the PRs. Thanks!

manic glacierBOT
#

Closed issues are not a good place for support questions.

It looks like the content you have in the file tools/bitmap_font/adafruit_bitmap_font/bdf.py does not match what we have in git. For instance, your error pertains to line 229 of that file, while the current version contains only 109 lines.

You need to investigate why your system has different content in the tools/bitmap_font/adafruit_bitmap_font/bdf.py file and resolve it.

$ git submodule status tools/bitmap_font/
 62d...
analog bridge
#

Are the translations 4-bytes aligned on every board?

orchid basinBOT
tulip sleet
analog bridge
#

the const compressed_string_t translation0... in the auto-generated build-*/py/translations-en_US.c

tulip sleet
#

I looked at the metro m4 express build, and it looks like it is packing those only on byte boundaries. From firmware.elf.map:

 .rodata.translation0
                0x00000000000600d8        0xd /tmp/firmware.elf.D3xoxR.ltrans0.ltrans.o
                0x00000000000600d8                translation0
 .rodata.translation1
                0x00000000000600e5        0x7 /tmp/firmware.elf.D3xoxR.ltrans0.ltrans.o
                0x00000000000600e5                translation1
 .rodata.translation10
                0x00000000000600ec        0xe /tmp/firmware.elf.D3xoxR.ltrans0.ltrans.o
                0x00000000000600ec                translation10
 .rodata.translation100
                0x00000000000600fa        0x9 /tmp/firmware.elf.D3xoxR.ltrans0.ltrans.o
                0x00000000000600fa                translation100
...
#

@analog bridge ^^

#

but the ones in an espressif build (I only have the 32n8 build built right now) do look like they are 4-byte aligned. Sounds like some compiler flag we don't know about

analog bridge
tulip sleet
#

it's a bit weird

tulip sleet
manic glacierBOT
#

I think we'll want this in a separate module so we can enable/disable it separately from displayio.

I could move it to gifio. Maybe it would be clearer for users to have it in displayio but still make it able to be turned on/off in the build config? I think that's possible.

gifio is good for me. I think its confusing to have parts of a module turn off and on separately from the module as a whole.

tulip sleet
#

@slender iron @onyx hinge there is now an 8.0.x milestone, right now populated with the scorpio fix

manic glacierBOT
#

It looks like this display is using an SSD1681: https://www.good-display.com/product/208.html

We have a CircuitPython driver for it here: https://github.com/adafruit/Adafruit_CircuitPython_SSD1681/blob/main/adafruit_ssd1681.py

The main trick is that you can set ram width >256 but then say this display is only 200 wide. That'll use the two byte form but only compute 200 pixels wide.

#

It looks like this display is using an SSD1681: https://www.good-display.com/product/208.html

We have a CircuitPython driver for it here: https://github.com/adafruit/Adafruit_CircuitPython_SSD1681/blob/main/adafruit_ssd1681.py

The main trick is that you can set ram width >256 but then say this display is only 200 wide. That'll use the two byte form but only compute 200 pixels wide.

I actually tried that before opening this issue... It does not work because the byte order fo...

slender iron
#

@onyx hinge I think the nrfutil thing is that the pc-ble-driver-py switched to "built distributions" from "source distributions" in the older version. I don't know why msys2 pip won't install a "built distribution" though

onyx hinge
#

Probably because there's not one? The msys one would not use the same file as a Windows one if there's compiled code in the mix.

slender iron
#

ah. I don't know what msys is...

manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 8.0.0 on 2023-02-06; Raspberry Pi Pico W with rp2040
Board ID:raspberry_pi_pico_w

Code/REPL

not available

Behavior

when edit 'settings.toml'
directly on the CIRCUIPY drive
using Raspberry Pi OS
editors

      • GEANY
      • NANO

drive vanish & never show up again ( also not under windows )

( must nuke and CP800 again )

Description

the default 'recommended software' Raspberry Pi for PICO ...

cosmic turret
#

Hi, I am looking to load the Adafruit ESP32-S3 TFT( 4 MB Flash + 2 MB of PSRAM) with Micropython but i am not able to find the .bin file for it. Appreciate if anyone can share the file or link. Thanks

crimson ferry
#

you could try the MicroPython Discord or forums (GutHub Discussions) for better support

onyx hinge
slender iron
#

yup

#

there are normal windows releases there

#

but I don't know my windows tooling options

onyx hinge
#

@slender iron in order to move on I'd recommed just not installing it and not trying to build that board on Windows. It's nice if building as many things as possible on windows works, but there's a clear barrier here and it's not affecting many boards

#

and put a documentation note if there's an obvious spot to hang it

#

@slender iron this doesn't affect building nrf boards generally ,does it? I didn't look at the wip

slender iron
#

I think I was lazy and had every nrf also make the dfu package

#

I can switch it

onyx hinge
#

send a request to nrf for a build of the package that installs on msys python πŸ™‚ you never know, they might provide it

#

I wonder if we could build it using a github package location instead of pypi

#

but I don't really want to sink time into finding out

slender iron
#

they deprecated their python version of nrfutil anyway

#

so moving to the newer version is probably the best way to go

onyx hinge
#

pc-ble-driver is the new version of nrfutil?

tulip sleet
orchid basinBOT
idle owl
#

@tulip sleet Where are we with ESP32-S3 and LC709203? The tracking issue is still open, but we thought it was fixed.

tulip sleet
idle owl
#

Ah.

#

OK.

tulip sleet
#

i was still trying (unsuccessfully) for an actual fix instead of doing retries as a workaround

#

it's also the case that the MAXwhatsis needs retries

idle owl
#

Hmm fair enough

proven garnet
manic glacierBOT
#

Hi Mellisa:

Thanks for adding the temporary .md file etc. to circuit-python.org. It
looks like I should be getting my final boards delivered next week. I've
already started working on the description
etc. on my fork of the CircuitPython-org repository. So, the plan is to get
this all wrapped up by next week (hopefully!).

bye for now,

On Mon, Feb 6, 2023 at 5:35 PM Jeremy Littler @.***> wrote:

Hi Mellisa:

If you could hide it for now I would really appreciate it. It won't be f...

orchid basinBOT
#

No, we haven't uploaded assets to GitHub for years. The download stats we use for sorting which boards are most popular are generated by me, using AWS Athena, every time we do a release. That goes into the download counts in the board json.

If you want me to do other queries that update periodically I could, but it would be work to do this dynamically. Generating the download counts for all the boards takes about 15 seconds (and maybe costs about 15 cents). Maybe we should just get rid ...

slender iron
tidal kiln
#

did 8.0 do something to change the left hand offset on pyportal TFT? it's different now. text used to be indented a little more to the right.

tulip sleet
tulip sleet
#

is the change good or bad? πŸ™‚

tidal kiln
#

bad-ish. interferes with pyportal case.

#

one sec. responding. will link forum thread...

tulip sleet
#

@tidal kiln in the 7.3.3 version, would the blinka icon be covered up by the case frame?

tidal kiln
#

yes. a little.

tulip sleet
#

I think maybe the offset was corrected, without realizing the case frame did not go to the edge of the screen. There is probably a sw fix for this. I wonder whether we should just change it on the PyPortal, since we sell that case.

#

Could you open an issue?

tidal kiln
#

sure

tulip sleet
#

there isn't any trick like reversing the direction of the frame is there? :/

tidal kiln
#

no

#

also, there's a hole for light sensor

tulip sleet
#

ok, tnx, too bad

manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 8.0.0 on 2023-02-06; Adafruit PyPortal with samd51j20

Code/REPL

n/a

Behavior

n/a

Description

Left hand edge of display gets cutoff when using the PyPortal with the Desktop Stand case:
https://www.adafruit.com/product/4146

Looks OK with 7.3.3.

Additional information

See related forum thread here:
https://forums.adafruit.com/viewtopic.php?p=959876

timid bolt
tulip sleet
# timid bolt fyi, I updated my async branch with the following interesting changes: https://g...
  1. I copied the CPython code for the asyncio module and started deleting stuff until it worked on CP.
    It's just temporary that you put it here, I assume, but you could fork https://github.com/adafruit/Adafruit_CircuitPython_asyncio and put it in a branch there. We wouldn't store a version in the CircuitPython source tree (even though that's what MicroPython did, and I should just delete that from our fork).
#

I don't really know why they put it in their source tree, since it's really optional.

#

interesting about _asynciomodule.c

timid bolt
#

Yeah, I didn't know where to put it. I should do it as a CP library as you say. I need to work out the workflow with frozen modules/git sub-modules, etc.

tulip sleet
#

i don't think we would freeze it, unless it was on a board that would always use it. It uses up space we want for something else. And we generally only freeze things because there's not enough RAM (e.g. on Circuit Playground Express, with only 32kB).

timid bolt
#

yeah, there is already a module called _asyncio. But I found that out at the very end. So I just changed the name of the module to _loop and kept the source code name as _asyncio. 😊

tulip sleet
#

we can clean that up later. _asyncio is a catchall for C stuff, and it's not to be used by the end user

#

anything with _ like that, like _bleio

#

we don't guarantee those things have a stable API that you should think is a good idea to use

#

could you stuff _loop in _asyncio or does it need to be separate for some reason?

timid bolt
#

I don't think it should necessarily be frozen either, but fwiw Adafruit_CircuitPython_asyncio currently is.

tulip sleet
#

stuff in frozen is not always frozen, it's just available to be frozen. It's only frozen on the boards that want to freeze it. I think some third-party board wanted to freeze it, but we wouldn't have recommended that

#

but their choice

#

neopixel si there so CPX can freeze it, for exampel

timid bolt
tulip sleet
#

you always edit itin the library's repo, and update the submodule commit when it's ready. Everything in frozen/ is a submodule (or maybe nearly eeverything, again maybe some third-paryt weirdness)

#

in the top-levle makefile there is make update-frozen-modules target which brings them all up to date

#

we do that before significant releases

#

MicroPython traditionally froze a few things, but mostly as .py, not .mpy. The pyboard has plenty of flash. The ESP8266 needed a lot of initialization setup. We were much more constrained by internal flash size space on the SAMD21, our first port, so we improved the tooling of frozen modules (FROZEN_MPY_DIRS instead of FROZEN_MPY_DIR). THen later the MPy folks introduced the idea of manifests, which we haven't taken in (yet?).

onyx hinge
#

just one board freezes in Adafruit_CircuitPython_asyncio but we also happen to use it during build-time for testing

#

tests/run-tests.py: base_path("../frozen/Adafruit_CircuitPython_asyncio"), run-tests uses this copy of asyncio preferentially

manic glacierBOT
slender iron
#
Tall, Snarky Canadian

We have some support for .env files in the Python extension for VS Code, but we have noticed some shortcomings with .env files based on user feedback. After getting some inspiration from CircuitPython and thinking about it a bit, I think I might have a nice solution to the problems

#

Shout out to cp

manic glacierBOT
#

Fixes an issue when displayio.I2CDisplay raises an exception because of a bad address for example. The reset pin (if any) remains "never reset" (ironically) and raises a "pin in use" error on subsequent reloads.

Deinits self before raising the exception.
Is this the right way to do that ?

Example code:

import board
import displayio
import adafruit_displayio_ssd1306

displayio.release_displays()
reset = board.D9

i2c = board.I2C()
bus = displayio.I2CDisplay(i2c, device_a...
jaunty juniper
#

what is going on with the CI ??

#

apparently sh 2.0.0 was just published on pypi and changes how sh.contrib works ?

#

the error in the CI is:

Run python3 -u build_release_files.py
Traceback (most recent call last):
  File "/home/runner/work/circuitpython/circuitpython/tools/build_release_files.py", line 30, in <module>
    sha, version = build_info.get_version_info()
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/circuitpython/circuitpython/tools/build_board_info.py", line 61, in get_version_info
    sha = git("rev-parse", "--short", "HEAD").stdout.decode("utf-8")
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'stdout'
Error: Process completed with exit code 1.

like sh.contrib.git(...) now returns a string ?

manic glacierBOT
#

Due to today's release of sh 2.0.0, the CI fails in build_board_info.py
see https://github.com/adafruit/circuitpython/actions/runs/4140380646

Run python3 -u build_release_files.py
Traceback (most recent call last):
  File "/home/runner/work/circuitpython/circuitpython/tools/build_release_files.py", line 30, in 
    sha, version = build_info.get_version_info()
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/circuitpython/circuitpython/tools/build_board_...
manic glacierBOT
manic glacierBOT
#

CircuitPython version

8.0.0 on Waveshare RP2040-Zero
8.0.0 on Luatos Core ESP32C3

Code/REPL

#
# This code freeze the board when run after second REPL restart / after code.py autoreload
#
def gen():
    while True:
        yield 0


while True:
    g = gen()
    print(next(g))
    g.close()

Behavior

The bug occurs after restarting the Python machine. Just after reset / boot code works well. The second run freeze the board.

Descrip...

manic glacierBOT
analog bridge
#

@tulip sleet what should the directories look like in #7534

tulip sleet
#

the names don't alphabetize well, with "static" and "amd64" first rather than last in the filenames

#

maybe just changing the order of the modifiers would help enough

#

mpy-cross-<version>-<os>-<architecture>, maybe

#

mpy-cross-<os>-<architecture>-<version> is probalby better

#

"raspbian" is now an outdated name.

#

I can put older stuff in "OLD/", and or I can rename the current files as well

analog bridge
#

cool... i am doing some tweaks and i can get it in

#

mpy-cross-<os>-<architecture>-<version> looks good

tulip sleet
#

thanks for doing this

manic glacierBOT
#

If an exception's chain or context can refer to a pointer from a different VM, a crash would typically result.

This couldn't turn up on UNIX testing because the VM is never torn down and rebuilt like it is on hardware.

Testing performed: Ran the original reproducer on a Feather RP2040 Scorpio and verified the reported behavior. Ran with the fix and it no longer reproduced.

While I think that WatchdogException could have led to similar behavior, and made fixes for this, I didn't test ...

#

Warning, my knowledge on C and board internals is sevely limited, take the following data with a large chonk of salt.

It seems pystack cannot be configured in runtime. In it's current form at least.

Starting from main.c:125:

#if MICROPY_ENABLE_PYSTACK
static size_t PLACE_IN_DTCM_BSS(_pystack[CIRCUITPY_PYSTACK_SIZE / sizeof(size_t)]);
#endif

This is the first reference of _pystack, this symbol is not present in any other files. (ctag were used)
Wikipedia says bss i...

tulip sleet
onyx hinge
#

@tulip sleet do you want me to add it to that PR I just opened? it should be easy

tulip sleet
onyx hinge
#

how's that look @tulip sleet ?

tulip sleet
onyx hinge
tulip sleet
jaunty juniper
#

should I move #7563 to 8.0.x ?

tulip sleet
#

thanks

#

don't do it until I merge Jeff's PR, to pick up the sh 2.0.0 thing

#

I"m re-running failed jobs in 7563

jaunty juniper
#

ok

manic glacierBOT
timid bolt
#

@onyx hinge what does the '0' signify in mp_obj_exception_initialize0?

onyx hinge
#

@timid bolt hm maybe I should rename it. Initially I wrote a function which received the "args" object (and was named without the "0"), then i noticed I was frequenty passing the empty argument tuple so I created the "0" variant that passed the empty arg tuple to mp_obj_exception_initialize. (this probably saves a few bytes of code, though I didn't measure) Then I ended up with the only caller to mp_obj_exception_initialize being mp_obj_exception_initialize0 so I removed mp_obj_exception_initialize.

#

at best the 0 is very unclear

#

but 0 meant "empty argument tuple", basically

timid bolt
#

general point: I've been bitten a lot by this "re-initialize after reset" problem too. It is somewhat of a bug farm. Some exploratory questions:

  1. do we really need soft reset?
  2. is there a more systematic way we could address the problem? (e.g., re-zeroing bss on soft reset)
manic glacierBOT
#

Next we go to main.c:162:

#if MICROPY_ENABLE_PYSTACK
mp_pystack_init(_pystack, _pystack + (sizeof(_pystack) / sizeof(size_t)));
#endif

So it seems to init the stack here. So this means the allocation is here, right? No.

This is what we'd have to change. We'd need to make it use a supervisor allocation instead because that'd be dynamic. The heap is already done this way (except it takes all remaining space.)

#

@bill88t Currently _pystack is a statically allocated array stored as a global. ("bss" is the name of the section of memory that contains zero-initialized global variables. (idk why it is called bss))

You need to change _pystack to be just a pointer and then dynamically allocate the array before mp_pystack_init is called. As @tannewt suggests, it would make the most sense to allocate this memory from the supervisor heap. That will involve a bit of refactoring moving things between `m...

manic glacierBOT
#

@tannewt
no, no RESET connected / used

and it not looks like accidental, the PICO_W ( with CP800 ), more like bricked 4 times in a row with GEANY
2 people same project different continents
use / 3 RPI / 3 PICO / several USB cable / 2 win PC ( for check if CIRCUITPY drive come up there later? but NO )

at save of 'settings.toml' PICO should just restart like with every file-change ( *.py usually done by MU editor )

inhowfar that file is treated differently ( from code.py... )

a...

slender iron
manic glacierBOT
timid bolt
#

just for argument's sake, what is the advantage of soft reset over hard reset? (assuming there is always only one vm)

tulip sleet
#

display would get cleared

#

any state you wanted to maintain across VM's would not be possible

timid bolt
#

ok makes sense, I wasn't familiar with those features

manic glacierBOT
crimson ferry
tulip sleet
#

i'm not sure sleep memory is maintained after a hard reset (button push)

#

it could vary

crimson ferry
#

I was just wondering whether other things besides sleep memory are designed to live across reloads

#

(other than what you listed above: workflow, display, USB)

manic glacierBOT
#

I have started working onto it on another branch https://github.com/bill88t/circuitpython/tree/settings-toml-pystack
Currently it does not work, and I have no idea why, I have plugged the debug pins and with openocd & gdb I see it's stuck in enable_interrupts.

I will switch the PR branch to that once it's somewhat working..

Progress:

  • [ ] Allocate dynamically
  • [ ] Test if alloc is good.
  • [ ] Fetch value from settings.toml
  • [ ] Convert value to a multiple of stack frames.
blissful pollen
crimson ferry
#

I guess that would only apply across a reload, and not during a reset (?)

stuck elbow
#

nvm survives reset

crimson ferry
#

I'm trying to figure out what state survives reload, haven't found any consolidated docs about that

#

(re: reset... my assumption has always been that microcontroller.reset() is roughly equivalent to pushing the reset button, with caveats for deep sleep)

stuck elbow
#

there is a bit of state surviving, because you can reset to a bootloader

timid bolt
#

If this is related to my earlier question, by soft reset I mean ctrl-D. Afaik microcontroller.reset() does a hard reset.

crimson ferry
#

yes, reload vs. reset

#

it's a little clearer (to me) what survives reset vs what survives reload

crimson ferry
timid bolt
#

the stuff danh mentioned is for surviving reload (soft reset). Nothing really survives reset (hard reset) except non-volatile storage (i.e., the flash).

crimson ferry
#

microcontroller.on_next_reset survives reset (as deshipu noted)

#

I'm not sure about the onboard rtc across ports

jaunty juniper
#

it might be that that kind of reset is doing the action of going to bootloader, rather than resetting and remembering that it had to go to bootloader ?

crimson ferry
#

yeah, I don't know those mechanisms

jaunty juniper
#

things that are setup through supervisor will survive reload, the previous traceback is saved somewhere, set_next_code_file, etc.

crimson ferry
#

that's a good distinction (supervisor)

#

a bit confusingly though... ports/{port}/supervisor/port.c has a lot of the reset behavior

timid bolt
#

Could someone point me to why there are only a fixed number of sockets? The only reason I could find is open_socket_objs in Socket.c, however I think this could be made into a dynamic array.

crimson ferry
#

afaict, it's a memory thing. the CYW43 driver defines 8 (but we don't really get 8 currently into userland - there's an issue for that), espressif has a compile flag

#

in espressif, sockets use onboard espidf memory, competing with pystack, monitor, AP connections, possible future ble features, etc (there are a number of related issues and PRs)

#

[outside the core, wiznet limits sockets to 4 (W5100S) or 8 (W5500), and ESP32SPI / Airlift has a limit of 10 in the NINA firmware]

crimson ferry
#

raspberrypi does not

timid bolt
#

I'm not familiar with the ESP ports. So does ESP-IDF == FreeRTOS + ESP SDK? Is that how the esp ports of CP run: with ESP-IDF on top of an RTOS?

crimson ferry
#

I think that's a fair characterization

manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 8.0.0-beta.6 on 2022-12-21; Raspberry Pi Pico with rp2040

Code/REPL

some parts of code
.....
display = ST7789(display_bus, rotation=270, width=320, height=240, backlight_pin=board.GP20, backlight_pwm_frequency=500)
.....
display.brightness = 0.001
time_alarm = alarm.time.TimeAlarm(monotonic_time=time.monotonic() + timeInLightSleep)
pin_alarm = alarm.pin.PinAlarm(LORA_INT, value=True, pull=True)
alarm.light...
tulip sleet
manic glacierBOT
timid bolt
#

was the presence of FreeRTOS useful or interesting when porting CP to Espressif?

tulip sleet
#

but only in a limited way, for some monitoring tasks. THere is one major CPy task

#

we also had to find and fix bugs due to some assumptions ESP-IDF had inadvertantly made about what ran in which task and on which CPU (on the dual-CPU chips). Scott found those at least twice, I think.

#

they were PR'd upstream

manic glacierBOT
onyx hinge
#

(I wonder if there is some invalid content or filesystem condition that causes an exception to be thrown outside the vm or otherwise create an unexpected failure condition; that could land you in a boot loop or otherwise 'bricked'-ish device)

#

(we SHOULD be working at a level without the possibility of an nlr exception but you never know)

manic glacierBOT
#

@dhalbert

Geany and Nano are both known to not flush the whole file out immediately to CIRCUITPY, and are disrecommended for that reason.

so until there is a MU editor on RPI what is able to edit 'settings.toml'

you recommend ? THONNY ?

or you say the file should be edited OFFLINE and copy to CIRCUITPY ?

resources show no info about that file handling:
https://docs.circuitpython.org/en/latest/docs/environment.html
https://learn.adafruit.com/scrolling-countdown-timer/c...

manic glacierBOT
#

Some recommended editors are here: https://learn.adafruit.com/welcome-to-circuitpython/recommended-editors#recommended-editors-3104731. Can you use gedit? If it's not installed already on the RPi, you should be able to apt install it. VS Code is also fine, but is more complicated.

or you say the file should be edited OFFLINE and copy to CIRCUITPY ?

That could also be done. When copying, do a sync immediately afterwards to insure the file was fully copied, e.g.

$ cp settin...
brazen hatch
#

It still ain't booting, but at least I am able to debug it.

#

I am trying to have it boot with a dynamic alloc instead of the bss thingy that it was.
Once that is done, the rest should be easy.

#

though I do not quite understand how the original allocation worked so it's all a guestimation.

brazen hatch
#

rp2_common still seems to expect _pystack to be in bss

manic glacierBOT
#
(gdb) watch _pystack
Hardware watchpoint 6: _pystack
(gdb) r
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x00000178 msp: 0x20041f00
[New Thread 2]

Thread 1 received signal SIGTRAP, Trace/breakpoint trap.
bss_fill_test () at sdk/src/rp2_common/pico_standard_link/crt0.S:252
252         bne bss_fill_loop
(gdb) s
bss_fill_loop () at sdk/src/rp2_common/pico_standard_link/crt0.S:249
249         stm r1!, {r0}

It seems the code still expects ...

manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

Made a script to check how well stackless performs with random allocs and massive recursion combined.
The intention is trying to making it fail to alloc and hardcrash.

from os import urandom
import board
import digitalio
led = digitalio.DigitalInOut(board.LED)
led.direction = digitalio.Direction.OUTPUT
led.value = 1

# Edit
cap = 1000 # Max possible target level


# Do not edit
limit = 100000 # Stop when you have done a total of 'this number' allocations
allocs = 0 # Cur...
manic glacierBOT
stuck elbow
#

so it's official, pi cow has bluetooth now

solar whale
#

Is it now recommended to use "settings.toml" to set all of the things we used to do via "secrets"? for example. to access my AIO username and key should I set them in settings.toml and then retrieve them with os.getenv?

#

Is the "settings.toml" file processed for all boards?

languid whale
stuck elbow
languid whale
stuck elbow
#

yes

crimson ferry
#

@solar whale Unofficial answer: yes I believe so, though there are so many examples out there with secrets.py. My take: settings.toml is useful for pre-boot.py values and for the ease of os.getenv(). But it doesn't bring in Python objects, so it can be more work, especially for more complex data. My personal strategy is to stick to pre-boot.py use, and put the rest in a .py file (or download it).

teal thorn
#

If I want to add support for another Arduino board, what would be the recommended source for VID/PID numbers? The MKR Vidor is very similar to MKR Zero. Fairly straightforward port, just need new IDs. Should I request from PID.codes?

tulip sleet
teal thorn
#

The SD card pins become JTAG pins. Might eventually include different libraries for FPGA.

tulip sleet
#

certainly noticeably different, got it

manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
tender canopy
#

Hi, im having issue with BLINKA_U2IF vs BLINKA_FT232H, epd gives error on U2IF - SPI write_readinto Not implemented

#

example based on

#

So works fine on FT322H but not PICO

#

GC9A01A round display works but only without RESET line defined (No picture with reset)

#

SDD1327 without reset no good picture showing at all

manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 8.0.0 on 2023-02-06; SparkFun Pro Micro RP2040 with rp2040
Board ID:sparkfun_pro_micro_rp2040

Code/REPL

> sudo fatrace -c
md5sum(141934): RO /run/media/user/KEYBOARD-L/code.py
md5sum(141934): C /run/media/user/KEYBOARD-L/code.py

Behavior

Code stopped by auto-reload. Reloading soon.

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.

Description

_No ...

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

This guide is MQTT-specific, and could be confusing since it also includes Airlift instructions, perhaps not the best example. Unfortunately, I'm not aware of a generic native wifi Learn Guide. There are some for other specific applications like HTTP Server, AdafruitIO, etc. There are native wifi pages mirrored in the primary guides for various wifi boards, e.g., https://learn.adafruit.com/adafruit-qt-py-esp32-s2/circuitpython-internet-test

manic glacierBOT
#

Could you explain the scenario? Did you do any writes slightly before this auto-reload? Or was the board quiescent for a long time?

Auto-reload is triggered when a write command comes down from USB. The code waits 0.75 seconds after the last write received before triggering an auto-reload, to allow multiple writes in quick succession.

So something is arriving from the host that is a write. The way to check this would be to use wireshark or similar to see what is actually arriving.

Th...

manic glacierBOT
#

I'm sorry, I meant "last accessed time", not "last modified". I've modified my original comment. I would expect the OS to try to update that metadata after each open on the file.

Minimally reproducible scenario:

  • Unplug, re-plug the board.
  • Open Mu and connect to serial console.
  • The drive label has been changed to something else than "CIRCUITPY", so Mu is not able to interfere with the drive.
  • Wait for a while: nothing happens.
  • cat /path/to/drive/code.py.
  • After a few s...
manic glacierBOT
#

I tried to reproduce this on Ubuntu 22.04. My code.py is just the print("Hello, world!") you get on a fresh filesystem.

I did not rename the drive. I connect to the board either with Mu or with tio /dev/ttyACM0. I see "Auto-reload is on..." Nothing happens. I cat /media/halbert/CIRCUITPY/code.py. Nothing happens after that.

So something is happening on your particular system that is causing a write. Do you have any indexing programs or other scanning utilities running? Do you see ...

ruby walrus
#

Is there a way to see the human readable source code for the built in libraries in Circuitpython? I am building an MP3 player on a pico and I would like to improve the bit rate and other things that might require me to view the source code for built in libraries such as audiobusio and audiocore. I did not see any of the built in libraries in the Python Source Bundle.

manic glacierBOT
#

I tried to get this to happen from Debian 11 on my Sparkfun RP2040 Thingplus but rather than Mu, I used tio as the terminal. I'm not auto mounting the CIRCUITPY drive so I manually mounted after plugging in the board.

I couldn't get the reload to occur by just performing the cat /media/user/code.py but the board did reload when I perform the mount or unmount. I also noticed that the reload only occurred if I had a python script running. If I was at the REPL prompt mount/umount did not caus...

wraith crow
#

@ruby walrus I suspect the audio libraries you're looking at are not frozen python libraries but implemented in C++.

ruby walrus
#

C++ is fine. Do you know how I can look at the code.
Is been my experience that most other languages let you inspect the contents of all their libraries.

wraith crow
#

There doesn't seem to be many of the Adafruit folks on tonight, but if you have questions or want specific help this is the right place to ask about those modules.

manic glacierBOT
manic glacierBOT
blissful pollen
# ruby walrus C++ is fine. Do you know how I can look at the code. Is been my experience that...

I do believe all the mp3 stuff is built in. You can find most of it: https://github.com/adafruit/circuitpython/tree/main/shared-bindings/audiomp3
and
https://github.com/adafruit/circuitpython/tree/main/shared-module/audiomp3

Some other audio library information is port specific so you would find it in:
https://github.com/adafruit/circuitpython/tree/main/ports/PORT/common-hal (replace port with the specific family)

manic glacierBOT
orchid basinBOT
#

I think updating the page to dynamically read the boards.json file via JavaScript should be possible and likely not too difficult. Automatically regenerating as static page via adabot or some similar mechanism doesn't seem practical since there would be a new PR every day that somebody would need to merge. I think the nature of this issue is as the title states the page is broken and it should just be redone if it's useful for people. I imagine something like this shouldn't take more than a c...

slender iron
#

Hey <@&356864093652516868> , the pinned message says the meeting is today but the calendar says tomorrow (due to Lincoln's brithday in the US). Any objections to doing it today (in 2ish hours) and ignoring the calendar? I suspect that's what we all expected.

blissful pollen
#

I thought it was today so no problems here

lone axle
#

Same here, today is good for me.

slender iron
#

πŸ‘

storm minnow
#

Wait, today is a holiday?

slender iron
#

according to the calendar πŸ™‚

#

not sure where we get the holiday data from

proven garnet
#

I wish every Monday was a holiday

#

Oh, @lone axle - the CI update to specify the Python version is ready if you want to use that for your PyGameDisplay library.

storm minnow
thorny jay
slender iron
#

ya, next week's meeting is shifted

thorny jay
slender iron
#

You've got time.

lone axle
#

And thank you for working on that configurability!

storm minnow
proven garnet
blissful pollen
#

@lone axle in case you were wondering I did get the party parrot gif going. Long story short every frame have to blank the background (plus the alignment issues). There was an issue on the AnimatedGif library talking about it. You can solve it but memory or CPU time go up a lot

proven garnet
#

You can use that python-version argument for the build and both release actions

lone axle
#

I wonder how hard it would be to make a script to "fill in" the transparency with some color on each frame.

blissful pollen
#

It's not even the transparency (which should work). It is the disposal method. If set to "2" the decoder is supposed to draw the GIF and then restore the background before drawing the next frame.
If you overwrite that pixel in the next frame - doesn't matter. But if the next pixel is now transparent the previous pixel matters. But now you have to buffer almost 3 frames of data

blissful pollen
lone axle
#

Oh interesting, I was thinking of modifying the source gif. If it could be an argument in code to replace it with another color that would be very convenient too.

blissful pollen
#

You can modify the source GIF too I think. ezgif I think has an option like that

errant grail
#

Does the GIF use a displayio.Palette? If so, it could be manipulated as well.

blissful pollen
#

No it doesn't. Most GIFs change the palette frame to frame.
It would be possible to add a new mode to not preconvert and have a bitmap with a palette but not sure on the speed of that.

#

As I poke deeper into displayio there are a lot of speed vs memory type choices. Been thinking of ways more of the choice could be given to the user, without bloating the code too much

errant grail
#

Perhaps disable the palette extraction phase after the GIF’s initial frame palette is determined, keeping only a single palette? Could that reduce some of the cycles needed per frame?

blissful pollen
#

The GIF palette itself changes frame to frame so the code would have to update the displayio.Palette object every frame still.
But I'll admit I didn't look too closely at that processing

errant grail
#

Hmm. I wonder how often the frame palette content actually changes during an animated GIF. Don’t think that any I’ve created have changes frame to frame. Will have to take a look.

idle owl
#

@blissful pollen Is the In the Weeds topic yours? (There's no name on it. πŸ™‚ )

blissful pollen
idle owl
#

No worries! We're not there yet anyway πŸ˜‰

idle owl
#

I need to miss today's meeting. Would have had to miss it tomorrow as well if we moved it, so nothing lost. πŸ™‚

manic glacierBOT
idle owl
slender iron
#

I can. No problem

idle owl
#

Thanks

slender iron
#

brb

manic glacierBOT
stuck elbow
thorny jay
#

Listening only. (is someone speaking yet? I only get beep from discord when someone join)

tulip sleet
#

nobody talking yet

thorny jay
#

Perfect thanks

lone axle
#

😼

midnight ember
#

good luck trying to silence a cat

analog bridge
#

ya, I haven't spoken for quite a while πŸ˜…

still zephyr
#

same

lone axle
turbid radish
thorny jay
#

That Tulip CC looks pretty much like my #CP2021 and #CP2023, but in MP rather than CP.

gilded cradle
#

Just a moment...

#

go ahead and read it

#

I think I fixed audio. Discord changed sources on me.

onyx hinge
midnight ember
#

M7 πŸš…

#

a rotary encoder mouse, neat idea!

onyx hinge
#

seems that David's jiggler moves in an octagonal pattern: list = [(0,1), (1,1), (1,0), (1,-1), (0,-1), (-1,-1), (-1,0), (-1,1)]

#

(note: pylint probably wouldn't like using list as the name of a variable, since it is replacing a built-in)

blissful pollen
#

I've also had to build in a screwdriver slot to pry parts apart before

onyx hinge
#

my parts never fit that exactly. 😬

midnight ember
#

circuit python plant guides coming? i'd love to see that.

blissful pollen
midnight ember
gilded cradle
#

Thanks

midnight ember
#

CI efficiency updates nice!

thorny jay
#

Keep multi language for the "release" and alpha and beta, ...

#

" randomly add one language at each PR"

#

"randomly" could be a selected sequences.

manic glacierBOT
midnight ember
#

That kind of policy sounds aimed more towards small/tiny projects and not major projects. Seems geared to avoid excessive forking of popular smaller projects.

midnight ember
#

Yeah that's a big decision that's an Adafruit Folks and company level thing.

analog bridge
#

Thanks! πŸ™‚

midnight ember
#

Thanks for hosting @slender iron ❀️

lone axle
#

Thanks Scott for hosting!

ember iris
#

Thank you all! That last topic was properly in the weeds! Hope everyone has a great week

midnight ember
#

Great discussions, lot of cool stuff happening in 2023. πŸ™‚

digital shoreBOT
midnight ember
#

Looking forward to playing with pysigrok someday.

idle owl
idle owl
ornate breach
slender iron
#

Here is the notes document for next Tuesday's CircuitPython Weekly meeting. It is 24 hours later than normal at 11am Pacific / 2pm Eastern on Tuesday the 21st here on Discord. Everyone is encouraged to attend! Please add your hug reports and status updates even if you’ll be attending the meeting - it’s super helpful! If you are unable to attend but would still like to include updates, feel free to include them in the notes and we’ll read them off during the meeting. Hope to see you there! <@&356864093652516868>
https://docs.google.com/document/d/1CmvwiKPFPOibcQyH-xomxXlqLq3m5JrL8zcmr3qE5Qw/edit?usp=sharing

proud ember
#

I just learned that CircuitPython code can be updated over Wi-FI on supported devices. (That’s awesome BTW!). The guide says it needs to be connected to a network with internet access to work. Are there plans to have a workflow where the CP device acts as an access point so the updates are as portable as from a USB cable?

Sorry if this is the wrong place to ask

slender iron
#

@proud ember we are hearing folks want that. I generally dislike using AP mode but it shouldn't be too hard

#

It can work on a network without internet but it doesn't currently support if the ESP is the AP

midnight ember
#

Are you talking about firmware updates or workflow? They're easy to confuse the two.

slender iron
#

this is the best place to ask

proud ember
proud ember
midnight ember
#

That would be part of the wifi workflow which I thought could run locally without the need for an internet connection.

slender iron
#

only /code/ needs internet

#

web workflow won't start the AP automatically but might be on that interface already. I haven't tried it

midnight ember
#

is web workflow and wifi workflow 2 different things?

#

i have yet to try either :/

slender iron
#

no, I think of them as the same

jaunty juniper
#

I don't think "wifi workflow" is a thing

midnight ember
#

ohhh

slender iron
#

its web workflow but only over wifi now πŸ™‚

midnight ember
#

got it

slender iron
#

k, lunch time for me

jaunty juniper
#

it is possible to make your own custom way to update files automatically or manually by running a server on AP that would replace a local file that main imports for example

#

I want to see a library for that, that people can just setup and call in a loop

midnight ember
#

could you setup an esp to both act as the server and AP? that would be interesting.

jaunty juniper
#

yeah python code, like httpserver, should work in client or AP mode

midnight ember
#

entire local network on a chip, neat.

sick creek
#

maybe you can

jaunty juniper
#

also testing AP mode is really really annoying πŸ˜›

crimson ferry
proud ember
jaunty juniper
#

well, you need a computer that connects to the AP to do the tests, the AP goes away when the board reloads since it's not implemented in settings.toml (yet), which might force you to reselect it manually every time, and your computer might not have internet access during that unless you have also an ethernet cable or something

#

but that's just when testing AP mode, most of the dev time you can be in station mode

crimson ferry
#

and the CircuitPython IP address is 192.168.4.1, and that may conflict with your LAN, so you may not be able to have Ethernet enabled on your computer

brazen hatch
#

I still plan on better implementing picow wifi stuff, but I really am out of free time.
It's buried down in my tasks list right besides the esp32-c3 serial issue

crimson ferry
#

realizing we may be limited by the cyw43 driver

brazen hatch
#

yea I plan on reading the source directly to figure out what to do

#

rpi docs really do not help here

crimson ferry
#

my sense is that the Pico W SDK is not as mature and granular as espressif

brazen hatch
#

Eh, it's still not even a year since picow was released

#

I presume in 2-3yrs it will be equally as mature.

#

The problem is than no other boards may utillise it.

#

rp2040's are used everywhere, but that wifi chip, only on picow

crimson ferry
#

is that right though? you can buy the wifi module, and I read the license on the driver and it allows other use

jaunty juniper
#

but does anybody ?

crimson ferry
#

not that I know of

jaunty juniper
#

Father RP2040 W when ? 😬

crimson ferry
#

that would be nice

brazen hatch
brazen hatch
#

the granddad of picow

crimson ferry
jaunty juniper
#

well now I have to leave the typo in, thanks πŸ˜›

brazen hatch
#

jokes aside, a esp01 + sdcard hat for the pico form factor would be very powerful
I may make it in the summer

slender iron
#

thanks for trying it @crimson ferry. it doesn't seem like it'd be that much work. πŸ™‚

crimson ferry
#

it might work if starting AP was a settings.toml

manic glacierBOT
jaunty juniper
#

having a way to start/stop the web workflow manually (that sticks on reloads) could allow for network hopping, and also double as a security feature (start the workflow on button press)

#

ah but that would also require making wifi connection stick during reloads too

brazen hatch
#

well if setting.toml stuff run on every reload it really shouldn't be an issue

jaunty juniper
#

(which, I think is a feature we should have btw, settings.toml is too static)

crimson ferry
#

if web workflow is on, I think the connection lives across reload

#
KeyboardInterrupt: 
Code done running.
Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 8.0.0-rc.1 on 2023-01-30; Adafruit QT Py ESP32S2 with ESP32S2
>>> import wifi
>>> wifi.radio.ipv4_address
192.168.6.179
jaunty juniper
#

what I'm saying is, if you wifi.radio.connect() to a different ssid, I don't think it sticks on reload ?

crimson ferry
#

ah, right

brazen hatch
#

sounds like something in need of a rewrite to me.
It feels like it should connect exactly the same way as setting.toml wifi stuff does

#

init'ing connection and web_workflow

#

there is no reason or benefit for the code to be different.

#

well, maybe there is actually.. not all ports that have wifi have web-workflow

#

but that could be solved by a simple #else

crimson ferry
#

you mean non-native esp32spi?

brazen hatch
#

Oh I was talking about the wifi module connections?

crimson ferry
#

I was wondering which wifi port didn't have web workflow

brazen hatch
#

Oh idk. I just assumed there are some

jaunty juniper
#

the thing is, in CP it's unusual to make things in python be persistent between reloads, but wifi access is worth it IMO, and is basically already there, it just needs python access to the feature

brazen hatch
#

just how picow was a bit ago

brazen hatch
idle owl
# ornate breach Is this the same for other RGB that Adafruit carries ?

No idea, I only checked the DotStars. This is because they're the only ones that Adafruit carries that have fully-white LEDs, vs RGBW, which isn't enough brightness on the white for it to work, as far as I know. So if I'm already using the white DotStars, I might as well be using the RGB ones as it will be easier to wire up.

idle owl
ornate breach
#

Ah okay, cool! I’ll dig up the sk6812 data sheet as that’s what I have laying around

timid bolt
#

web workflow (aka supervisor) and "code.py"/repl (aka python vm) are strangely independent consumers of the same wifi resource. So it would be weird if their wifi settings are in conflict. The supervisor gets its wifi settings from settings.toml at hard reset. The vm gets its settings from whatever is passed to wifi.radio.connect. I think the most predictable behavior is if the vm has to agree with the supervisor. So if web workflow is turned off, the vm can connect to anything. However if web workflow is on, the vm can only connect to the same wifi as in settings.toml (which is a no-op) and connecting to any other wifi is an error.

slender iron
#

@tulip sleet I think it could be a "how to port" guide

#

and contain links to the test examples

#

though we should have them in the cp repo

tulip sleet
#

not much there; I started doing it one way (more board-specific), but was asked to make it more general

slender iron
#

interesting that its very test structured

#

I wonder if we could automate it by pairing with a known good port/board

tulip sleet
slender iron
#

or I could use this pysigrok code and have it logic analyze on the other side

tulip sleet
#

I thought I was going to write a test for each and every pins, etc, but was asked to test basic functionality instead (does I2C work, etc.?). At least I think that's what I remember

manic glacierBOT
#

Fixes #5956.
Fixes #2694.

  • Add safemode.py, which is executed first, before boot.py, but only if the board has been reset due to going into safe mode.
  • safemode.py has no access to USB. Its output is not written to boot_out.txt, unlike boot.py, to minimize possible problems. If safemode.py exits normally, the safe mode will remain in effect, and boot.py and code.py will not be executed. The safe mode reason will be reported in the console as usual.
  • safemode.py ca...
manic glacierBOT
#

Will the safe mode reason persist into boot.py and code.py?

You can't enter boot.py or code.py if you are in safe mode, so that is moot. But if you get into the REPL, then supervisor.runtime.safe_mode_reason is preserved.

Will microcontroller.ResetReason change as a result of entering safe mode before boot.py, it's almost like a reset to enter safe mode then boot.py (?)

Will supervisor.RunReason continue to show as STARTUP?

ResetReason and RunReason are ...

#

maybe set a flag on disk in safemode.py, and clear it in boot.py (after the microcontroller.reset()).

You might able to use SleepMemory for this, even without alarms. Or nvm might work, if you don't get into some tight loop that writes flash too often. I have thought about some kind of nvm-ish thing that's just a block of RAM (special in a hardware sense or not) that's preserved over resets. On some ports that's how SleepMemory is implemented, but SleepMemory could also b...

#

So I misunderstood what COMPLETE_MEMORY_READS was doing and clearly over used it in the update for the zero w. I've pulled all the calls I added for that update out and I'm testing it now. The only one remaining that I added was at the very end of the code just before the PWM function of the pin is turned off. I feel like that one might be needed but I guess I'll do some tests.

crimson ferry
#

after a UF2 is loaded (espressif), time.localtime() seems to be randomized / undefined (rather than 2000 01 01, as after a reset), and can be outside the representable limits of time.mktime() - is this expected?

jaunty juniper
#

when it restarts after dropping a UF2 ? I wonder what could possibly cause that !

crimson ferry
#

yes, and I don't recall that happening until recently (it started triggering an exception due to some time processing I do in boot.py)

jaunty juniper
#
struct_time(tm_year=1943, tm_mon=1, tm_mday=27, tm_hour=3, tm_min=46, tm_sec=46, tm_wday=2, tm_yday=27, tm_isdst=-1)
#

that is unexpected !

crimson ferry
#

I don't think it used to do that

crimson ferry
#

espressif keeps time across microcontroller.reset, so some execution path is different from that

manic glacierBOT
onyx hinge
#

https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/check-your-code#workaround-for-pre-commit-issues-on-ubuntu-and-debian-3086216 @tulip sleet I think that they eventually put in a workaround for this within setuptools, it might be worth checking whether the section is still necessary .. or maybe it's better to leave it because someone might still have an affected version on some system they're using

Adafruit Learning System

Share your code with the world

tulip sleet
# analog bridge

That is neat -- circuitpython/tools/convert_release_notes.py may want to recognize this.

manic glacierBOT
#

While trying to undo safemode.py on a board this morning, I realized that my safemode.py was catching USER safemode, which is when you press the reset button during boot to deliberately going into safemode.

One solution to this is to not run safemode.py if it's a USER-initiated safe mode. The other is to assume that safemode.py is going to let that safe mode pass through. Any opinions?

halcyon breach
#

Is there any relationship between the circuitpython and micropython i2s systems? Seems like they were developed at about the same time?

tulip sleet
manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 8.0.0 on 2023-02-06; ESP-C3-32S (2M)
Chrome + Adafruit ESPTool
Thonny 4.0.2

Code/REPL

# no code yet

Behavior

I tried several different languages versiona of the ROMs and it appears to be the same for 8.0.0
But when I turned to 7.3.2, it worked as expected.
I use Chrome and Adafruit ESPTool for burning and Thonny as serial monitor. when the device boot up, LED blinked as expected, but then the seri...

halcyon breach
#

I was trying to understand how to extend the circuitpython implementation to do 32-bit-per-sample i2s, it's tricky

tulip sleet
#

which chip?

#

we have enough trouble getting non-glitchy audio in some circumstances. Higher-resolution audio did not seem like a high priority

#

are you trying to do high-fidelity, or are you using I2S for some non-audio data purpose?

#

there are clicks and pops sometimes at start and stop; we would like to address all this, but it probably requires a revamp of audio handling in general

halcyon breach
#

I noticed the micropython version has its own 256-sample DMA buffer, and the circuitpython one seems to be a little more abstracted. All I wanted to do was to bit-shift the audio to do volume control. Using the RP2040 and soon the ESP32C3 plus the MAX98357A DAC. Since the ARM chips tend to have a single-cycle multiplier, you could multiply the samples before copying them into a DMA buffer to do all the necessary bit shifts or overall volume control. (I opened an issue to propose this)

manic glacierBOT
orchid basinBOT
crimson ferry
#

anyone know what this may indicate?```
boot.py output:
...

#

it's not something I'm explicitly printing

onyx hinge
#

@crimson ferry ```c
#ifdef CIRCUITPY_BOOT_OUTPUT_FILE
if (boot_output != NULL) {
// Ensure boot_out.txt is capped at 1 filesystem block and ends with a newline
if (len + boot_output->len > 508) {
vstr_add_str(boot_output, "...\n");

crimson ferry
#

thanks!

onyx hinge
#

if there are good reasons the cap can probably be increased.

crimson ferry
#

didn't have \n

#

I don't have a strong preference, the cap is easy enough to work around at that level, can write to another file

onyx hinge
#

also note how it doesn't try to print the partial message, so if you're printing just one large thing that comes to a single call in mp_hal_stdout_tx_strn it'll just get turned to "...", not the first ~500 character and then "...".

crimson ferry
manic glacierBOT
#

Build artifacts are here: https://github.com/adafruit/circuitpython/actions/runs/2032460774. Click on the lilygo "Details" link above, then click on "Summary", and then scroll down.

These have expired and are no longer downloadable, is there anyway to get this?

Pushing an empty commit should trigger a rebuild.

It appears LilyGo won't provide a PID, @raspberrypi said LilyGo is the only one that can request it from them but they'd look into it.

It sounds like @tannewt is o...

orchid basinBOT
manic glacierBOT
#

One solution to this is to not run safemode.py if it's a USER-initiated safe mode.

I implemented this on the latest commit, because I believe the expectation would be that user-initiated safemode should prevent anything from running, so you can do code repair. Also documented this.

The README.rst could use more work in long run to make it more comprehensive. It sometimes takes a "this is different than MicroPython" viewpoint, and should probably stand on its own. (That's true ...

onyx hinge
#

so that print("x" * 1024) in boot.py will print ~500 "x" then "...\n"?

#
        if (len + boot_output->len > 508) {
+           vstr_add_strn(boot_output, str, ??? arithmetic ???);
            vstr_add_str(boot_output, "...\n");
tulip sleet
#

yes, somethign like that, or maybe even say [truncated due to length].

#

perhaps I even meant to do that when I wrote that code

onyx hinge
#

oh I suspected that I wrote that code

#

I didn't check who it was for sure

tulip sleet
#

maybe you did πŸ™‚

onyx hinge
#

did we discuss the selection of the 1-block maximum? I'm not actually sure the motivation.

manic glacierBOT
#
  • write any partial message
  • instead of "..." show a sensible (translatable) message

This does slightly lower the amount of data that can be printed, and makes the exact amount dependent on the language. However, if boot.py intentionally needs to produce larger amounts of output, it can deliberately mount the filesystem in RW mode and perform any writes needed. In that case it's up to the boot.py to choose an appropriate way to limit the number of writes if needed for the application.

orchid basinBOT
lethal abyss
#

hello everyone, it's been a long time since I tried some custom circuit python.
I'm currently exploring a way to produce a dedicated port for the Lilygo T-embed ESP32-S3
The build setup documentation has a dedicated chapter for espressif (even if it's strange to see it after all other chapters)
My issue is that during the esp-idf/install.sh step, I encounter an error:
ERROR: This script was called from a virtual environment, can not create a virtual environment again
I always work on my python projects from venv python and I don't know if there is a known way to install esp-idf anyway

tulip sleet
#

@onyx hinge my [truncated due to length] suggestion was a mild one, and makes for extra code and translations. Maybe it's not worth it?

analog bridge
lethal abyss
manic glacierBOT
onyx hinge
#

I forget, it seemed like the esp32-eye had some limitations too but I am confident the camera worked at a minimum basic level.

manic glacierBOT
orchid basinBOT
onyx hinge
#

@tulip sleet because Q2's gate is pulled up to 3V3, does that cause it to conduct or not to conduct by default when CAM_PWR is not otherwise driven?

#

(that's from the esp-cam's datasheet)

#

there's no sw control of the camera's actual powerdown or reset pins 😦 just this control over its regulators

tulip sleet
#

i get confused by FET schematic symbols, looking...

onyx hinge
#

me too, thank you

tulip sleet
#

phone call...

onyx hinge
#

np

#

I think that's consistent with how the esp32-camera library treats the power down pin ```c
if (config->pin_pwdn >= 0) {
ESP_LOGD(TAG, "Resetting camera by power down line");
gpio_config_t conf = { 0 };
conf.pin_bit_mask = 1LL << config->pin_pwdn;
conf.mode = GPIO_MODE_OUTPUT;
gpio_config(&conf);

    // carefull, logic is inverted compared to reset pin
    gpio_set_level(config->pin_pwdn, 1);
    vTaskDelay(10 / portTICK_PERIOD_MS);
    gpio_set_level(config->pin_pwdn, 0);
    vTaskDelay(10 / portTICK_PERIOD_MS);
}
slender iron
onyx hinge
#

yeah that is the same author as the thread dan led with -- did they double post it?

#

Here's what I have so far for a reply.

The esp32-eye and esp32-cam are different products, the eye is from espressif and the cam is from AI-Thinker (and possibly other vendors). It might load to work the bin file for a different board but it also might not.

A community member also tried to get the camera to work on the esp32-cam with a new board definition but failed with the same error: https://github.com/adafruit/circuitpython/pull/6827 -- we were unable to resolve their problem.

I notice that in your example, the "external clock" pin (clock input into the camera module) is not specified. Unless the camera is fitted with its own clock source this is required for the camera to operate. However, since some camera modules are fitted with their own clock sources (such as the Adafruit ov5640 breakout) we do not treat failure to specify the pin as an error.

Another possible problem is power and reset control of the camera. In the schematic, you will see that CAM_PWR is connected to p-channel mosfet Q2. This pin must be pulled LOW in order for Q2 to conduct and supply power to the camera module. This GPIO should be specified as the powerdown_pin= in the camera constructor.

orchid basinBOT
orchid basinBOT
tulip sleet
onyx hinge
#

OK, posted

manic glacierBOT
tulip sleet
#

@slender iron @onyx hinge I am going to do an 8.0.1 release. It has the Scorpio fix, i2CDIspaly deinit fix, exception chaining fix, sh module 2.0.0 fix, and Spresense SDK update. I don't see any other outstanding PR's to include. Sound ok to you?

onyx hinge
#

that sounds like a good round-up of stuff!

slender iron
#

We should probably start doing spdx in the core files

slender iron
#

@analog bridge is your CI PR ready?

orchid basinBOT
manic glacierBOT
#

@deshipu This would mean adding the below to pewpew_m4/mpconfigboard.mk and leaving CIRCUITPY_SAFEMODE_PY on. Does this align with what you want for this board?

# We don't have room for the fonts for terminalio for certain languages,
# so turn off terminalio, and if it's off and displayio is on,
# force a clean build.
# Note that we cannot test $(CIRCUITPY_DISPLAYIO) directly with an
# ifeq, because it's not set yet.
ifneq (,$(filter $(TRANSLATION),ja ko ru))
CIRCUITPY_TERMINA...
orchid basinBOT
manic glacierBOT
manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 8.0.0 on 2023-02-06; Kaluga 1 with ESP32S2
Board ID:espressif_kaluga_1.3

Code/REPL

# SPDX-FileCopyrightText: Copyright (c) 2023 Jeff Epler for Adafruit Industries
#
# SPDX-License-Identifier: Unlicense

"""
This demo is designed for the Kaluga development kit version 1.3 with the
ILI9341 display. It requires CircuitPython 8.

This demo needs multiple settings properly configured in settings.toml:

CIRC...
timid bolt
#

the particular code responsible for the issue is mdns_server_construct, but inspecting elsewhere there are a lot of other places (e.g. in socketpool).

tulip sleet
#

@onyx hinge ^^
@timid bolt I think so, but Jeff has the last word on this. Could you paste a comment saying the above to the issue?

onyx hinge
#

sounds great, I love it when bugs are fixed.

orchid basinBOT
crimson ferry
#

@timid bolt is it missing mainly in bind-listen-accept? I can do client sockets 'til the cows come home with no safe mode

timid bolt
#

qq: why do we use the "raw" lwip interface, instead of the higher-level and thread-safe "socket" api?

crimson ferry
#

@timid bolt sorry I thought you were talking about the espressif issue... ignore my "client sockets" comment

#

(7333 rp hardfaults is very reproducible; 7459 espressif hardfaults is sporadic)

tulip sleet
orchid basinBOT
slender iron
tulip sleet
manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 8.0.0 firmware, Raspberry Pi Pico W with rp2040

Code/REPL

import os
import time
import ssl
import socketpool
import wifi
import adafruit_minimqtt.adafruit_minimqtt as MQTT

try:
    # Localhost broker address and port
    MQTT_BROKER = '192.168.0.42'
    MQTT_PORT = 1883

    # WiFi network configuration
    WIFI_SSID = 'my-wifi-ssid'
    WIFI_PASSWORD = 'my-wifi-password'

    # Define the callba...
manic glacierBOT
#

I can reproduce the issue with very little code. Here's an example, where I hit ctrl-c as soon I see the reload happening.

> ls -lR /run/media/user/KEYBOARD-R/
/run/media/user/KEYBOARD-R/:
total 4
-rw-r--r--. 1 user user 158 Dec 31  2019 boot_out.txt
-rw-r--r--. 1 user user   0 Feb 12 12:29 boot.py
-rw-r--r--. 1 user user  76 Feb 14 21:17 code.py

> md5sum /run/media/user/KEYBOARD-R/* ; time sleep infinity;
4a0087c900ac9ba765eb7ff94962a656  /run/media/user/KEYBOARD-R/boot_out....
onyx hinge
#

At least that's what I recall

manic glacierBOT
#

I got it.

Adafruit CircuitPython 8.0.0-4-g1f1a495e26-dirty on 2023-02-15; Raspberry Pi Pico with rp2040
>>> import os
>>> a = "exec(a)"
>>> exec(a)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<string>", line 1, in <module>
  File "<string>", line 1, in <module>
  File "<string>", line 1, in <module>
  File "<string>", line 1, in <module>
  File "<string>", line 1, in <module>
  File "<string>", line 1, in <module>
  File "<string>", line ...
analog bridge
#

@slender iron @onyx hinge @tulip sleet I asked scott to enable merge queue but on further reading the docs, I am not sure it will work as expected with the current ci/repo configuration and I need to test it first. Please disable it before merging any PRs.

brazen hatch
#

Uhh so you guys.. I made the whole settings.toml logic..

#

it works

#

it's just that..

#

getenv doesn't work

#

even after boot

#

int's don't work??

#

Ah nvm filesystem was corrupt

#

Now I only need to test stackless via settings.toml and we are good.

#

Yea stackless isn't working by just not allocating..

#

I will have to figure that out

#

But yea let's first get the commits up and the branch changed.

manic glacierBOT
onyx hinge
tulip sleet
analog bridge
#

Are the non-release builds wiped from S3 bucket on a new release?

onyx hinge
tulip sleet
# onyx hinge <@329766224093249548> probably knows

@analog bridge I do it by hand with aws s3. I didn't mean to delete the very latest PR builds last night: I mistyped a glob pattern. I usually try to keep a couple of weeks of PR releases around so that people can do simple bisecting.

#

I have thought of automating it, but it's easy, and I can apply some judgment to the current situation.

onyx hinge
tulip sleet
#

you mean the leftmost vertical stripe is confusing?

onyx hinge
tulip sleet
#

so a strip that starts at an avatar pic is a reply. You could open an issue or a discussion on GitHub about this. They seem receptive to fixing various UI things.

#

could be a different color or a dashed line, etc

#

the whole background is diff color now, so not sure of the purpose of the line

onyx hinge
#

I agree, it's possible to figure it out when 'looking globally', and probably once you're proficient with the site. but for a person looking for the very first time, the entirety of jimmo's most recent post "looked like" something to skip over because it was (A) greyer than the rest and (B) had a vertical line, commonly used to indicate quotation. I'm just being a bit of a complainer, not really looking for a solution.

#

so yeah just wanted to complain

tulip sleet
#

I guess nested replies is a bit helpful, but I always wonder where to reply in these kinds of sturctures

onyx hinge
#

yeah I used to swear by threading in my messaging apps (trn, mutt) but now I'm more convinced that there's something good about the way forced-linearization of gmail threads & github issue discussions work actually. I wonder how you'd research such a topic

#

(because deeply nested and now very off-topic sub threads were a fact of life with the threaded way, and are broadly discouraged with the linearized way)

brazen hatch
#

If all goes well, pushing in 5, ready for review.

manic glacierBOT
manic glacierBOT
#

Sure, gc_collect_start initially defined in py/gc.h:61 and populated in py/gc.c:365 contains the problematic piece of code:

#if MICROPY_ENABLE_PYSTACK
// Trace root pointers from the Python stack.
ptrs = (void **)(void *)MP_STATE_THREAD(pystack_start);
gc_collect_root(ptrs, (MP_STATE_THREAD(pystack_cur) - MP_STATE_THREAD(pystack_start)) / sizeof(void *));
#endif

This code block is disabled on stackless.
However, leaving it in, when a pystack is not allocated and initial...

manic glacierBOT
timid bolt
#

If I set the gcc flag -Og (optimizations for debug), the variables _ld_dtcm_data_size and _ld_dtcm_bss_size in ports/raspberrypi/supervisor/port.c are bogus. Does anyone know why?

jaunty juniper
#

what is the rule for using main versus the 8.0.x branch ?

tulip sleet
jaunty juniper
#

new boards ?

tulip sleet
#

I want to make one within a week or even this week. would have safemode.py and maybe the bangle.js

#

a lot of people are afraid to use something not marked as "stable"

jaunty juniper
#

ok

tulip sleet
timid bolt
#

-O1 seems to work and is debuggable. So I can go with that.

$2 = 16843009
(gdb) p _ld_dtcm_bss_size
$3 = 4286773247```
tulip sleet
#

I looked at the .ld files but there was nothing obvious to me

timid bolt
#

Yeah, it's definitely bizarre. πŸ€·β€β™‚οΈ

manic glacierBOT
proven garnet
#

Got rp2040js working with CircuitPython with a filesystem!

onyx hinge
#

@timid bolt I notice

>>> hex(16843009)
'0x1010101'

Is _ld_dtcm_bss_size in RAM? does something else write to it? maybe a watchpoint would be enlightening.

#

(and should it be in RAM? can it be made a constant that lives in flash instead?)

proven garnet
manic glacierBOT
slender iron
#

interesting @proven garnet ! what do you plan to do with it?

proven garnet
slender iron
#

πŸ‘

jaunty juniper
#

yeah that's a thing I would love to see, and getting memory dumps and learn more about the behavior of memory in general, make graphs (videos) like that πŸ˜‰
https://youtu.be/baa5ILZTRkQ?t=856

Live stream of @tannewt debugging memory issues in CircuitPython.

Visit the Adafruit shop online - http://www.adafruit.com


LIVE CHAT IS HERE! http://adafru.it/discord

Adafruit on Instagram: https://www.instagram.com/adafruit

Subscribe to Adafruit on YouTube: http://adafru.it/subscribe

Join our weekl...

β–Ά Play video
still zephyr
#

WTG @proven garnet

proven garnet
#

I can create actions for setting it up in the CI and then have it be modular from there. I'm thinking that'll feed into those other things. I'm going to PR this upstream with instructions in the README, so I can post here for those interested in trying it out locally.

brazen hatch
#

me casually doing out-of-bounds mem writes

#

this is gonna be fiiiineee

slender iron
#

πŸ˜„

#

welcome to the core

manic glacierBOT
brazen hatch
#

Yea found a better way

#

pushing after test

#

cleanup_after_vm is just for this

slender iron
#

it is best to avoid globals if you can

#

passing arguments makes data use clearer

brazen hatch
#

Well with how I did it now, neither is needed

timid bolt
brazen hatch
#

Browser in Circuit Python.

#

I will eventually make a tui browser.

#

I have rewritten nano, how much harder can it possibly be.

#

First I should make a proper html renderer though.

#

If I can render it to a file it should be as simple as wrapping less and giving it a bottombar

jaunty juniper
#

lynx seems like a natural progression from nano

jaunty juniper
brazen hatch
#

I could discard pystack_size huh

#

Imma do that too.

#

every byte counts

#

So. What should I do when the setting.toml value is invalid??

#

currently the code just defaults back to build default

#

Maybe print a message? Or trigger safemode?

#

And perhaps it's not wise running the resizable pystack code in safemode

#

For now making it a message.

#

It's not a fatal error really, we can just fallback to build default

#

However I should make checks as to if the alloc failed

#

if it failed it should redo the build default.

#

No idea how to check but fine

#

I will try it out, gdb will show which alloc failed.

slender iron
#

@brazen hatch I'd use the build default

brazen hatch
#

Oh it does use it in any and all errors, I'm just talking about the error message.

slender iron
#

I wouldn't add an error but it might be worth making it possible to read the value from python code

#

that way you could verify it worked

brazen hatch
#

Well, the other settings.toml stuff do serial writes

#

so for now I did the same

manic glacierBOT
slender iron
#

kk

manic glacierBOT
brazen hatch
#

All done.

manic glacierBOT
#

Hello,

I hope I'm not being nitpicky, I appreciate all the work that you do and love your products.

The feather 2040 board neopixel is too bright, it has that kind of led intensity that it can create a bright spot in your vision for an hour, I don't think that can be good for the vision long term without any diffuser.

And this wouldn't be a problem if it weren't on by default right as you flash it and run hello world.

It is also inconvenient that in order to turn it off I have to ...

manic glacierBOT
tulip sleet
#

if you are busy someone else can do this

manic glacierBOT
#

The problem here is that pystack is not defined if not MICROPY_ENABLE_PYSTACK, which is a compile error.

Unfortunately the #define really makes a mess of what is otherwise simple code. Idk, the best solution, but you might consider creating a struct that contains heap and pystack if enabled. Return this struct from start_mp and pass it to stop_mp. This way all the MICROPY_ENABLE_PYSTACK nonsense is contained to this struct and those functions.

#

I would write this as:

if (getenv_err != GETENV_OK) {
    serial_write_compressed(translate("\nWARNING: Invalid CIRCUITPY_PYSTACK_SIZE, defaulting back to build value.\n\n"));
        pystack_size = CIRCUITPY_PYSTACK_SIZE;
}
pystack_size = MAX(pystack_size, CIRCUITPY_MIN_PYSTACK_SIZE);

Because:

  1. You need to check for a parsing error in common_hal_os_getenv_int.
  2. I don't think pystack not being mod sizeof(size_t) is a real error. Just let integer division round it d...
timid bolt
tulip sleet
#

great, thanks!

manic glacierBOT
jaunty juniper
#

@wraith crow I don't want to add to the thread, but note that changing the LED in code does nothing, it's off by default, and the core takes control of it anyway, I believe the OP was talking about the REPL (hence the one-liner they posted)

#

maybe someone using Thonny (which sits in the REPL until you press "run", not the CP normal workflow, but one used by some people)

wraith crow
#

I was just working with the neopixel_write module so it was fresh in my mind 🀷 I was thinking it would be an option to type/paste in the REPL

jaunty juniper
#

yeah a little long though

wraith crow
#

Clearly Scott's/Dan's suggestion is the way to go 😁

manic glacierBOT
#

@tannewt Correct. Here's another test that hopefully shows that the metadata has not been modified as well.

> stat /run/media/rarnaud/KEYBOARD-R/* >before.txt; cat /run/media/rarnaud/KEYBOARD-R/code.py; time sleep infinity;
from time import sleep

print()
while True:
    print(end=".")
    sleep(2)
^C
real	0m37.156s
user	0m0.000s
sys	0m0.002s



17:31:39 - MBA-FEDORA:~
> stat /run/media/rarnaud/KEYBOARD-R/* >after.txt; diff before.txt after.txt 

How would I acti...

#

It should remain visible in well lit environments by default though.

I'm guessing the white led signals that the board is working correctly.

But it is very bright, specially the white which is all at the same time. So I would either suggest lowering the brightness significantly or having that as an optional documented feature that you could enable easily rather than blinding unexpected people right after the flashing reboot sequence.

jaunty juniper
#

if I remember correctly, the default for dotstar was influenced by the FunHouse having 5 LEDs on top of it, which was not fun when in the REPL πŸ’‘ πŸ’‘ πŸ’‘ πŸ’‘ πŸ’‘

manic glacierBOT
#

The metadata can be something invisible to you via the filesystem, such as the dirty bit. Or it may be that the host is doing a write that does not actually change a block.

The way to do the print is to be able to build CircuitPython yourself, and then insert an mp_printf(&mp_plat_print, ...) at the right place in the code. An alternative to this is to use wireshark and look at the USB traffic, which does not require a rebuild. wireshark I think will be able to parse the SCSI-like comman...

jaunty juniper
tulip sleet
#

we have had sample variability in the status LED's. I can't remember if it was just dotstars -- it was some tiny ones. It's hard to pick a standard brightness

jaunty juniper
#

I was thinking it could be a define that can be overridden per board, especially for boards that have multiple LEDs

tulip sleet
#

that would be a good idea; in the case i mentioned, it was the same board that had wildly varying brightnesses based on manufacturer or batch

jaunty juniper
#

hmm

tulip sleet
manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 8.0.0-6-g58c0c2212 on 2023-02-14; Adafruit QT Py ESP32S2 with ESP32S2

Code/REPL

# after setting the internal rtc

>>> import time
>>> time.localtime()
struct_time(tm_year=2023, tm_mon=2, tm_mday=15, tm_hour=17, tm_min=4, tm_sec=22, tm_wday=2, tm_yday=46, tm_isdst=-1)
>>> 
>>> import microcontroller ; microcontroller.on_next_reset(microcontroller.RunMode.SAFE_MODE) ; microcontroller.reset()

[17:04:54.884]...
manic glacierBOT
timid bolt
# manic glacier

What do I have to do to make the 8.0.x branch appear in my fork on github?

tulip sleet
#

i had to do a lot of websearching to find this for myself yesterday

manic glacierBOT
tulip sleet
#

maybe if you just do it locally and then push

timid bolt
#

well, I have the 8.0.x branch appearing in my github repo, however if I rebase my commit to be on top of 8.0.x, I cannot push it back to my github repo

slender iron
#

what branch are you trying to push to? whats the error? @timid bolt

timid bolt
slender iron
#

and you have it rebased locally? you can likely do --force-with-lease when pushing to github

#

it allows you to force but only if your local copy of a branch matches the remote

timid bolt
#

Great, that worked! The PR is ready for approve/merge now.

timid bolt
#

would you like the lwip enter/exit changes in main or 8.0.x?

tulip sleet
timid bolt
#

Sounds good. I tested it as part of my #7333 changes. I think it is a low-risk change as adding unnecessary enter/exits should be harmless.

manic glacierBOT
#

Here is a bunch of changes that I found potentially helpful while debugging issue #7333. If you think they are useful too, I can PR all of part of this. Either way it is not a big deal.

  1. Change debug optimization level to O1 to make code more debuggable.
  2. I use CIRCUITPY_FULLBUILD = 0 as a cheesy way to get faster builds. Doing this introduced some missing dependencies, so I added them to mpconfig mk/h files.
  3. In order for a build to fail sooner on a missing dependency, I added thi...
manic glacierBOT
#

Pretty much every call to an LWIP function (when in "pico_cyw43_arch_lwip_threadsafe_background" mode) needs to be surrounded by a MICROPY_PY_LWIP_ENTER/EXIT section. Although the chance of an issue is small, and it is known to be causing issues, the code is technically necessary.

This change adds a bunch of missing enter/exit sections. An unnecessary enter/exit section should be harmless.

In another change, I will turn on runtime asserts for missing sections for debug builds only. Howe...

#

CircuitPython version

Adafruit CircuitPython 8.0.0-beta.6

Code/REPL

import displayio
import board
import busio

displayio.release_displays()

FREQ = 80_000_000
spi = board.SPI()
spi.try_lock()
spi.configure(baudrate=FREQ)
spi.unlock()

Behavior

The frequency returned will always be what the baudrate parameter was, even if the bus could not be set to that frequency.

Description

spi.frequency always returns the value it was set t...

#

Hi, Scott

Sample code for lighting up the system light is working in Jupiter
Notebook. Anything related to network has issue, for example,
adafruit_request is not working in Jupyter Notebook too.

Sean

On Wed, Feb 15, 2023, 11:20 AM Scott Shawcroft @.***>
wrote:

Does other code work with the jupyter kernel? 8.0.0 added status bar
updates from circuitpython that the kernel may not know to ignore. (Thonny
does)

β€”
Reply to this email directly, view it on GitHub
<https://gi...

analog bridge
analog bridge
#

I got it, its the --recursive flag

#

That last / in the path looked suspicious.

manic glacierBOT
lavish saffron
#

I'm trying to track how many sockets have been assigned to socket objects in the Winzet5k driver. I have added a list of bools as a class variable and it is easy enough to track the assignment. The problem is tracking when the socket.socket instances are released. I've added a __del__ method to socket.socket but is not called.

e.g.

a = socket.socket()
a = True

The instance of socket.socket should be destroyed when a is set to True but __del__() is not called. Am I barking up the wrong tree?