#circuitpython-dev

1 messages Β· Page 277 of 1

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

Follow up to https://github.com/adafruit/nrfx/pull/4 , nrfx v2 API is breaking changes with new argument, api rename, function move around etc ... v2 is needed to compile with tinyusb master's tip since it is required to support latest mcu such as nrf52833 and nrf5340

List to do before merge

  • [ ] merged https://github.com/adafruit/nrfx/pull/4 , then bump nrfx submodule version to merged one.
  • [ ] Most of peripheral drivers are changes and need re-test (finding some py file to test now...
manic glacierBOT
manic glacierBOT
#

I'm confused: the del subdirs[:] should not be necessary.T he continue is meant to just skip the entire unwanted subdir. I added a print(file) after the if file.endswith(".py") on line 49, and I don't see that the example files are being copied and frozen. If you look in /build-circuitplayground_express/frozen_mpy you'll also see which files are compiled to .mpy and the example directories are not there even without this change.

timber mango
#

Hello guys, I drive LED strip via the spi interface on FT232H from laptap. Led strip is lighted but it performs not as expected. I used the sample of Neopixel ring, where shows the basic usage of neopixelspi lib. Where can I get more information to use neopixelspi lib?

gilded cradle
manic glacierBOT
tulip sleet
#

@onyx hinge something weird is going on; preprocess_frozen_modules is removing example dirs on 5.x but not 4.x

onyx hinge
#

@tulip sleet it's about subdirectories of examples. I'll double check what in seeing here. The background is that @idle owl 's adafruit_circuitplayground was freezing in advanced examples when I built with her work in progress version, making flash really not fit

tulip sleet
#

oh, it's the 'advanced examples', ok I see what you're doing

idle owl
#

Yeah, the extra directory that's new since the last freeze.

onyx hinge
#

(not at my computer right now)

tulip sleet
#

ok, I was confused: i thought it was all example dirs, which were working right. We didn't have subdirs before, ok, got it.

#

I misinterpreted "subdirs of examples..." as meaning they were the subdirs

#

since the variable is called subdirs πŸ™‚

manic glacierBOT
manic glacierBOT
tulip sleet
#

@onyx hinge are you off for the rest of the day?

manic glacierBOT
onyx hinge
#

@tulip sleet I'm back around my computer now

manic glacierBOT
#

@dhalbert OK sounds like this one needs to be closed up and a correct PR opened against the correct branch. Thanks for following up!

I think the situation right now is that 4.x should be built with gcc7 and 5.x/master with gcc9, which could affect the results slightly. I am not sure now whether my build procedure locally would have been using gcc9 to build 4.x or not. If that is what happened, then it could explain the different results we each saw.

ionic elk
#

I'm finding that displayio.release_displays() doesn't release the SCK pin of my screen. Is there another step I need to take?

onyx hinge
#

hmph the audio+display dma lockup went into hiding as soon as I wrote a program just to try to provoke it 😞

manic glacierBOT
onyx hinge
#

I must be missing an ingredient. DMA from the SD card too, maybe?

#

maybe a rawsample doesn't provoke it at all, for some reason?

tulip sleet
#

@onyx hinge did you get the error originally with the latest SD card library? There were a bunch of fixes for larger reads and writes and support of certain cards. You could try varying the file size (should be at least several kB)

idle owl
#

@onyx hinge Ran into something that might be audio related. There's an example that plays tones on the Circuit Playground higher and lower frequency as you tilt the board. It runs fine on CPX, but on CPB, if I tilt it too far one way, I get this: Traceback (most recent call last): File "code.py", line 132, in <module> File "code.py", line 96, in run File "code.py", line 129, in change_tone_if_needed File "adafruit_circuitplayground/circuit_playground_base.py", line 922, in start_tone ValueError: Sample rate too high. It must be less than 62500

#

Is this an nRF issue? Or something I'm unaware of?

onyx hinge
#

@tulip sleet yes I have the latest as of a week or so ago. the one earlier than that had many more problems.

#

@idle owl hm that requirement can potentially be changed, I didn't know about that demo...! (there are lots of demos I know nothing of)

idle owl
#

@tulip sleet Testing on Bluefruit and finding issues with the examples, unrelated to the changes I made. I'm thinking I'll file issues for the bugs and deal with them in a different PR.

#

@onyx hinge It's in advanced examples.

onyx hinge
#

@idle owl can you please enter an issue about it? There's not a quick-quick fix but there might be a slightly less quick fix that I'll look into tomorrow.

idle owl
#

Yes, I already have it started, I will tag you on it.

onyx hinge
#

thanks, you can assign it to me, I find it helpful

#

any idea how high sample rate will go in that example?

tulip sleet
#

the library could keep the sample rate below the max

idle owl
#

@onyx hinge No idea.

onyx hinge
#

at the time I wrote it, I was unaware of how this is used in CP as a way to get sine waves of various frequencies. I figured "62500 is higher than any sensible wave file would go, because of the human auditory system" and so I made some other assumptions related to that.

#

not sure that clipping the playback at 62.5kHz will be satisfactory, in the context of this demo

tulip sleet
#

I think it makes sense to change the library, not CPy. A sampling rate that high is not necessary.

onyx hinge
#

yes, you could cap frequency at 22kHz or so, and if frequency > 5000Hz, set length to 20 instead of 100 or so

#

CPB audio will get worse faster than CPX audio when you request a high sample rate, because of the limitations of CPB PWM

idle owl
#

@tulip sleet I notice on CPB we don't have whatever we have in place on CPX to clear the NeoPixels when the code is not running, or whatever it is that it does that makes the LEDs turn off if you load new code that doesn't explicitly clear them. Worth implementing?

#

Ok found bugs, filed issues, PRing update.

tulip sleet
#

@idle owl yes, some other people noticed that. I'll file an issue.

idle owl
#

Ok

manic glacierBOT
idle owl
#

@tulip sleet Hah I thought your response to that issue was a response to my PR on which I had literally just hit create. I was wondering how you had ninja'd it that fast. I was wrong πŸ˜„

tulip sleet
#

i type very fast

ionic elk
#

@slender iron So, uhh, just determined that the Meowbit shares a SPI bus between the TFT display and the SPI flash. How obnoxious would you figure that'll end up being?

#

Is that something I can hack around, or would it require major refactoring? The flash reserves the pins... does displayio rely on flash access for stuff?

tulip sleet
#

@ionic elk if it's easier, you could just use SPI instead of QSPI? It that the issue?

#

If you look at the Meowbit MicroPython impl, what do they do?

ionic elk
#

@tulip sleet no QSPI. The physical chips are on the same line

tulip sleet
#

as long as there are separate CS lines (there have to be, I assume), I don't see that it's a big problem, but the SPI filesystem code has to share the pins

ionic elk
#

Yeah that's just kind of my question. My current problem is just that there's no interface for having the SPI filesystem allow other modules to access the pins it uses. But I before I started hacking in that direction I figured I'd get a second opinion on whether there'll be even bigger, worse problems down the line

#

@tulip sleet on reconsideration: with the existing system, is there any actual way to have two modules use an SPI bus mediated by CS pins?

#

I guess the usual case would be that two modules would use a SPI instance you've defined, but that doesn't apply to SPI flash since it defines its own instance. So we need some way of fetching the SPI object being used by flash, so it can then be plugged into other things

slender iron
#

@ionic elk is there a designated SPI bus that it exposes for the user to use?

ionic elk
#

Yeah that's actually exactly what I was looking at

#

But this is where my experience starts to get shaky - how would I go about exposing that in the python interface?

#

I also need the CS pin, of course

#

something like spi = flash.getSPI()?

slender iron
#

why do you need the CS pin too?

#

to expose it to Python, add it to the board level pin table like SPI (board.SPI)

#

I'd call it INTERNAL_SPI or something

#

you can also init the display in the board def like pybadge so its automatically used

ionic elk
#

@slender iron you're right, I guess I don't use it since it'd be entirely internally managed. Not like I need to go in and disable it.

slender iron
#

πŸ‘

ionic elk
#

I'll look at how pybadge does it. Will I need to add the internal SPI to the shared-bindings/board/__init__ and import it into the flash implementation or is there a simpler way I don't know of to get it into board/pins.c?

slender iron
#

I think you can just declare it in supervisor/shared/external_flash/spi_flash.h (add this file) and use it directly

ionic elk
#

So I'd include that file directly in my pins.c file, in addition to the shared bindings file, and then expose it in the global array? Sorry for all the questions, trying to make sure I'm doing this in the right way

slender iron
#

ya, think so

#

the .h would have it as an extern I think

ionic elk
#

good news is my control test with internal filesys is working, so that's noice

#

I'll pop up a PR now, and then see if I can get this extern SPI version in.

simple pulsar
tulip sleet
#

@idle owl I have the 4.x PR most ly donefor increased stack size, but will wait until I can update the frozen libs with the new release.

#

@simple pulsar yes, that's it, oops, removed my dupe issue

manic glacierBOT
#
[adafruit/circuitpython] New branch created: tannewt\-patch\-1
onyx hinge
#

okay, audio + display crashed out at about 2900s runtime, oops, I didn't have the debugger plugged in argfh

idle owl
#

@tulip sleet Ok releasing now if I can get it done before dinner is ready.

slender iron
#

@onyx hinge I know how that feels. I crashed my mac again yesterday by leaving a CIRCUITPY drive plugged in so I gave up and finally started debugging it with a beagle

idle owl
#

@tulip sleet Ok released.

onyx hinge
#

yeah I have lockups I'm blaming on inadequate USB robustness in Linux as well

idle owl
#

bbl. Dinner!

onyx hinge
#

not quite sure how to separate the debugging, building, and serial-terminaling though I have a pi4 sitting right here that could help

#

and the next lockup happened real quick. that's something

manic glacierBOT
onyx hinge
slender iron
#

I generally use a second computer as a usb sacrifice in that case

#

and build locally and load over jlink

manic glacierBOT
#

Also getting this, when I have sound + display.

shared_dma_transfer (peripheral=0x43000000, buffer_out=<optimized out>, 
    dest=<optimized out>, src=src@entry=0x0, buffer_in=<optimized out>, 
    buffer_in@entry=0x0, length=<optimized out>, tx=<optimized out>, 
    tx@entry=0 '\000') at peripherals/samd/dma.c:192
192	        while ((dma_transfer_status(SHARED_TX_CHANNEL) & 0x3) == 0) {}
(gdb) where
#0  shared_dma_transfer (peripheral=0x43000000, buffer_out=<optimized out>, 
 ...
#

This PR adds support for the Meowbit board by Kittenbot. Adds definitions for the STM32F401RE, a new MCU for the port. Requires #2395 and #2379. Resolves #2196 and #2145.

Still has a number of todos left:

  • [ ] Expose the SPI instance used in SPI flash so to enable display
  • [ ] Fix bug where PWM is not working on buzzer
  • [ ] Create linker option for use with preprogrammed Meowbit bootloader
#

(gdb) stepi
dma_transfer_status (channel_number=<optimized out>)
at peripherals/samd/samd51/dma.c:88
88 return channel->CHINTFLAG.reg;
(gdb) x/i $pc
=> 0xcdb6 <shared_dma_transfer+198>: ldrb r0, [r6, #14]
(gdb) p/x $r6
$10 = 0x4100a070
(gdb) p &((Dmac *)0x4100A000UL)->Channel[3]
$11 = (DmacChannel *) 0x4100a070
(gdb) p *$11
$12 = {CHCTRLA = {bit = {SWRST = 0, ENABLE = 1, RUNSTDBY = 0, TRIGSRC = 13,
TRIGACT = 2, BURSTLEN = 0, THRESHOLD = 0}, reg = 2100482}, CHCTR...

#

I generally prefer 4.1.x and 4.x to be separate if 4.x work will end up as 4.2.0. In general, I'd prefer more specific branches like 4.1.x over more general ones.

Sounds fine -- I have submitted a reverse PR to make the two branches identical. Do you feel that the CPX stack-size updates and the new frozen libs are 4.1.1 or 4.2.0? It is an API enhancement from the point of view of the CPX library, but nothing else. And boards other than CPX are not affected at all, so maybe 4.1.1?

#

They diverged with different commits, by accident. We could reset one to the other, but that rewrites history: e.g., https://stackoverflow.com/questions/36320517/making-two-branches-identical. This way, even if the commits are different, they are still mergeable. Ideally, we make future changes on 4.1.x and merge it to 4.x. So I don't think it's critical that they share the same commit at this point.

tame rover
#

Anyone know if the Adafruit Edge Badge is the Same as the Adafruit PyBadge?

tulip sleet
#

EdgeBadge has a PDM microphone on board; PyBadge does not

tame rover
#

THanks

#

I can test Tensorflow lite on both. Awesome!

slender iron
#

@gilded cradle are you working on hidapi ci issues? It's preventing me from fixing up new repos without hacking the deps

gilded cradle
slender iron
#

looks

#

I can do that πŸ™‚

gilded cradle
#

Awesome

slender iron
#

πŸ™‚ thanks!

gilded cradle
#

yw, thanks for looking at it.

slender iron
#

np

gilded cradle
#

Ok, it's still doing it. I'm going to remove that requirement altogether.

slender iron
#

@gilded cradle approved

gilded cradle
#

Thanks

slender iron
#

np, happy to give it the stamp of approval

gilded cradle
#

It should probably take around 5 minutes to get on PyPI and for travis to realize it's there.

slender iron
#

np, I'm multitasking

gilded cradle
#

I'm watching Travis

slender iron
#

πŸ‘

slender iron
#

got past it. thanks @gilded cradle

gilded cradle
#

You're welcome.

slender iron
raven canopy
#

sees multiple favorite keywords: sphinx. auto. api. πŸ–±οΈ πŸ–±οΈ πŸ–±οΈ πŸ˜„

slender iron
#

πŸ™‚

#

what is the right way to add travis api tokens for new libraries? Or is there a way to convert to actions? cookiecutter is still travis

raven canopy
#

Settings->Webhooks, right?

#

oh wait...

#

i haven't done it in sooo long. lol

slender iron
#

πŸ‘

#

will take a stab at it tomorrow. thanks!

manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
lone sandalBOT
manic glacierBOT
lone sandalBOT
manic glacierBOT
onyx hinge
#

@slender iron I'm feeling stuck about #2005, a hang in SPI DMA while audio is playing. It's impeding progress on JEplayer which is supposed to be my priority. can you help or point me at someone who can? I may be in and out but I'll read back.

slender iron
#

@onyx hinge we can chat about it in 15 minutes or so. I'm not sure what the best approach to debugging it is

onyx hinge
#

okie, I'd appreciate that. I'll be here.

slender iron
#

kk, just finishing up breakfast πŸ™‚

slender iron
#

@onyx hinge video or audio? ready now

prime flower
#

@solar whale I'm rebuilding nina-fw on 3.3.1 today, should I tag you in a PR for testing?

solar whale
#

@prime flower that would be fine with me

solar whale
#

@prime flower it may be this evening or possibly tomorrow before I can test the wifi-nina. Is that OK?

crimson ferry
manic glacierBOT
#
[adafruit/circuitpython] New tag created: 4\.1\.1
orchid basinBOT
prime flower
#

@crimson ferry I could tweak it, which links are you referring to

#

@solar whale I'm not in a rush, IDF 3.3.0 is very stable, 3.3.1 mainly does some bugfixes/security patches

tulip sleet
#

@slender iron @idle owl oh groan, "4.1.1" is really a release of master 😦

#

because I didn't tag the commit before I released.

orchid basinBOT
tulip sleet
ionic elk
#

@slender iron so, the internal SPI intercept "works"... but it seems super, probably unacceptably easy to brick the device. If my python code has any kind of bug with the display SPI, I lose my filesystem, and also my REPL access (maybe due to an MSC collapse?)

#

Can't just re-flash, either, since it won't erase internal flash - I actually have to roll back the firmware

orchid basinBOT
ionic elk
#

@slender iron I think it might be less apparent if the screen wasn't being used by the REPL when the chip is trying to do non-python operations like the soft reboot. Is there any option in DisplayIO to explicitly disable access to a screen by the REPL and keep it from being on the never-reset list?

idle owl
#

@tulip sleet Approved.

tulip sleet
#

tnxtnx

crimson ferry
#

I may not get to it soon, but I'm planning to work up an example for the ESP32SPI read / write features.

slender iron
#

@ionic elk we don't currently have a way to turn off the terminal separate from the display work

prime flower
#

@crimson ferry thanks for the location of the 404'd links, I've added the correct ones to the README in the active PR!

crimson ferry
#

Cool, thank you!

prime flower
#

np!

slender iron
#

@pastel panther does the test repo have the latest github actions files? I need to add them to my new repos

manic glacierBOT
#
[adafruit/circuitpython] New tag created: 4\.1\.2
pastel panther
#

@slender iron I believe so however you should probably use the ones in the cookiecutter as a better reference

slender iron
#

cookiecutter doesn't have it

#

otherwise I would already

pastel panther
#

hmm....

#

πŸ‘€

slender iron
pastel panther
#

I could have sworn @raven canopy added them πŸ€”

slender iron
#

he pointed me to the test repo

pastel panther
#

That works for now

slender iron
#

kk

raven canopy
pastel panther
#

whoopsie doodle

slender iron
#

I can do a PR to cookiecutter after I get display_notification going

pastel panther
#

sweet, thanks

slender iron
#

np

pastel panther
#

bleh, looks like I had @trim elm using a stale build.yml

pastel panther
#
raven canopy
#

TestRepo. it has the release artifact upload.

pastel panther
#

thank you

ionic elk
#

@slender iron Meowbit is opening kind of a can of worms here. It seems like I would actually need to modify the DisplayIO API to allow an option to disable REPL access since some kind of concurrent display/flash write on restart bricks the USB and filesystem.

slender iron
#

ya, go ahead and move on @ionic elk

#

that is the first board with a shared spi bus for flash

ionic elk
#

Should we pick an option and keep the board? Or just toss the whole thing?

#

Since it also has all the bootloader junk

#

Display works fine with internal flash, and vice versa

#

So we could leave that up to the user.

slender iron
#

ah, ya. you could do internal flash for now

#

no need to make it configurable

ionic elk
#

Unfortunately internal flash makes it impossible to co-exist with the uf2 bootloader, since they require the same flash region...

#

can of worms πŸ˜›

slender iron
#

ok, then skip it for now

ionic elk
#

Internal flash, ST Link required, then?

slender iron
#

do we already have others that require ST Link?

#

using the ST Link will overwrite the bootloader right?

#

I think it'd be worth spending a little time moving the internal fs. It'd be good to use uf2 on other boards too

manic glacierBOT
ionic elk
#

@slender iron I'll look into our options for bootloader relocation (we can't move the filesystem since the ST flash sectors are too huge outside the first 4 sectors). ST-Link flashing will overwrite the default Meowbit bootloader, but maybe parts of it could be moved? It might take some magic.

orchid basinBOT
ionic elk
#

I'll see whether I can get the ST bootloader working on the Meowbit, since BOOT1 is actually exposed via PB02 on the right button

slender iron
#

can you make the internal FS smaller and only use the 2-4 sectors?

ionic elk
#

that'd match it up with others

slender iron
#

we should have a plan for UF2 on stm though

#

and it can't live in a big sector unless we leave empty space

ionic elk
#

Maybe. I can move onto internal filesystem improvements and UF2 uploading now, if that's best

#

sounds like that's a reasonable next priority.

slender iron
#

I don't know what you mean by "internal filesystem improvements" but UF2 support would be good

ionic elk
#

The internal filesystem needs work on the STM32 - it's very slow, and even smaller than it should be - only appears as 32 bits out of 48 available.

slender iron
#

is that the fat overhead making it smaller?

#

slow and small are fine since internal fs isn't used much

ionic elk
#

Possibly, I haven't had the chance to fully examine it. We moved on from it post feather

slender iron
#

focus on uf2

#

k, gotta run if I'm going to climb before meetings. bbl

ionic elk
#

k, I've got plenty to workon. Will update later

#

For now though I'm going to clean up the Meowbit PR to just use the internal flash and use the STLink - it won't be far off from boards like the Blackpill in that use case.

#

I'll put down an issue for returning to it.

onyx hinge
slender iron
#

@tulip sleet it ran in my branch ok

tulip sleet
#

yah, it's just sitting there "There are no checks for this commit"

slender iron
tulip sleet
#

I could try approving and see if it runs after merging?

slender iron
#

fine with me

tulip sleet
#

@slender iron tip of master is complaining nxp in tinyusb is not a git repo, even though it's in .gitmodules for `tinyusb

slender iron
#

I'm looking too

quick gale
tulip sleet
#

you did import storage; storage.erase_filesystem() ?

slender iron
#

@tulip sleet master builds for me, commit a3559f14e

tulip sleet
#

@slender iron i think it's broken for me because I did git submodule update --init --recursive. I know you are not recommending --recursive, but it shouldn't cause it to break completely.

quick gale
#

@tulip sleet, yes, but no response from the REPL or the device

slender iron
#

@quick gale did you unplug it and replug it in? or reopen the serial tab

tulip sleet
#

it causes a reset. Are you typing it at the >>> ? Could you copy/paste from the repl to here?

slender iron
#

@tulip sleet I think that can happen with folders being deleted

quick gale
#

I'm not getting the >>> prompt.

tulip sleet
#

can you type ctrl-c?

#

to interrupt the running program?

#

is there anything in the REPL subwindow?

quick gale
#

nothing in the subwindow.

tulip sleet
#

what OS is this?

#

what kind of computer?

#

(Mac, Windows 10, win 7, etc.)

quick gale
#
code.py output:
OSError: [Errno 5] Input/output error

Code done running. Waiting for reload.
#

Circuitpython 4.1.2 for pyportal

#

oh

#

I'm on Ubuntu

#

19.04

tulip sleet
#

@slender iron magic light was running, then it failed after a few minutes:

>>> import ble_magic_light_simpletest
Scanning for Magic Light
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "ble_magic_light_simpletest.py", line 50, in <module>
  File "adafruit_ble_magic_light.py", line 73, in __setitem__
  File "adafruit_ble/characteristics/__init__.py", line 147, in __set__
_bleio.BluetoothError: Unknown soft device error: 3002
#

never mind, I unscrewed the bulb, but maybe it should give a better error

quick gale
#

I can try recovering on a Mac when I get home.

tulip sleet
#

ubuntu is fine; i am using it right now, all the time

#

@quick gale are you surmising that the Input/outpu error is due to corrupted filesystem or is ubuntu reporting it's corrupted?

quick gale
#

Ubuntu's reporting it.

tulip sleet
#

is that the entire thing in the serial window?

quick gale
#

and when I try to load code.py in MU I get "could not load /media/user/CIRCUITPY/code.py"

tulip sleet
#

@quick gale Here is a special dangerous CircuitPython that will erase and reformat the filesystem on every restart. Load this .uf2, make sure things are working, and then load the regular one

#

on Linux, when you copy things to CIRCUITPY from the command line, it's a good idea to use the sync command after you're done copying everything. That will force everything to the CIRCUITPY filesystem immediately.

quick gale
#

Okay, when I dropped that on the drive, I got a "file system is read only" error message in Ubuntu

#

ah

tulip sleet
#

did you double-click first to get the BOOT drive?

#

you load .uf2 files onto the BOOT drive, not the CIRCUITPY drive

quick gale
#

oh, that's right

#

just a sec

#

there

#

Woot

#

better

tulip sleet
#

the Mu editor is good writing immediately to CIRCUITPY, but copying via the command line, sync is a good idea. maybe you copied the 4.1.2 update to CIRCUITPY, and it was really big, and there was an issue??

#

anyway, great! you can squirrel that DANGER uf2 away in case you get stuck again. But usually you can just do the storage.erase_filessytem() from the REPL

pastel panther
#

@tulip sleet I got a crash into the HardFault_Handler while testing on a metro m4 with 5.0 Beta 1

#

@tulip sleet lmk if you want me to do some more poking to narrow down the issue or go ahead and file an issue

#

welp, I powercycled the metro and it seems to be back to normal

tulip sleet
#

@pastel panther go ahead and file an issue with the particulars. There have been various fixes since beta.1 but mostly on nrf.

pastel panther
#

@tulip sleet how many particulars and which ones especially? It's hard to say what exactly caused the issue, especially since it's not doing it anymore

tulip sleet
#

were you testing some I2C device, writing to the filesystem? etc.

pastel panther
#

Ok, will do

tulip sleet
#

were you handling the board at the time, or was it just sitting?

solar whale
#

@tulip sleet after breaking things with --recursive, I just deleted the lib/tinyusb folder then did git submodule sync;git submodule update --init and all was well

tulip sleet
#

yes, but, it shouldn't break with recursive, i think

solar whale
#

something in tinyusb made it very unhappy ....

#

I read, but forgot the error messages it reported.

tulip sleet
#

i recloned, and did git submodule update --init --recursive, and now it's happy. I'm not recommending it, necessarily, but I'd like to understand better why it broke. The stackoverflow page may help.

#

I need to change my alias, and we should change the Building CircuitPython guide, I guess

solar whale
#

here are the errors I saw ```Entering 'lib/tinyusb/hw/mcu/microchip/samd/asf4'
Entering 'lib/tinyusb/hw/mcu/nordic/nrfx'
Entering 'lib/tinyusb/hw/mcu/nxp'
fatal: not a git repository: /home/jerryneedell/circuitpython_master/lib/tinyusb/hw/mcu/nxp/../../../../../.git/modules/lib/tinyusb/modules/hw/mcu/nxp
Stopping at 'lib/tinyusb/hw/mcu/nxp'; script returned non-zero status.
Stopping at 'lib/tinyusb'; script returned non-zero status.

#

during the --recursive

tulip sleet
#

i got the same fatal: not a git repository. It may be that there was a directory that was not a git repo there, and it doesn't like that at all.

solar whale
#

more above that ```Synchronizing submodule url for 'tools/usb_descriptor'
Submodule 'frozen/Adafruit_CircuitPython_SD' (https://github.com/adafruit/Adafruit_CircuitPython_SD.git) registered for path 'frozen/Adafruit_CircuitPython_SD'
Cloning into '/home/jerryneedell/circuitpython_master/frozen/Adafruit_CircuitPython_SD'...
Submodule path 'frozen/Adafruit_CircuitPython_SD': checked out '5ad33e4ca219f0e216beab439cfa259cde32016c'
warning: unable to rmdir 'hw/mcu/nxp/lpc_driver': Directory not empty
Submodule path 'lib/tinyusb': checked out '7a05b177a43b368fea1d60ca344fe4ae9902a432'
Submodule 'hw/mcu/nxp' (https://github.com/hathach/nxp_driver.git) registered for path 'lib/tinyusb/hw/mcu/nxp'
fatal: not a git repository: /home/jerryneedell/circuitpython_master/lib/tinyusb/hw/mcu/nxp/../../../../../.git/modules/lib/tinyusb/modules/hw/mcu/nxp
Failed to clone 'hw/mcu/nxp'. Retry scheduled
BUG: submodule considered for cloning, doesn't need cloning any more?
Submodule path 'lib/tinyusb/hw/mcu/nordic/nrfx': checked out '7a4c9d946cf1801771fc180acdbf7b878f270093'
fatal: not a git repository: /home/jerryneedell/circuitpython_master/lib/tinyusb/hw/mcu/nxp/../../../../../.git/modules/lib/tinyusb/modules/hw/mcu/nxp
Unable to fetch in submodule path 'lib/tinyusb/hw/mcu/nxp'
Submodule path 'ports/nrf/nrfx': checked out '3f55e49eb11e6db0da1da09e189bb094222702c9'
Failed to recurse into submodule path 'lib/tinyusb'

tulip sleet
#

maybe if you just remove that directory and redo the git update, something might work better, or maybe the merge into your fork got messed up becuase of the presence of the directory

solar whale
#

it's all good now

#

btw -- this was not on my fork -- just my clone of master

tulip sleet
#

same here

#

i keep a clone of master for testing

solar whale
#

it had been working for a long time -- something changed in the last few days

manic glacierBOT
#

I was testing my new MCP4728 library when I got a crash into the hardfault handler. Power cycling the device made the issue go away

Hardware is a Metro m4 (purple) with 5.0 Beta 1. The driver in question is an I2C based driver using bus_device but not register. The only connections to the metro were power+I2C.

The crash happed right after my discovery the CP bytearray does not in fact have insert. I was in the process of moving to use extend instead when the crash happened.

Pos...

solar whale
#

bed time here! good night!

tulip sleet
#

good night!

pastel panther
#

@tulip sleet I don't think I was handling the board at the time of the crash but I easily could have been

tulip sleet
#

it's good to have it on record, in case it happens to any one else. thanks!

pastel panther
#

sure thing

manic glacierBOT
manic glacierBOT
onyx hinge
#

@slender iron noticed this https://blog.adafruit.com/2019/12/18/circuitpython-4-1-1-released-adafruit-circuitpython/

Translated messages are now compressed more effectively, preventing certain translated builds from being too large. Thanks @onyx hinge.
I don't think this is in 4.1.2

Adafruit Industries - Makers, hackers, artists, designers and engineers!

4.1.2 is a minor stable release. Most notably, it updates the adafruit_circuitplayground frozen library for Circuit Playground Express. It shouldn’t break any code compatible with previous 4.…

idle owl
#

@onyx hinge Yes, it is.

#

We pulled it in when pinyin didn't fit.

onyx hinge
#

okay, cool

#

thanks to whoever did that back-porting work then!

idle owl
#

Dan πŸ™‚

crimson ferry
prime flower
#

@crimson ferry I just ran into an issue with travis, re-deploying right now. There should be one in a bit. (~3min if travis doesn't error while deploying again)

crimson ferry
#

Ah, nice. Is this the first time for an automated process to create the binary?

#

I can build my own, but my byte count is always different from the release, due to environment differences (path names, etc), so I like to use the released binary to be sure.

onyx hinge
#

it would be "fun" to work on repeatable builds for circuitpython ecosystem

prime flower
#

@crimson ferry nina-fw released with this build system on 1.5.0. The script is similar to IGRR's (Espressif dev), but I do need to manually change the script for each time we build with a new ESP-IDF version

onyx hinge
#

weird, the tilting arpeggios example doesn't appear in the copy of circuitplayground in frozen/ but it does in a clone / online. maybe circuitpython master branch submodule is behind ? Or maybe I missed a step. I did submodule update..

idle owl
#

@onyx hinge Does it strip them before or during freezing?

onyx hinge
#

it ... shouldn't? it should only do that within a copy

#

anyway I found it now so it's all good

#

also to my surprise just removing the 62500 Hz check altogether seems to fix it. I can't vouch for whether the notes are right, I might have a proverbial tin ear plus I'm in a coffee shop trying to test this πŸ™‰

#

bad choices

#
Submodule path 'frozen/Adafruit_CircuitPython_CircuitPlayground': checked out 'd87ea261c40ecbc6d893d72d337beefbea1cf932'
~/src/circuitpython$ cd frozen/Adafruit_CircuitPython_CircuitPlayground/
~/src/circuitpython/frozen/Adafruit_CircuitPython_CircuitPlayground$ git status
HEAD detached at d87ea26
nothing to commit, working tree clean
~/src/circuitpython/frozen/Adafruit_CircuitPython_CircuitPlayground$ ls examples/advanced_examples/
circuitplayground_acceleration_mapping_neopixels.py  circuitplayground_gravity_pulls_pixel.py
#

this is all the way back at release 2.1.4 of the submodule

idle owl
#

Did you PR your fix to 5.x?

#

or only 4.x

onyx hinge
#

the 62500Hz fix? I didn't PR it yet.

#

who should PR updating frozen/Adafruit_CircuitPython_CircuitPlayground for 5.x / master ?

#

nrf pwmaudioout is only in 5.x so I'll PR the fix for master.

idle owl
#

@onyx hinge I meant the fix to deal with subfolders in the examples folder

onyx hinge
idle owl
#

Ok

#

Then that is odd.

onyx hinge
#

I think in 5.x/master the circuitplayground submodule has just not been updated for a long time

idle owl
#

Probably not.

#

My xmas tree is in safe mode. 🀣

onyx hinge
#

that's not good, because doesn't it mean that if you get the latest build from circuitpython.org for cpx, 'import ....cb' won't work?

idle owl
#

@onyx hinge I think perhaps it does mean that. Worth pinging @tulip sleet about it.

manic glacierBOT
onyx hinge
#

@idle owl Just PR'd it instead

idle owl
#

@onyx hinge Also a valid option.

onyx hinge
#

ok, besides the dma lockup I'm deliberately NOT looking at today .. what's next?

idle owl
#

Ooh. Means you're stuck on some other things. What else do you have on your plate?

onyx hinge
#

oh oh there's something that's been bugging me but I don't think it's filed. paste into repl on nrf seems to drop chars for me. I would like it not to.

idle owl
#

FIX IT.

orchid basinBOT
onyx hinge
#

I feel like it's nrf only but not 100% sure and I don't have a samd board to test. Does this sound familiar to anybody else?

#

(no samd boards here at the coffee shop, that is β˜• )

slender iron
#

@onyx hinge I thought I fixed the buffering in. I think out isn't buffered right now

onyx hinge
#
>>> s= ("1234567890123456789012345678901234567890123456789012345678901234567890"
... "123456789012345678901234578901234567890123456789012345678901234567890"
... "12345678901245678901234567890123456789123456789012345678901234567890"
... "1234567890123456789012345678901234567890123456789012345678901234567890"
... "12345678901235678901234567890123456789012345678901245678901234567890"
... "12345678901234567890123456789023456789012345678901234567890123456789"
... "1234567890123467890123567890123456789012345678901234567891234567890"
... "1234567890123456789012345678901234567890123456780123456790123467890"
... "12345679012345678901234568901234567890123456789012345678901234567890")
>>> print(len(s))
615
``` it's sure not happy for me.  Should have been 630 characters, all lines the same length
#

is there code that should be shared but isn't? since this is tinyusb stuff?

tulip sleet
onyx hinge
#

Thanks @tulip sleet

tulip sleet
#

it pulled in and worked with no changes

onyx hinge
#

I love it when that happens

ionic elk
#

@onyx hinge I was having a very similar issue with STM32 dropping characters a while back. If you figure it out please let me know.

onyx hinge
#

Will do

manic glacierBOT
dawn rampart
#

Hi everyone. For those interested I've create a library for the very neat i2c encoder made by Simone Caron: http://www.duppa.net/i2c-encoder-v2-1/ The library works with version 2.1 of the board. The library can be found here: https://github.com/bwshockley/CircuitPython-i2cEncoderLibV21 and I've submitted a pull-request to get it into the CircuitPython Community Bundle.

tulip sleet
#

@gilded cradle can you say what is broken on circuitpython.org? I'd rather not make a new 4.x release just to fix something unrelated to the actual firmware.

#

maybe we can fix it by hand?

#

could we fix it manually, and if we make a new 4.x release later fix it before we do that?

orchid basinBOT
manic glacierBOT
gilded cradle
#

@tulip sleet I submitted a PR to fix by hand, but it will break again if we do any more 4.1 releases without renaming.

tulip sleet
#

got it, I understand, so we just need to rename the board, that's all.

gilded cradle
#

yep

#

Thank you

manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

It was intended that the f.load_glyphs line was fast and did most of the work. However, it actually didn't, because it's necessary to pass in a code point by number, not by string.

Additionally, a little light layer violation is needed to make the check for missing characters fast. This used to be less important, as no fonts had missing characters. However, it would take an appreciable length of time on the Korean translation when failing to find hundreds of different code points.

...

manic glacierBOT
meager fog
#

@onyx hinge did you chat with paintyourdragon about the DMA lockup

onyx hinge
#

@meager fog not yet. Are they on discord or just GitHub?

meager fog
#

github

#

he's also in slack

onyx hinge
#

I have a workaround but it's simply to do displayio without dma 😿

meager fog
#

if you want to be added

#

@onyx hinge do you want to be added

onyx hinge
#

Let's not, for now. I'll follow up on GitHub tomorrow.

meager fog
#

ok

#

@onyx hinge whats the issue

#

give me a link?

onyx hinge
#

I also have some suggestions from Scott of things to investigate and try that I haven't done yet

#

And I saw the workaround used in the Nintendo emulator as well

#

So I'm sure something will work out

meager fog
#

yeah

#

ill ask philb to also suggest anything

#

but mostly we had workarounds

#

they were not super pleasant but they worked (somewhat)

onyx hinge
#

It doesn't match the specifics of that erratum but it's tempting to think it could be related

#

Do you know, does the one in nofrendo(?) Make the audio glitch or is it not noticible?

#

Honestly for JEplayer not dma'ing display is adequate, but in general it is not

meager fog
#

it 'glitches' the video because i set the screen to black

#

but its rare and...nobody complains

#

its only noticable if you're really looking

#

🀷 i think the dma subsystem has bugs that nobody else has noticed cause we use the chip more than anyone

#

ironic cause theres' like 25 channels

#

but if you use more than 1 it hangs

#

:/

#

despite the unpleasantness....if folks are ok with it, could check every 1ms during systick

#

the check is fast

manic glacierBOT
#

Might be related to a couple things I’ve encountered with the Monster M4sk eyes in Arduino.

If it’s the β€œmultiple active DMA channels, one or more with linked descriptors” issue mentioned in the errata above: I don’t have a workaround for this other than change the design of the code if possible to avoid linked descriptors. Had to do this in the eyes, which un-did a small optimization there but oh well, at least it's solid now.

A different problem I’ve encountered involves a DMA-transfe...

onyx hinge
#

@meager fog I hadn't considered checking and kicking in systick.. I'm not sure I know what "the check" is, though

manic glacierBOT
lone sandalBOT
manic glacierBOT
old smelt
#

Is there any documentation on what changes to make for doing a CP build with a different size flash memory part?

tulip sleet
#

@old smelt is the chip in supervisor/shared/external_flash/devices.h

old smelt
#

No, not currently.

#

I was looking at that file earlier today. I suspect that makes things a bit more complicated?

tulip sleet
#

ok, that is the hard part, you'll need to figure out the settings by reading the data sheet. If it's a new manufacturer not in there, it could be tricky

old smelt
#

It's a Giga Device part

tulip sleet
#

you can try imitating one of those, but compare the datasheet for the existing part carefully with the new one. Is this a bigger size than we've used?

old smelt
#

Smaller. We have a couple of boards that were built with 2Mbit parts instead of 2MB. I was wondering if there's anything I can still do with it.

tulip sleet
#

besides that change, you just need to name the chip in boards/<newboard>/mpconfigboard.mk

#

i am not sure this is worth your time, as opposed to just replacing the chips if you want to salvage the boards

#

considering the cost of the chips is minimal

old smelt
#

Whoa... Why was that text red?

tulip sleet
#

discord having trouble sending

old smelt
#

Hmm.. ANyway, I agree. And we will replace them. I was just curious if it was possible.

#

Ah. I've not seen that before.

tulip sleet
#

def possible

old smelt
#

Oh wait - you said to change the makefile. I was thinking of the mpconfigboard.h

#

Yes, saw the references in the .mk file, too.

tulip sleet
#

EXTERNAL_FLASH_DEVICES = "name of new chip"

old smelt
#

Ok. Yes, I see that line. Cool. And that references the definition in devices.h?

#

Won't be much room to do a lot, but I was thinking I could at least get a minimal CP build running.

#

That'd be something

tulip sleet
#

yup, that's all you need to change. you can list more than one device there if the board might be manufactured with more than one type. It looks up the ID at run-time

old smelt
#

Really? That's good to know.

tulip sleet
#

e.g.
EXTERNAL_FLASH_DEVICES = "W25Q64JV_IQ, GD25Q64C"

old smelt
#

Ha! You read my mind. I was just thinking, "I wonder if they are comma-separated."

tulip sleet
#

there are examples already

old smelt
#

Thanks @ivory yew

#

Thanks @tulip sleet

manic glacierBOT
old smelt
#

@tulip sleet - the build worked:
Adafruit CircuitPython 5.0.0-alpha.5-26-g01bf93216-dirty on 2019-12-20; Alorium Technology Evo M51 with samd51p19
Thanks for your help!

manic glacierBOT
tulip sleet
#

@onyx hinge you checked all the latest DMA errata for SAMD51, right?

onyx hinge
#

@tulip sleet in the current document, 2.10 is errata for DMA. It's not 2.10.1 because the channel being newly enabled is higher than the active channels. It's not 2.10.2 because we use equal priorities. It's not 2.10.3 because that's only to do with debug mode.

onyx hinge
#

yes revision J

tulip sleet
#

do we use linked descriptors?

onyx hinge
#

I think audio uses linked descriptors

manic glacierBOT
#

@tannewt Yes, this program continually rotates the given text in 90 degree increments, automatically refreshing:

import board
import displayio
import terminalio
import time
import adafruit_display_text.label

g = displayio.Group()
l = adafruit_display_text.label.Label(font=terminalio.FONT, text="hi mom")
l.x = l.y = 32
g.append(l)
board.DISPLAY.show(g)

while True:
    board.DISPLAY.rotation = (board.DISPLAY.rotation + 90) % 360
    time.sleep(1)
#

In jeplayer, I ran into the following hang when I had a bitmap on SD and I also manually called refresh. The problem appears to be linked to the fact that the same file is being "f_read" recursively; these reads both make calls out into Python to the single, non-reentrant SD card library. I suspect, but don't know how to verify, that the inner call is waiting for the SPI device to become available.

Should it be the case that display background is inhibited during an explicit refresh?

...

onyx hinge
#

OK so I'd said that I had what I thought was a quicker lockup that might also be DMA, but it wasn't .. it was this ^^

manic glacierBOT
#

Should it be the case that display background is inhibited during an explicit refresh?

That would certainly make sense, since both call _refresh_display(). There's a test for recursivity in displayio_background() and there should probably be one in _refresh_display() as well. Maybe they could share the recursive-check flag. Or displayio_background() would depend on a new recursivity check in _refresh_display().

solar whale
#

@tulip sleet a question came up about putting CP on a Nano 33 sense -- There is a .uf2 for it, but do you first have to put our uf2 bootloader on it with a JLink?

tulip sleet
#

yes, and then it breaks using it in Arduino. You need our UF2 bootloader because it includes the SoftDevice too, which CPy needs. I think this is kind of a mess - you have to commit to using the board for one or the other unless you're prepared to keep swapping bootloaders

#

the Arduino BLE support does not use the SoftDevice

solar whale
#

OK -- that is what I thought -- I'll pass the info along

tulip sleet
#

tnx!

manic glacierBOT
onyx hinge
#

okay the good news is, I captured a DMA hangup and as promised by resetting the stuck channel (manually in gdb) it unstuck

#

I have a new problem which is that occasionally I am getting "crunchy" audio, but restarting audio playback fixes it

idle owl
#

Hooray for a new problem!

onyx hinge
#

(i.e., next/previous track buttons)

idle owl
#

πŸ™„ software.

onyx hinge
#

this project keeps me guessing, that's for sure

idle owl
#

Stay on those toes, Jeff. Stay on those toes.

onyx hinge
#

it's better than having someone else on my toes

idle owl
#

valid.

manic glacierBOT
#

Another scenario is displayio refresh + mp3:

#0  mp_load_method_maybe (obj=0x20007080, attr=888, dest=0x2002ed2c) at ../../py/runtime.c:1063
#1  0x00027fc0 in mp_load_method (base=0x20007080, attr=888, dest=0x2002ed2c) at ../../py/runtime.c:1091
#2  0x00039b8c in mp_load_attr (attr=<optimized out>, base=<optimized out>) at ../../py/runtime.c:929
#3  mp_execute_bytecode (code_state=code_state@entry=0x2002edb0, inject_exc=<optimized out>, inject_exc@entry=0x0) at ../../py/vm.c:331
#4 ...
meager fog
#

@onyx hinge hihi

#

ill try to be here in discord more often so ya can poke me πŸ™‚

onyx hinge
#

πŸ‘‹

#

if it makes more sense for me to get onto the slack I can do that too

meager fog
#

oh yah oki ill add ya!

#

@onyx hinge use your gmail addr?

onyx hinge
#

jeff@river quest I suppose? I don't use slack otherwise.

#

argh I forget that mentions you-know. hopefully he doesn't notice/mind

meager fog
#

lol is ok

#

alright ill send it now

#

oki done

#

anywho

#

so - with the dma nonsense

#

do you want to dig into it (not most fun - has to happen eventually)

#

or do you want to not draw while playing audio (workaround)

onyx hinge
#

if we're going to have icons and navigate them with the joystick, it pretty much needs draw-during-audio

#

(switching over there ->>>)

slender iron
#

<@&356864093652516868> any objections to me releasing beta.2 today?

meager fog
#

gopher it!

#

πŸ™‚

stuck elbow
#

none

tidal kiln
#

None

manic glacierBOT
onyx hinge
#
GitHub

Merge pull request #79 from kattni/board-handling
Merge pull request #75 from kattni/remove-simpleio
Merge pull request #74 from kattni/bluefruit
Merge pull request #73 from adafruit/dherrada-patch...

GitHub

.. and it gets in the way of some example programs, due to the way circuitplayground library generates different frequency sine waves
Closes: adafruit/Adafruit_CircuitPython_CircuitPlayground#78

#

I don't know of anything newly and egregiously broken

gilded cradle
#

Otherwise, no objections.

idle owl
#

@slender iron Can we get the frozen Circuit Playground library updated as well please? Not sure if it was already and that's done, or if it needs to be done specifically.

slender iron
#

looking at the prs now

onyx hinge
#

@slender iron thanks for the merges!

meager fog
#

merrrrge party

slender iron
#

πŸŽ‰

#

my favorite thing before releasing on a Friday πŸ˜›

onyx hinge
#

I'm about to go out for pizza, I'll consider it a celebration

pastel panther
#

@slender iron dooooo eeeeeeet

drowsy geyser
slender iron
#

except the answer is yes

#

and I'm going out of town this weekend πŸ™‚

onyx hinge
#

@slender iron safe travels!

quasi fjord
#

clearly the correct answer is the schedule an automated deployment at 1am...when you're on a plane

meager fog
#

just click deploy and then immediately shut your laptop

#

live, love, package with no regrets

drowsy geyser
#

@meager fog Is that like, "In case of fire, git commit, git push, run"?

solar whale
#

What could go wrong? πŸ˜‰

drowsy geyser
#

@solar whale It depends if you're Boeing?

#

(not referring to the 737Max, referring to the Starliner software bug that caused mission failure this morning - 'cause nobody died there.)

solar whale
#

I thought so -- another "software" issue though...

drowsy geyser
#

Yeah, they need to do some SDLC tweaking.

drowsy geyser
#

This might be the wrong channel, but when writing CircuitPython applications we should take into account accessibility issues, e.g., non-hearing users. Does Adafruit have a list of these considerations we should accomodate?

slender iron
#

@drowsy geyser definitely good to do. we don't have anything official though

drowsy geyser
#

Thanks, @slender iron . I'll update the spec with some considerations. I'll have to ponder it a bit to see if there's an industry recommended approach.

solar whale
#

Hooray!! after a 8 hour build, I now have a working build of gcc-arm-none-eabi-9-2019q4-major running on my Raspberry Pi 4 !! just successfully compiled a Circuitpython board -- WooHoo! It actually went quite smootly from the source tarball -- there was one package not installed that made the first attempt fail after about 7 hours!!

raven canopy
#

@solar whale oh dear. i haven't gotten back to that stage of my project. thanks for undertaking the first trial!

drowsy geyser
#

@solar whale I run mine on a very high-end System76 Linux laptop. Reminds me of when Seymour Cray visited Apple. Steve Jobs proudly told him "we're designing the next Mac with a Cray." Seymour replied, "oh, I'm designing the next Cray on a Mac."

solar whale
#

I now have tarball of the binaries if you want it.

old smelt
#

Where does the release name come from when doing a local build? 5.0.0-alpha.5-26-g01bf93216-dirty

raven canopy
#

iirc, its the tag+commit_sha+dirty (dirty meaning uncommited/merged changes)

old smelt
#

Ok.

#

How can I build a clean released version?

#

Say I wanted 5.0.0-beta.1 ?

#

But build it locally for our board.

slender iron
#

@old smelt you should be able to check out the tag

old smelt
#

Ah. Okay.

#

Yeah I just updated the repo before building.

slender iron
#

it'll be dirty if you add a board def

old smelt
#

Which I did

slender iron
#

you may need to rebase your commits onto the newest tag. (about to tag beta.2 too)

orchid basinBOT
solar whale
#

@slender iron Congratulations! Have a great holiday break!

slender iron
#

thanks @solar whale

old smelt
#

@slender iron - sounds good. Maybe I should wait for beta.2 and then start fresh on adding our board?

slender iron
#

@old smelt just tagged it πŸ™‚

old smelt
#

Whoa! And you're not offline already? I though you had a tight tag and fly plan. πŸ™‚

slender iron
#

not sure when I'm actually leaving. mixing in packing (just for two days) and babysitting the release

old smelt
#

Nice.

Also - the Add a New Board guide recommends opening an issue for a USB PID. In the long run, I think we'll get our own VID, but we don't have it yet. I'd like to start the process of adding our board to CP in the not-too-distant future, but I'm not sure the best route how to handle the USB VID/PID stuff. I don't want to squander Adafruit PIDs if we are getting our own later.

This is new territory for me. @meager fog - any guidance here?

slender iron
#

@meager fog may have an opinion. We haven't had anyone at that point yet

old smelt
#

Ok, thanks. I'll go add a mention to my question.

#

Safe travels and have a great trip!

slender iron
#

thanks!

orchid basinBOT
meager fog
#

@old smelt go ahead and request one - its when requests get into 3 or more boards that we ask people get their own VID

old smelt
#

Sounds good. Thanks!

orchid basinBOT
meager fog
#

@ionic elk ok i got the pyb mini

#

want me to try it/anything?

orchid basinBOT
manic glacierBOT
slender iron
#

ok, release is out and blogged

orchid basinBOT
plucky flint
#

Hi folks... I'm about to step away for holidays. Season's greetings to you all and a happy new year. Here's to CircuitPython's continued flourishing in 2020. β›„ πŸŽ… πŸŽ‰

slender iron
#

You too @plucky flint ! We'll do #circuitpython-dev2020 posts in January so start brainstorming. πŸ™‚

drowsy geyser
#

I guess I better get my new library done well before January, then.

idle owl
#

@plucky flint Have a wonderful holiday!

manic glacierBOT
pastel panther
#

heya @slender iron did you upgrade to Catalina yet? If so, any gotchas?

slender iron
#

ya, I did early on

#

and yes, but doable

#

be ready with the security settings box open to OK a bunch of unsigned binaries

pastel panther
#

ok, thanks for the tip

#

I think I had heard an option to turn off checking for unsigned bins but that seems like a bad idea.

teal bear
#

I'm looking for the python? code that links ports/atmel-samd/boards/circuitplayground_express/pins.c#L7 { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA05) }, and cpx.touch_A1 ... or what sets the .. io direction?

tulip sleet
#

@teal bear touchio is a native module, so you won't see a Python impl of if

#

is that what you're asking?

teal bear
#

maybe - leme find it...

teal bear
#

touchio.TouchIn yes.. that. thanks

#

whoever decided to hid this from the happy user ... good call

tulip sleet
teal bear
#

it's also a little complicated if all you want to do is turn on a light

tulip sleet
#
import board
import touchio
a1 = touchio.TouchIn(board.A1)
while True:
    if a1.value:
        print("touched")
#

i agree it's harder than cp.touch_1

teal bear
#

touchio.TouchIn(board.A1) <- more dragons

ruby atlas
#

Apparently I need BUILDING.md already (both for the git submodule commands and for the JLink/gdb stuff!)

manic glacierBOT
#

The attached file illustrates an interesting memory issue that's significantly different between Feather STM32F405 (192k RAM) and Adafruit M4 devices with 192k RAM. The code is simple, and mainly has hundreds of lines just incrementing a dummy variable. The file has just over 1700 lines of code, one line makes the difference between having enough memory or not.

Found this trying my main application (much more complex, with many more imported modules and libraries), with ~1900 lines of code...

#
import sys
import os
import time
import gc


print('-'*49)
print("Checking CPU...")
print(os.uname().machine)
print("CircuitPython", os.uname().version)

dummy = 0
dummy += 1
dummy += 1
dummy += 1
dummy += 1
dummy += 1
dummy += 1
dummy += 1
dummy += 1
dummy += 1
dummy += 1
dummy += 1
dummy += 1
dummy += 1
dummy += 1
dummy += 1
dummy += 1
dummy += 1
dummy += 1
dummy += 1
dummy += 1
dummy += 1
dummy += 1
dummy += 1
dummy += 1
dummy += 1
dummy += 1
dumm...
crimson ferry
#

Can someone sense-check something for me on a Feather STM32F405?

#

5.0.0-beta.1 doesn't do this, but 5.0.0-beta.2 does: Can't get it to show up on USB (macOS). Program with just a single print statement seems to run to completion (pulsing green NeoPixel), but no sign of the device in USB or as a Volume. In bootloader mode, it shows up fine (via system_profiler SPUSBDataType or dfu-util). Tried redownloading beta.2, reloading into device, etc.

#

If I revert to beta.1, it's all good again.

onyx hinge
#

@crimson ferry if you have github, will you file an issue please? I can check it out but not for awhile. It would be better not to let stuff get lost while the holidays are going on!

crimson ferry
#

@onyx hinge OK, will do. I was planning to, but thought I'd find out if I was missing something first. But I'll file one.

onyx hinge
#

we appreciate it

manic glacierBOT
#

Using macOS Catalina (10.15.2), can't get the STM32F405 to mount as CIRCUITPY under 5.0.0-beta.2. Using 5.0.0-beta.1, it mounts fine.

A one-liner code.py with just a single print statement seems to run to completion (pulsing green NeoPixel), but no sign of the CIRCUITPY device using system_profiler SPUSBDataType, or as a USB Volume. In bootloader mode, it shows up fine (via system_profiler SPUSBDataType or dfu-util). Tried re-downloading beta.2, reloading into device, power-cycling, ...

drowsy geyser
#

I think I borked something. I got a new PyBadge, so I built the latesst CircuitPython. When I loaded it, it said "line 6: board no such module". Since board is supposed to be compiled in, I was suspicious. I blew away my source tree and rebuilt the whole thing. When I flashed the new firmware, same problem. I'm sure I'm just doing something stupid probably because it's late and I should be asleep. But, can anyone advise? The build was clean.

manic glacierBOT
manic glacierBOT
#

I have reproduced this on a Linux system -- no CIRCUITPY or /dev/ttyACM0 device
The issue actually began before the 5.0beta-2 tag -- the first build I have that fails to mount is:
adafruit-circuitpython-feather_stm32f405_express-en_US-20191218-25df6e6.bin

Interestingly -- there is no information in dmesg when I plug in or reset the board
The status neopixel is "breathing" green -- looks like a normal startup but no /dev/ttyACM0

manic glacierBOT
solar whale
#

@drowsy geyser sorry -- all I can offer is a "works for me" I built CP 5.0Beta2 and loaded it into aPyBadge ```Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.

Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 5.0.0-beta.2 on 2019-12-20; Adafruit Pybadge with samd51j19

import board
dir(board)
['class', 'A0', 'A1', 'A2', 'A3', 'A4', 'A5', 'A6', 'A7', 'A8', 'A9', 'ACCELEROMETER_INTERRUPT', 'BUTTON_CLOCK', 'BUTTON_LATCH', 'BUTTON_OUT', 'D0', 'D1', 'D10', 'D11', 'D12', 'D13', 'D2', 'D3', 'D4', 'D5', 'D6', 'D7', 'D8', 'D9', 'DISPLAY', 'I2C', 'LIGHT', 'MISO', 'MOSI', 'NEOPIXEL', 'RX', 'SCK', 'SCL', 'SDA', 'SPEAKER', 'SPEAKER_ENABLE', 'SPI', 'TFT_CS', 'TFT_DC', 'TFT_LITE', 'TFT_MOSI', 'TFT_RST', 'TFT_SCK', 'TX', 'UART']

manic glacierBOT
onyx hinge
#

I plan to add an API to MP3File so that the opened file can be changed hopefully without doing any memory allocations. I wonder, maybe I can just make the ".file" property assignable? Otherwise, what would the function be called?

drowsy geyser
#

@solar whale Thanks! -beta.2 from that link has the same behavior.

#

I wondered if I had broken something because when I got a box of CPBs I built Beta 1 for them and they worked fine. I'm curious if this is PyBadge specific for some reason.

#

I'll try it on a Feather M4 Express after I've been awake more than 10 minutes. πŸ˜‰

#

Kinda let the caffeine and ADHJD meds hit the bloodstream. blinkacomputer

solar whale
#

@drowsy geyser you may want to make sure there is nothing odd on the file system. Delete any old code.py or wipe the file system and reload.

drowsy geyser
#

Ok, I'll do that. BTW, I did ```
git submodule sync
git submodule update --init --recursive

#

@solar whale Well that's odd. I deleted code.py and lib and when I connect to the REPL I can import board just fine....

#

I'm using the library bundle for 5.x from the 16th, so that should be good, yes?

#

(Starting to wake up. Thank you for the help! And I was all ready to blame Scott's "release and leave" model.)

crimson ferry
solar whale
#

@drowsy geyser BTW drop the β€”recursive. Should not need it anymore and it might cause problems.

#

That’s new

drowsy geyser
#

Ah, ok. I'll drop a note to Kattni to edit the "Building CircuitPython" guide. πŸ™‚

solar whale
#

I think it has been updated

drowsy geyser
#

Wow. My brain probably just added the --recursive 'cause that's what I always did. Thanks!

#

Now that I have it working, is there a list of the libraries that PyBadge needs for basic functionality (i.e., before FeatherWings and sensors?)

#

I didn't see one in the guide....

solar whale
#

I have to go offline. Check for the pybadger guide.

drowsy geyser
#

Okie doke. Thank you again for the help!

manic glacierBOT
#

It appears to be fragmentation-related, and it's sudden. If I instead do repetitions of this code before the loop (less than 1000 lines of code before hitting MemoryError: memory allocation failed, allocating 12345 bytes):

dummy += 1
print(dummy, gc.mem_free())

then do...

gc.collect()
print(dummy, gc.mem_free())

Output is:

444 79040
445 79040
445 79120
-------------------------------------------------
Loop...
202.695 79040
idle owl
#

@drowsy geyser @solar whale The guide had not been updated. It has been now.

#

You're thinking of the conversation surrounding the new BUILDING.md. It was updated there.

tulip sleet
#

@onyx hinge an MP3File.file property sounds fine. But maybe then the class should be called MP3Stream or something?

onyx hinge
#

I named it like WaveFile, but you might be right

tulip sleet
#

well, if WaveFile could do the same thing, then we could just be consistent. I was just wondering how immutable these are meant to be (also things like OnDiskBitmap)

#

it's not MP3Player because the .play() is elsewhere, right?

#

it's a bit of a weird secret that mp3.file = would be more efficient than creating a new object

#

maybe it's a "leaky abstraction"

idle owl
#

@gilded cradle You around?

gilded cradle
#

Hi Kattni

idle owl
#

If you know, figured you might.

gilded cradle
#

Let me check

#

I think pt said 93

idle owl
#

That's what I thought as well

#

"Nearly 100" will be valid then.

gilded cradle
#

yeah

idle owl
#

Or 90+

#

Trying to write a quick 2019 closing blurb in the notes doc, and wanted to mention it.

gilded cradle
#

Looks like 94

idle owl
#

Ok. Thank you!

gilded cradle
#

yw

#

I just go to the site and count the number of rows each time

idle owl
#

oi... if I had known, I would have done that! I figured you had some magic grep thing or something.

gilded cradle
#

Probably some easier way, but I haven't looked into it

idle owl
#

Sorry about that πŸ˜„

gilded cradle
#

No problem

idle owl
#

Thank you so much for doing that

gilded cradle
#

yw

#

Maybe we should just display a count on the page or something

idle owl
#

Not a bad idea. File an issue maybe?

gilded cradle
#

Sure

raven canopy
#

there is a report now that says how many boards are supported... πŸ˜‰

idle owl
#

@raven canopy πŸ™„

#

of course.

raven canopy
idle owl
#

Well NYAH then. πŸ˜›

raven canopy
#
Number of supported boards: 97
gilded cradle
#

I wonder what the discrepency is. Maybe some disabled ones.

raven canopy
#

could also be some of the newer ones that aren't added to the site yet?

#

Β―_(ツ)_/Β―

gilded cradle
#

We just released a new CP and threw up 2 boards yesterday.

#

It should match

onyx hinge
#

@tulip sleet I assume that it's memory fragmentation, but jeplayer eventually crashes with out of memory, typically when creating the MP3File object for the new song to be played next..

#

where "eventually" is "maybe << 20"

raven canopy
#

@gilded cradle robothamm1 (original) is still listed on the report, so that's 1 of 3.. πŸ˜„

gilded cradle
#

Yeah, that should be gone now.

raven canopy
#

hmm. can't find cp32 & datalore... they're in the data file and have a _board/x.md. but that would make 3.

idle owl
#

<@&356864093652516868> Here is the notes doc for the NOTES ONLY Edition of the CircuitPython Weekly, wrapping up on 27 December 2019. THERE WILL NOT BE A RECORDED MEETING THIS MONDAY OR THE NEXT. Everyone is welcome to add notes! Please feel free to add your Hug Reports and Status Updates throughout the week. We will be posting the notes doc to GitHub as usual. The next recorded meeting is 6 January 2020. I will post another reminder later in the week with the link and the meeting schedule. Thank you so much for everything you do. We'll see you in the new year! https://docs.google.com/document/d/1qcUDQqpMWpGJG-k72A39dbQ3a86JXMlnighWci6pS20/edit#

gilded cradle
#

It's what is in _data/files.json that counts

#

That for the detective work anyhow.

raven canopy
#

solved. both the cp32 and datalore boards have downloads_display = false. that was bugging me. πŸ˜„

idle owl
#

@raven canopy I knew you were still figuring that out.

raven canopy
#

🐿️!! its a condition...

#

also, the curse of idle time while waiting on a deployment..

idle owl
#

For a total of 307 NeoPixels.

raven canopy
#

not. enuff. need. moar. πŸ˜„

#

there's still time. (it is beautimas, btw!!!)

idle owl
#

The code is crazy, there's this aggregate pixels thing that maps out the whole tree vertically and horizontally I believe, for animations that go around the tree in different ways.

#

Roy really wants to make it so an animation goes up the tree to the star and explodes outwards. The pixels in the star are in series so they can all be sliced as needed.

#

The star happens to fit 5 NeoPixel sticks and a jewel. Didn't plan it that way, simply printed the first hollow decent looking one I could find.

crimson ferry
#

Has anyone built mpy-cross in Catalina? sudo to get past all the permissions issues (o_O), then I'm getting errors I don't grok: make: msgfmt: No such file or directory make: *** [build/genhdr/en_US.mo] Error 1

raven canopy
#

@crimson ferry iirc, that error is related to not having gettext installed.

crimson ferry
#

Hm, had an outdated version, but same error with upgrade

idle owl
#

@crimson ferry Scott ran into all kinds of issues upgrading to Catalina, almost all of them security related. I don't know how gettext works but it could be a security issue. I don't know the details well enough to assist further than informing you of the vague possibility. Scott is out, so he's not available to assist either.

crimson ferry
#

Thanks, sudo seemed to get past of tons of permissions issues (probably not the best way), I'll keep digging.

solar whale
#

@crimson ferry I don't think mpy-cross has changed sinc 3.x so it sohuld be OK

crimson ferry
solar whale
#

good -- I am not haveing any issues with Catalina -- once I dealt with the security issues

drowsy geyser
#

I use my Mac (Catalinia) for writing files from my NAS down onto boards. πŸ™‚

#

@idle owl Should I just have gone ahead and modified that guide (how to build circuitpython)? I thought it would be more polite to just let the author know....

manic glacierBOT
idle owl
#

@drowsy geyser Either way is fine. I didn't write that one anyway.

drowsy geyser
#

Yeah, in the feedback form I said "Hey @tulip sleet ..." πŸ˜‰

#

Thanks, @idle owl !

ruby atlas
#

Sigh, found a new fun one with subclasses of native classes. Native methods don't get the instance handed to them. The protocol used for properties works great, so I think I probably need a custom attr handler.

tulip sleet
#

@ruby atlas there are several examples in displayio of Python subclasses of native classed, I think extracting the instance.

timber remnant
#

Is there a known way to add QSPI or SPI RAM to the Edge Badge? I'm willing to create hardware and software, but I don't need to re-invent it. Can't find any examples after searching. I need to record signals. Flash would get hot and wear out quickly. I am admiring the QSPI-capable RAM chips such as http://www.issi.com/WW/pdf/IS62-65WVS5128FALL-BLL.pdf ( ISSI IS62WVS5128FALL-20NLI ).

manic glacierBOT
tulip sleet
#

@timber remnant the QSPI bus is already in use for the QSPI flash chip, and chip-select pin on the flash is tied high, so you'd have to do some unsoldering etc if you wanted to share the QSPI bus. But you could use regular SPI on the Feather header pins. Or you could use an SD card with the Adalogger FeatherWing (https://www.adafruit.com/product/2922) and write gigabytes of data. It depends on your application.

manic glacierBOT
#

CP5.0.0 Beta1 running on STM32F405 will not initialize the SPI bus using busio.SPI(), but will run using board.SPI().

Bootout: Adafruit CircuitPython 5.0.0-beta.1 on 2019-12-10; Feather STM32F405 Express with STM32F405RG

import board
import busio
import digitalio

spi = busio.SPI(board.SCK, MOSI=board.MOSI)    # setup SPI bus

# Results in:

main.py output:
Traceback (most recent call last):
    File "main.py", line 10, in 
ValueError: In...
ruby atlas
#

@tulip sleet thanks.

tulip sleet
#

i might be repeating myself. Look for mentions of "native" in those C-implemented classes.

ruby atlas
#

Hmm... I'll poke around more in there when I have time (tomorrow probably!)

#

looks like native_group in Group.c might be a clue.

tulip sleet
#

yup, Group was one I remembered

ruby atlas
#

what's not clear is if overridden native methods in Group behave the way I need (a native method call being able to call a subclass method -- specifically for native .fill() to call .show() ).

tulip sleet
#

i think that is the idea, but I'm not sure

ruby atlas
#

hmm, native_pixelbuf is pretty much the same as native_group . The only thing I don't do is assert that it must be subclassed, because PixelBuf is usable natively. Anyhow, it gives me something else to test with!

timber remnant
#

@tulip sleet My application is to keep taking data with different sensors, process, and display it as quickly as possible with CircuitPython. The code is on github with an MIT license. Recently it has been refactored into a Model-View-Controller structure. Check it out, the sensors channels all inherit from the same base class.
https://github.com/tomacorp/edgemicscope

manic glacierBOT
manic glacierBOT
cursive condor
#

can someone confirm that accessing accelerometer via lis3dh is faster than using cp.shake() ? (on a circuit playground bluefruit)

meager fog
#

yes, shake does a lot of waiting around - its meant for ease not speed πŸ™‚

cursive condor
#

ok. I noticed the snowglobe animation with tft gizmo was slower with cp.shake(). thanks a lot πŸ™‚

astral dagger
#

Hey, all – brand new to circuit python, and have got an oddness with two brand new Feather M0 boards

#

I can run the bootloader, install the current version of CP, and then ... no CIRCUITPY

#

I can get to the REPL on the serial console, no problem

#

Since I've done nothing with the boards thus far, I figure a therapeutic reset may be in order

#

but I can't seem to erase the filesystem on either board:

#
>>> import storage
>>> storage.erase_filesystem()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: Invalid pins```
#

without the filesystem mount, I'm pretty much stymied. (OSX, 10.14, for what that's worth)

raven canopy
#

@astral dagger that...is def a confusing exception. i would try loading 4.1.1. also, could you file an issue on what you're seeing? we're in a holiday lull right now..

astral dagger
#

Can do!

#

(I was actually getting two boards together to do some holiday tinkering during my own lull, but I'll downrev and see if the behavior changes)

raven canopy
#

off the top of my head, 4.1.2 likely saw some USB and build toolchain changes at minimum. could be the cause... but i'll let the experts talk to that.

astral dagger
#

oh dang it

#

well, this is what rubber duck debugging does for one

#

short form: Feather M0 Express != Feather M0 Basic

#

I'll just be slinking off into the "can't read, shouldn't ever go on the internet" corner over here

raven canopy
#

ahh. hehe. i've got that t-shirt too! (i think most of us do.)

astral dagger
#

and lo! When I actually install the right !@#$ firmware, CIRCUITPY shows up.

raven canopy
#

invalid pins is still an interesting error message. but likely due to the VM/board reset functions.

astral dagger
#

thanks for your patient understanding. πŸ™‚

stuck elbow
#

I wonder if it would make sense to not even compile the erase_filesystem machinery on the non-express boards, could save some flash space

raven canopy
#

imo, erase_filesystem falls in the "better to have it, and not need it. then to not have it, and need it." category. πŸ˜„

#

granted, if we can keep board_DANGER_erase_filesystem.uf2 readily available, then its definitely an option.

stuck elbow
#

well, on non-express boards you can erase the filesystem by simply re-flashing the original uf2

#

no need for a special uf2, since the filesystem is on the chip's flash

raven canopy
#

huh. i thought it still left the fs intact, even on internal...

stuck elbow
#

only if the uf2 is smaller than your flash

manic glacierBOT
manic glacierBOT
fierce girder
#

@idle owl @slender iron is there CircuitPython meeting this monday (Dec 23)?

solar whale
fierce girder
#

Ok thank you

manic glacierBOT
stuck elbow
#

Anybody had this problem?

circuitpython/lib/tinyusb$ git submodule update
fatal: not a git repository: /home/sheep/dev/circuitpython/circuitpython/lib/tinyusb/hw/mcu/nxp/../../../../../.git/modules/lib/tinyusb/modules/hw/mcu/nxp
Unable to find current revision in submodule path 'hw/mcu/nxp'
tulip sleet
#

@stuck elbow yes, jerryn and I ended up recloning the repos. it seems to be because the nxp dir was initially not a repo, and it can't recover (but I haven't looked at it in detail). You might try deleting the directory completely and git submodule update again, but for me it was easier just to trash and re-clone.

#

We thought it was due to git submodule update --recursive, but I see you are NOT including the --recursive, and it still fails

stuck elbow
#

I just re-cloned as well, thanks

manic glacierBOT
manic glacierBOT
onyx hinge
#

@slender iron jeplayer is driving a lot of changes in the core. do you want multiple PRs when they're separate identifiable topics, or can I just go ahead and accrete stuff? It's pretty much combined to audio DMA + MP3File changes at this point, but might get into displayio if I'm not careful

slender iron
#

@onyx hinge one big PR is fine. I'm only lurking the next week or so

#

and I don't want to slow you down

onyx hinge
#

okie dokey. if you want me to split it later, that's fine. (I try to group within commits so they're different topics)

#

wooooo! I got a DMA hang detected + kicked

stuck elbow
#

what was it?

onyx hinge
#

well, it's whatever this samd51 DMA bug is

#

i'm detecting it a little differently than nofrendo did, by checking whether the new DMA started happening or not within a small time window

stuck elbow
#

and congratulations

onyx hinge
#
    // CHSTATUS.reg = 0x3 (BUSY | PENDING).  On the other hand, this is a
    // legitimate state for a DMA channel to be in (apparently), so we can't use that alone as a check.
    // Instead, let's look at the ACTIVE flag.  When DMA is hung, everything in ACTIVE is zeros.
    bool is_okay = false;
    for (int i=0; i<10 && !is_okay; i++) {
        bool complete = true;
        if (rx_active) {
            if (DMAC->Channel[SHARED_RX_CHANNEL].CHSTATUS.reg & 0x3)
                complete = false;
        }
        if (tx_active) {
            if (DMAC->Channel[SHARED_TX_CHANNEL].CHSTATUS.reg & 0x3)
                complete = false;
        }
        is_okay = is_okay || (DMAC->ACTIVE.bit.ABUSY || complete);
    }
    if (!is_okay) {
        dma_kick_count ++;
        for (int i=0; i<AUDIO_DMA_CHANNEL_COUNT; i++) {
            if(DMAC->Channel[i].CHCTRLA.bit.ENABLE) {
                DMAC->Channel[i].CHCTRLA.bit.ENABLE = 0;
                DMAC->Channel[i].CHCTRLA.bit.ENABLE = 1;
            }
        }
    }
``` is what I've got right now, dunno if it's what the final form should be or not.
#

and I wasn't in the room when the code activated so I don't know if it produced an audible glitch or not. but in any case, I'll take it for now...

stuck elbow
#

a glitch is definitely better than a hang

manic glacierBOT
#

@anecdata I'm sorry I didn't get on here sooner, I could have saved you some time on this. The memory of the F405 is not contiguous - οΏ½οΏ½οΏ½οΏ½οΏ½128KB exist at address 0x2000_0000 - 0x2001_FFFF, but the remaining 64KB is Core Coupled Memory (CCMRAM) at address 0x1000_0000. Currently we do not use this extra RAM at all, pending flash improvements where it will be used to buffer the internal filesystem to increase it by 64KB and improve read/write speeds (Micropython uses it for the same purpose). Yo...

modern wing
#

I'm sorry I've been away for a bit, but I'm assuming no call today?

drowsy geyser
#

Google Doc only, @modern wing ...

modern wing
#

Gotcha, thanks @drowsy geyser

drowsy geyser
#

I'm just a relay. Message is from @idle owl . πŸ˜‰

modern wing
#

You've passed the message baton with grace and strength πŸ˜›

The last few weeks, I've had....life...happen on Mondays, and I just haven't gotten to the recordings. So today I'm available!.....and we're doc-only haha.

main meteor
#

Would that be a bΓ’ton violet?

idle owl
#

<@&356864093652516868> No meeting today! We are doing a notes-only edition that will be ending on Friday 27 December 2019. Notes doc is here: https://docs.google.com/document/d/1qcUDQqpMWpGJG-k72A39dbQ3a86JXMlnighWci6pS20/edit#

onyx hinge
#

Group hug into the void!

stuck elbow
#

if you hug the void long enough, the void hugs back

drowsy geyser
#

If you hug the void long enough you reach the heat death of the universe.

stuck elbow
#

for some value of "you"

old smelt
#

"Hug the Void" would make an excellent name for a rock band.

stuck elbow
#

or "Void Huggers"

drowsy geyser
#

"... for some value of you" ROTFL!

#

Void Huggers = shades of Alien

stuck elbow
#

@drowsy geyser I mean, long before the entropy reaches maximum, the particles will be too far apart to interact β€” hard to sustain life in such conditions

drowsy geyser
#

This is true.

modern wing
#

@old smelt Your line about "...good name for a rock band" reminds me so much of the humor columnist Dave Barry. πŸ™‚

drowsy geyser
#

Which reminds me, I need to say Happy Holidays to a few people, Matt O'Dowd and Diana Cowern included.

turbid radish
#

Happy holidays to you all. We'll have some great CircuitPython in 2020 which is saying something as 2019 was spectacular.

old smelt
#

@modern wing - that's exactly where it came from!

#

I was a big fan.

#

I have an Evernote note filled with names.

#

Another name recently inspired by this Discord channel is "Tarball of Binaries" which I think I owe to @solar whale .

manic glacierBOT
#

@dhalbert I don't think stack use is a feasible use case for CCMRAM, since it is tied to the Data bus and is inaccessible to any form of DMA (which we don't use much now but will probably want to soon with audio stuff). The primary reason it exists is to execute code while concurrent memory operations are occurring in the main SRAM, to increase performance in parallel. We'd have to find a use case for it that excludes any possibility that something outside the data bus would attempt to use it...

#

@hierophect Thank you for the explanation about RAM structure. 128k makes perfect sense now.

I still have two questions:

  1. Does gc.mem_free() report total free RAM, or just contiguous RAM available to CP?

  2. Doesn't it seem odd that the (relatively simple) code will fail suddenly and request a large chunk of memory, at different amounts of free memory in the two code scenarios above... but only when it's not pre-compiled?

#

I agree that the 128K of RAM should be put on the product page, since this isn't at all obvious. @ladyada you ok with me going in there and adding an note?

I'll have to defer to @dhalbert on the gc.mem_free without doing more research - I don't implement any of the garbage collector functionality on the port level. Dan, does gc extract heap information out of the linker file? I notice that the F405 linker lacks the two lines

_heap_start = _ebss; /* heap starts just after static...
#

@ladyada Maybe adding a note somewhere saying that only 128KB of RAM is accessible for micropython or circuitpython despite 196KB being listed for the MCU, since anyone just skimming the datasheet or looking at the STM32 product page would totally miss all this CCRAM stuff.

That said, I see we don't actually have any mention of the device RAM on the product or learn pages; are they already omitted for this or another similar reason?

ionic elk
#

@stuck elbow also having the submodule update issue. Making an issue on Tusb now.

manic glacierBOT
#

@ladyada

I think a note in the Circuitpython Setup/Circuitpython Notes would be good:

Note for advanced users: if you are intending to start a project that is very RAM intensive, note you cannot access the full 196KB of RAM that listed on the F405 datasheet and website - only 128KB is available to Circuitpython programs for system reasons. You'll find the same limitation on Micropython and most other F405 devices.

Might also be a good time to update the implemented feature list to...

neat folio
#

@old smelt "the Void Hugs Back" was their best album IMHO πŸ˜‰

manic glacierBOT