#circuitpython-dev

1 messages · Page 323 of 1

thorny jay
#

I don't have one.

tidal kiln
#

i dont

trim elm
#

Me either

thorny jay
#

Waiting for Limor to make a Feather. 🙂

blissful pollen
#

I do not have one

slender iron
#

haha, ok. @keen fiber has a few he's willing to send folks

cunning crypt
#

I just thought it was a question asked out of board-om. But hey, that's really cool too.

thorny jay
#

Also, is your latest revision of the Feather Adaptor board OK?

slender iron
#

I haven't fully tested it but the usb works

marble hornet
#

not yet

thorny jay
#

I was late for the UnexpectedMaker release.

#

The one comming from Brazil will cost a fortune to deliver.

#

Is Arturo working on something too?

idle wharf
#

If anyone is in Seattle I have 2 pre-release featherS2s and i'm happy to give one away.

pastel panther
#

@slender iron I do not

#

but I can make one? I have modules

silver tapir
#

I have to saolas, happy to share one within CR or Centralamerica. Still don't have the feather adapter.

stuck elbow
#

@slender iron I don't.

idle wharf
#

I'd like to make a Saola to Feather adapter... just to do it.

slender iron
#

ok, hopefully Jeremy will reach out to you all

mental nexus
#

Don’t have one. Waiting for code to settle out a bit and see it take wings with a Feather.

silver tapir
#

@thorny jay which one is from brazil?

thorny jay
#

We already discussed that. Cat thing?

idle wharf
#

@slender iron I see on the site where we can order a PCB for the Saola to Feather (https://oshpark.com/profiles/tannewt), But that is just the PCB, right? What about the rest of the components is there a parts list someplace?

ionic elk
#

@slender iron is there a feather out/coming out?

thorny jay
#

There is not other part? This is just rewiring, and maybe the USB, and maybe a resistor or two?

slender iron
#

@idle wharf that is just the pcb. but if you want one just get one from me. I have the parts too

#

there is a stemma connector and jtag connector too

#

optional of course

#

@ionic elk unexpectedmaker has one and limor will design one eventually I'm sure

thorny jay
#

In Belgium, when someone release a book, he need to send two copy to the state library. Maybe there should be a recommendation that when someone make a Feather, they send two copy to Adafruit, so that at least you can verify if a port is working.

idle wharf
#

For those with the pre-release UM FeatherS2's, Seon did say that the production boards will have pin changes. The Current builds work with the pre-release boards. I don't know if there will be two boards in the CP build system or if we'll need to manually modify the config and build for pre-release boards in the future.

crimson ferry
#

hopefully two builds

solar whale
#

@thorny jay I have verified that the stemma connector and led work on the v3 saola feather board

crimson ferry
#

does the manufacturer need to request the USB IDs and such to get a board into circuitpython and circuitpython.org? Electronic Cats (Bast WiFi) will need a board def, and Gravitech Cucumber (one version is, afaict, Saola compatible, but another has onboard I2C peripherals and therefore pin commitments)

ionic elk
#

@slender iron how do you tend to trace resets with GDB? Something in DisplayIO is causing a complete hard reboot of Circuitpython on the STM32 but I can't pin anything down from the reset handler

tulip sleet
#

@ionic elk often I find the backtrace is damaged but I have one stack frame with a routine name. I set a breakpoint there.

ionic elk
#

I don't have anything in this case, unfortunately

#

Just, "reset handler"

#

It's something in release_displays that shuts down the entire board - where even is the define for that? it isn't in shared-bindings/displayio/display.c

tulip sleet
#

can you just set a breakpoint at release_displays, and then single-step ("n")

ionic elk
#

figured I'd try and break on that and then just step until it blows up

tulip sleet
#

there we go 🙂

ionic elk
#

ah it's in the init.c, that's why

#

When I accidentally trigger Single stepping until exit from function Reset_Handler by trying to step from reset_handler, is there any way to recover GDB? Seems like it just hangs without being able to take any input

tulip sleet
#

@ionic elk can you just ctrl-C? If not, it's something bad. You could also try disconnecting the J-Link which might cause it to get upset and go back to the command prompt.

ionic elk
#

Yeah I often get crashes with GDB that I can't ctrl-C out of, I was wondering if there was some trick that didn't involve power cycling or closing my terminal tab

#

Anyway sorry for clogging the channel with questions, this current Meowbit bug is quite frustrating so I might be projecting a bit

mental nexus
#

I'm running into an issue with displayio dirty rectangle tracking. I'm creating a first bitmap (self.bitmap) and put it in a group. Then I create a new bitmap that is pointed to by the same name (self.mybitmap). However, displayio doesn't realize that the content of the bitmap has changed. I think this is because the dirty rectangle tracking doesn't get triggered when the first bitmap is deleted and the new bitmap is created.

I can get the display to redraw the image, but only if I pop the bitmap's tileGrid from the group and put it back in the group. But I need this bitmap to updated automatically without fiddling with the group.

Do we need a function to "dirty" the bitmap rectangle when it gets deleted? Is that even possible for CP to react automatically when a bitmap is released? ...In reality the bitmap doesn't exist anymore so how could it retain a dirty rectangle?

tulip sleet
#

i also have it hang when doing tab completion. It is not really hanging, it's just doing a very long search. have to wait 10's of seconds for it to come back

#

@mental nexus are you actually replacing the bitmap in the group? If something else has a reference to that, it will not change what the group is holding on to. An object reference is a pointer, so changing one reference will not change the other.

#

e.g. group has a ref to bitmap A. Object X also has a ref to bitmap A. Changing Object X ref will not change group's ref

mental nexus
#

I've got a tileGrid that holds a bitmap_label and I'm adding a setter to change the text, to regenerate the bitmap inside the bitmap_label.

#

Basically, I'm rerunning the bitmap_label's init function to recreate all the internals, including the tilegrid and bitmap inside the tilegrid.

tulip sleet
#

is the gorup holding the tileGrid or the bitmap_lable?

mental nexus
#

Group is holding the bitmap_label, which is a subclass of a group.

#

This bitmap_label(a group) holds a tileGrid which holds a bitmap.

#

Then I have a higher level group (with 4 labels) that I display.show.

#
my_group=displayio.Group(max_size=4)

my_group.append(rainbow_tile)
my_group.append(text_area2)
my_group.append(text_area3)
my_group.append(text_area)


display.show(my_group)
#

I change the text in text_area (which is a bitmap_label).

#

If I ungroup text_area and regroup it, then it shows up ok.

#

I think displayio doesn't realize that it needs to updated the screen with the new bitmap.

#

Or is there a way to force the display to redraw everything? I tried setting

display.auto_refresh=False
display.auto_refresh=True
#

but that didn't work.

slender iron
#

changing the contents of a group should trigger a refresh

tulip sleet
#

you're not supposed to be able to change a BitmapLabel's text

#
    @text.setter
    def text(self, new_text):
        raise RuntimeError(
            "text is immutable for bitmap_label.py; use label.py library for mutable text"
        )
mental nexus
#

! Yep, I'm working to make it mutable so it will be more like label.py

#

Hmm... Ok, I'll make a simpler example to evaluate it. If I can't get it to work then I'll raise an issue.

slender iron
#

note that deleting a bitmap won't delete it because it's still referenced by the tilegrid

mental nexus
#

I am toggling the text between two different strings, and I see the memory usage alternate back and forth (after a gc.collect). So, I think it's actually getting deleted, but I could be wrong. I'll make a simple example and then go from there.

idle wharf
#

@slender iron I'm trying out your requests on FeatherS2.
pool = socketpool.SocketPool(wifi.radio) is giving me an error: ValueError: SocketPool can only be used with wifi.radio.

Prior to calling SocketPool, I do connect.

print("ip", wifi.radio.ipv4_address)```
But it prints NONE and then I have an IP...
slender iron
#

are you in the REPL?

idle wharf
slender iron
#

hrm

idle wharf
#

But I could be in the REPL

slender iron
#

I've only heard about the socketpool error in the repl

#

connect should return none on success. it'll raise an error otherwise

idle wharf
#

Got it.. for some reason I thought I saw it return True in the past.

#

Could Saola v. FeatherS2 have any impact ?

slender iron
#

ya, it used to return a bool

#

but I changed it last week

#

the wifi.radio check should be very simple so I'm not sure why it's ever an issue

#

you could just comment it out 🙂

idle wharf
#

I'll give it a try and see what happens...

#

I assume you mean in the C

slender iron
#

yup

idle wharf
#

K, I'll go try that

ionic elk
#

Did we change something about how we handle "auto_brightness" as a DisplayIO setting? Just figured out that it was disabling the screen on the Meowbit (among other issues) but I'm puzzled as to why it didn't when the board was first being developed.

slender iron
#

I think the last thing we did was support inverted backlight

#

but I'm not 💯 on that

manic glacierBOT
#

This PR issues a number of bugfixes related to the Meowbit STM32F401 development board. These include:

  • Meowbit configuration file was incorrectly altered to include a low speed oscillator (LSE) resulting in a looping hang at startup. Fixed by removing this reference.
  • In general, boards with a LSE configuration problem would unsuccessfully attempt to auto-recover, making an already confusing problem worse. This "feature" has been removed.
  • A null pointer dereference in `common_hal_p...
mental nexus
#

Hmm... Ok, I think it's sinking in a little about the tilegrid reference issue. If I create a new bitmap, the tilegrid still references the old bitmap reference, even though the name of the new bitmap is the same as the old bitmap? So is there any way of changing a bitmap inside a tilegrid (maybe even changing the bitmap x,y size) and making it keep the same reference?

mental nexus
idle wharf
#

I'll be back.. my code was a mess. 😉

idle wharf
#

@slender iron Ok commenting out the check works... HTML request, JSON request and a 404 (on purpose this time) also worked fine.

void common_hal_socketpool_socketpool_construct(socketpool_socketpool_obj_t* self, mp_obj_t radio) {
    // if (radio != MP_OBJ_FROM_PTR(&common_hal_wifi_radio_obj)) {
    //     mp_raise_ValueError(translate("SocketPool can only be used with wifi.radio."));
    // }
}

for fun I tried bad_pool = socketpool.SocketPool("this is bad")
And got Bad Session... which doesn't seem horrible.

slender iron
#

nice!

#

@mental nexus correct, the name isn't used by the tilegrid to know the bitmap. you should just create a new tilegrid for a new bitmap

mental nexus
#

In my color setter I create a new Bitmap, a new TileGrid and a re-init the self Group (super.init) and re-append in the new TileGrid. But I still have to call display.show(myGroup) for it to update on the screen. Is this a reference issue or a displayio dirty rectangle issue?

#

Oh, just got it! I shouldn't re_init the self group with super().__init(). Instead I should just pop off the tileGrid and append the new one into the self.

#

I guess this is the difference between mutable and immutable objects..... Still a lot to learn! Thanks for the guidance pythonistas!

idle wharf
#

How should we think about core modules for CP in relation to the EPS32S2 port?
For example RTC (which is a requirement for NTP). Is there a checklist of done, not started, assumed no work, etc.. or should we just ask as we see things ?

onyx hinge
#

You can schedule a workflow to run at specific UTC times using POSIX cron syntax. Scheduled workflows run on the latest commit on the default or base branch. The shortest interval you can run scheduled workflows is once every 5 minutes.

This example triggers the workflow every 15 minutes:

on:
  schedule:
    # * is a special character in YAML so you have to quote this string
    - cron:  '*/15 * * * *'

https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#onschedule
It seems like it should be adabot-patchable to add "run the workflow on the main branch daily/weekly, to make sure we hear about pylint / other background changes that would affect releasability of bundle libraries. Thoughts @idle owl @raven canopy ? Should I file an issue in adabot where we could discuss it?

idle owl
#

@onyx hinge Definitely file an issue on Adabot for discussion.

slender iron
#

@idle wharf we usually track with github issues. there is an esp32s2 label where they should be

#

if they aren't then please file an issue there

idle wharf
#

thanks !

slender iron
#

Here is the notes document for Monday’s CircuitPython Weekly meeting. It is at the normal time of 11am Pacific / 2pm Eastern 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/1fzARe32tu1diEPjFla3ipsz6jJehwYHlF7LYdjLaMYw/edit?usp=sharing

onyx hinge
#

Thanks @slender iron

slender iron
#

np 🙂

manic glacierBOT
#

The background tick changes were left in because frequencyio/FrequencyIn.c still depends on them. Should we look at changing that as well? I don't have a FrequencyIn test, though.

I think we should worry about FrequencyIn separately and keep this PR simpler.

FrequencyIn is pretty easy to test with a PWMOut from a second board. It's less critical if it stops as well because it will have done a measurement already.

#

It does not look like you can manage or use any system time with RTC.

Note: This is the lowest level dependency as I work up the stack to using the Azure IoT Library.

Board: FeatherS2
Build: 08-23-2020 Code built locally

>>> from adafruit_ntp import NTP
Traceback (most recent call last):
  File "", line 1, in 
  File "adafruit_ntp.py", line 40, in 
ImportError: no module named 'rtc'

>>> import time
>>> time.time()
Traceback (most recent call last):
  File "", ...
manic glacierBOT
keen fiber
#

haha, ok. @keen fiber has a few he's willing to send folks
@slender iron I have some esp32-s2's and the v1 of the feather board, PM me your address and I'll send them out. Not sure if I can send overseas, will depend on the cost, that gets very expensive very quickly, but I'll try.

manic glacierBOT
manic glacierBOT
ionic elk
#

@tulip sleet do you happen to have a STM32F405 feather on hand?

#

Conversely @onyx hinge do you happen to have a linux machine?

onyx hinge
#

@ionic elk yes I do

ionic elk
onyx hinge
#

I use my STM32F405 feathers on linux exclusively, but I'll take a look at that post

ionic elk
#

I unfortunately have neither a windows 8 machine or a linux

#

I'm trying it on Windows 10 just to check

onyx hinge
#

yeah my stm32f405 CIRCUITPY drives mount fine on debian buster with kernel 5.2.17

#

interpreting their last message >>> storage.erase_filesystem() Traceback (most recent call last): File "<stdin>", line 1, in <module> ValueError: Hardware busy, try alternative pins something's wrong and I don't think it's the OS that is trying to mount CIRCUITPY

ionic elk
manic glacierBOT
#

Tried this PR on both a Clue and PyBadge, when running the test in issue #2689 I get:

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

You are in safe mode: something unanticipated happened.
CircuitPython core code crashed hard. Whoops!
MicroPython NLR jump failed. Likely memory corruption.

I would expect we would just return to a REPL prompt.

ionic elk
#

@onyx hinge hmm, that error message is related to something being reserved in never_reset.

#

I wonder if they have something in their code.py that is actually reserving something about the flash access. That's a pretty harmful edge case that I'd like to cover... @slender iron is it possible for someone to put something in their code.py that actually disables their ability to delete their code.py?

tulip sleet
#

@ionic elk I answered in the thread about the drivers, but I have no idea about the "alternative pins" message. I have never seen that before.

ionic elk
#

That's an error that occurs in BusIO when the pins are reserved for an SPI, I2C or UART bus. It implies that something is actually conflicting with the access to NOR flash.

onyx hinge
#

Totally a guess by inspection, but ..

#

supervisor_flash_init calls spi_flash_init which will create the SPI bus object. but if the JEDEC ID isn't read back, it returns without setting flash_device to non-NULL

#

each subsequent call to supervisor_flash_init will AGAIN call spi_flash_init, which would then fail in that way

#

so I bet that e.g., if you popped the SPI flash chip off, or source code changed it to use the wrong pins, you could get no CIRCUITPY drive appearing, no os.listdir('.'), and that error message from erase_filesystem()

ionic elk
#

Interesting sleuthing!

#

Probably worth testing, though it would require me to ruin a feather, presumably

onyx hinge
#

I think you could just swap the SPI buses in the board config

#

or just change the CS to be the wrong pin, leaving the rest of the bus settings intact

#

I don't want to disturb either of my stm32f405 feathers if I can avoid it

ionic elk
#

Yeah it'd be nice to have an alternative program we could load up that serves only to wipe the drive so it can't mess with a fresh Circuitpython install

#

Maybe I should make one in Arduino or something that you can just pop on there with DFU-Util

#

It seems like maybe a not-good thing for you to be able to totally wipe the actual SoC but still be vulnerable to software issues because the NOR flash isn't empty.

manic glacierBOT
manic glacierBOT
#

Thanks @DavePutz -- please take another look at this PR if you've got time. I've updated it with two additional sites to check for KeyboardInterrupt. They eliminate the safe mode resets I was able to reproduce, both printing large objects (a la #2689) and doing a long running calculation (l = 17 ** 1777). The long running calculation and the print of the long int that it results in are still not interruptible, but the KeyboardInterrupt is still handled when completed which also prevents ...

#

As noted by @jepler, spi_flash_init within supervisor_flash_init is responsible for creating the NOR flash device based on pins assigned in the board profile. However, if the JEDEC ID is not returned by the NOR flash, no error is currently logged, allowing the device to proceed as if it has a filesystem but without any actual filesystem capabilities. This could be altered to emit some form of failure mode to inform the user that there is a hardware issue with their NOR flash.

manic glacierBOT
ionic elk
#

@onyx hinge I feel like I've asked this before but should we enable ulab for ESP32?

#

Or does it have port specific features that need to be implemented?

#

Also, just kind of broad question here - should we have a link to the ReadTheDocs on Circuitpython.org? Seems kind of funny to me that we don't, I'd figure it'd be handy to have as a header link right there next to Downloads

tulip sleet
#

Sounds like a good idea. You could open an issue on circuitpython-org

#

re ulab: it's port-independent, as far as I know, so if it would fit, great!

ionic elk
#

Cool, I'll do both.

manic glacierBOT
onyx hinge
#

@ionic elk I don't know of a reason to not enable it

#

thank you!

slender iron
#

I'm not sure how to help them further

#

thanks

tidal kiln
#

@slender iron yah, i can take over that one. responded and will monitor.

slender iron
#

thanks!

solar whale
#

@tulip sleet FYI -- I am working o getting some Salea pictures of the SPI issue I am having with the RFM69 baurdrate. It's a bit tricky to capture what I want -- so many transactions.... but -- I was working on a port someone made for running the rfm69 code on MicroPython and ran into the a similar issue! I also had to slow it down to 1MHz to avoid what appears to be some bits getting "Shifted"... Not sure if that is a clue but it is interesting that it happens there as well. I am going to update my open PR to adjust the baudrate and add some other changes as I continue the investigation.

tulip sleet
#

@solar whale that is interesting! good luck! Does the data going to the RFM69 look ok, or does it look corruped? ... or I guess, that's what you're trying to discover

thorny jay
#

@slender iron is it possible for someone to put something in their code.py that actually disables their ability to delete their code.py?
@ionic elk Wait, that would actually be a great feature. I am interested in ways to freeze a project in a CP board once it is perfect. Making CIRCUITPYTHON read-only, or not visible or any way to prevent end-user to break it.

solar whale
#

still not sure -- I need to find a good way to catch it " in the act" -- may need to add a signal that I can toggle for a trigger when the issue occurs

manic glacierBOT
slender iron
#

@thorny jay you can make the drive read-only from the computer in boot.py

thorny jay
#

Yes, thank you. And there are some learn guide that link that to the state of a GPIO so that you can unblock that when needed.

slender iron
#

yup, that's one way to do it

#

you can also do a manual safe mode to edit it

manic glacierBOT
solar whale
#

@tulip sleet hmm -- also FYI -- lowering the baudrate on the Raspberry Pi from 5MHz to 1 MHz significantly degrades its performance...lots of missed packets. Nothing is ever simple.

#

or maybe something else going on -- never-mind ...

manic glacierBOT
tulip sleet
#

@onyx hinge This is has been a "Known issue" for a while in the release notes, but is it now fixed with the advent of C-based sdcardio?

displayio operations that read from an SD card (e.g., OnDiskBitmap) will interfere with other SD card operations and can cause lockup. To work around this problem, do not read or write files on the SD while the display is updating, and vice versa.

onyx hinge
#

@tulip sleet I believe based on the structure of the code -- but never actually tested -- that the displayio caveat applies only to adafruit_sdcard, not to sdcardio or sdioio.

tulip sleet
#

I think that's true too. I will try to rephrase it to direct people to use sdcardio.

#

thanks!

#

@onyx hinge Sorry, another question. The weblate PR's sometimes include the contributor, and sometimes not. I would like to give them credit. Could you point me to a weblate URL that would list them?

onyx hinge
#

good question! I'll take a look

#

@tulip sleet there's a report I can generate, you may not have the privileges to do it... I'll get you a report starting july 23 and then figure out if I can let you do it yourself

#

sorry, I'm going to redact that to remove the emails, just another second

tulip sleet
#

thanks. I have the major additions in the PR's

onyx hinge
#
  • Portuguese (Brazil)

    • Wellington Terumi Uemura (70)
  • Japanese

    • Taku Fukada (776)
  • Dutch

    • _fonzlate (39)
  • Spanish

    • dherrada (2)
    • Alvaro Figueroa (49)
  • French

    • Nathan (18)
  • Swedish

    • Jonny Bergdahl (15)
tulip sleet
#

i have some of those; maybe I don't have ones who don't have a github ID? Or they haven't ID'd as that.

onyx hinge
#

@tulip sleet did you create a login on weblate? you should be able to just log in with github

tulip sleet
#

yes, i did, some time ago.

onyx hinge
#

Yes I suspect people who don't "log in with github" probably don't get listed as author. not sure though.

#

can you DM me the e-mail or weblate user id you used?

#

it doesn't seem to be weblate user dhalbert

tulip sleet
#

i seem to have logged in as other than github. I'll get it to you.

onyx hinge
#

aha there you are

tulip sleet
#

I seem to be halbert?

idle owl
#

YOU ARE HALBERT.

tulip sleet
#

🤖

onyx hinge
#

my thought exactly

tulip sleet
#

bingo, I have the report tyvm

onyx hinge
#

I'm happy to add anyone else who would be doing releases, just ping me

manic glacierBOT
#

I don't know what the right answer is here, but pseudo-random is fine for many purposes other than cryptographic. Users can also seed with their own entropy. It would be a shame to disable random completely when wi-fi is not up. Maybe an alert in the docs would suffice.

Circuitpython's built in random module is already pseudorandom, and should activate automatically when urandom is not available. But urandom itself is supposed to be TRNG (True Random Number Generation), and is repres...

lone sandalBOT
manic glacierBOT
ionic elk
#

@onyx hinge you online?

onyx hinge
#

more or less

ionic elk
#

I was hoping to ask you how you got those logic analyzer readings for the SPI issue on the SD card. Where did you attach the probes?

onyx hinge
#

stm32f405 feather's built in one?

ionic elk
#

I'm really not sure what's going on with it - I can't seem to turn up anything for "write values" or anything of that sort

onyx hinge
ionic elk
#

yeah

onyx hinge
#

that'll let you stick yourself in the middle of anything that's microsd shaped

ionic elk
#

Ah, I'll try and pick one of those up. So you use that with the feather's exposed SPI line

onyx hinge
#

if it's a breakout or what have you, then using stacking headers or something would be good

ionic elk
#

I'm very puzzled by this issue because this write value thing is ignored by every port except atmel and i.MX... so it seems weird to be something to mess up. And I don't have any examples on "doing it manually" or something like that

#

Yeah that one

onyx hinge
#

probably since that was with the adalogger featherwing I just used both of them in a breadboard or something like that

#

huh that would seem to mean that sdcard wouldn't work except on samd and i.mx....

ionic elk
#

I'm wondering if it isn't the write_value and instead something like needing pullups, or it's sending the wrong data...

#

Well, you tested it on the NRF, which completely ignores it. So clearly it's doing it automatically or something

onyx hinge
#

one idea that had occurred to me was: the important values to support are 0x00 and 0xff. so you could switch the pin away from being a special function, set it to TRUE for 0xff and FALSE for 0x00 .. then if some oddball wants 0xaa you just throw an error "hardware can't do it"

ionic elk
#

I'd have to do that in the middle of the transaction though, which isn't possible

onyx hinge
#

I agree, nrf doesn't consult that parameter at all

ionic elk
#

or it is but I'd have to write my own SPI register code, I can't do it with the HAL. But like I said this all seems weird and it doesn't seem like it should be required. It isn't mentioned in the docs or on the wikipedia page for SPI

onyx hinge
#

It's specific to SD cards

#

I don't know of other devices that have this requirement

ionic elk
#

Oh? Hmmm. I'll add that to my searches and see if I can turn anything up

onyx hinge
ionic elk
onyx hinge
ionic elk
#

neato

onyx hinge
#

The DI signal must be kept high during read transfer (send a 0xFF and get the received data).

ionic elk
#

Yeah here's a reply in that thread:
*The porblem is in the SPI HAL function for receiving.

The SD cards are expecting an 0xFF value on the MOSI Pin, so the SPI has to send 0xFF when receiving the byte answer from the card (or MOSI has to be kept HIGH for the 8 clocks) and that is not necessarily the case with the HAL_SPI_Receive function.

To solve it, one should use the HAL_SPI_TransmitReceive function like this:*

uint8_t MySPI1_ReadByte(void){
   uint8_t ReceivedByte = 0, Dummy = 0xFF;
   while ((HAL_SPI_GetState(&hspi1) != HAL_SPI_STATE_READY));
   HAL_SPI_TransmitReceive(&hspi1, &Dummy, &ReceivedByte, 1, 5000);
   return ReceivedByte;
}
onyx hinge
#

That's similar to what I proposed in my patch, except I allocated a buffer as big as the send buffer which was awful. but doing one byte at a time seems awful too.

#

The DI signal must be kept high during read transfer (send a 0xFF and get the received data).
-- from my reference

ionic elk
#

What I can do is maybe put in an if statement if the write_value is high, and only do this weird hack if it is

onyx hinge
#

that would be every SPI SD operation

ionic elk
#

right, but it won't impact other SPI use

#

I can also maybe check and see if Micropython does something different.

#

Anyway, thanks for your help!

onyx hinge
#

you're welcome. any of that I should add on to the bug report?

ionic elk
#

I'll add stuff on as I progress. I've got a bug journal going

#

I'll link the issue I found on google.

manic glacierBOT
#

Looks like this is a limitation of the ST HAL in regards to handling the MOSI line when using an SD card.
https://community.st.com/s/question/0D50X00009XkdpZ/sd-card-using-spi-initialization-stm32f303-issue

I'll look around for other workarounds since this one seems kind of slow. Micropython, STM32Duino, and even the ST FatFS library must all deal with this issue somehow.

onyx hinge
#
index 0354d64ad..f54da9439 100644
--- a/ports/stm/common-hal/busio/SPI.c
+++ b/ports/stm/common-hal/busio/SPI.c
@@ -349,7 +349,39 @@ bool common_hal_busio_spi_read(busio_spi_obj_t *self,
     if (self->miso == NULL) {
         mp_raise_ValueError(translate("No MISO Pin"));
     }
+
+    // Set the miso pin back to GPIO and drive a value on it
+    if (self->mosi) {
+        if (write_value != 0 && write_value != 0xff) {
+            mp_raise_ValueError(translate("Only write values 0x00 and 0xff are supported"));
+        }
+
+        GPIO_InitTypeDef GPIO_InitStruct = {0};
+        GPIO_InitStruct.Pin = pin_mask(self->mosi->number);
+        GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
+        GPIO_InitStruct.Pull = GPIO_NOPULL;
+        GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
+        GPIO_InitStruct.Alternate = 0;
+        HAL_GPIO_Init(pin_port(self->mosi->port), &GPIO_InitStruct);
+
+        // set the PIN to HIGH if write_value is 0xff, LOW if it is 0x00
+        HAL_GPIO_WritePin(pin_port(self->mosi->port), pin_mask(self->mosi->number), value);
+    }
+
+
     HAL_StatusTypeDef result = HAL_SPI_Receive (&self->handle, data, (uint16_t)len, HAL_MAX_DELAY);
+
+    // set mosi back to its special function
+    if(self->mosi) {
+        GPIO_InitTypeDef GPIO_InitStruct = {0};
+        GPIO_InitStruct.Pin = pin_mask(self->mosi->number);
+        GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
+        GPIO_InitStruct.Pull = GPIO_NOPULL;
+        GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
+        GPIO_InitStruct.Alternate = self->mosi->altfn_index;
+        HAL_GPIO_Init(pin_port(self->mosi->port), &GPIO_InitStruct);
+    }
+
     return result == HAL_OK;
 }
 
#

something like tihs, which I wrote but didn't compile-test

#

or do it just for 0xff even, if it's expensive

#

my intuition says even if HAL_GPIO_Init is a bit expensive, it's less so than 512 separate 1 byte SPI reads

#

ICBW and I'm happy to hear it if I am

ionic elk
#

It might be possible to just run HAL_GPIO_WritePin(); without changing the altfn

#

Anyway I gotta run for a class. I'll try this tomorrow.

onyx hinge
#

see ya, thanks for looking at it!

ionic elk
#

Np, its bugfix week

#

BUGS SHALL BE FIXED

slender iron
#

@ionic elk did you look into Limor's S2 problem at all?

manic glacierBOT
slender iron
#

@idle wharf just pushed a fix for the wifi.radio error

idle wharf
#

Awesome, I'll check it out !

#

And many other changes it would appear. lol

slender iron
#

😄 I have updates to adafruit_requests as well. will push those shortly

idle wharf
#

Question, do I have to have the submodule updated for CP when you make that kind of change or just the new library in my /lib on the device ?

#

I'm referring to the things in Frozen

#

@slender iron
Bad code on purpose

print("\nBad Session")
bad_pool = socketpool.SocketPool("this is bad")

SocketPool error again... but only on bad pool (i.e. not a wifi.radio).

Bad Session
Traceback (most recent call last):
  File "code.py", line 40, in <module>
ValueError: SocketPool can only be used with wifi.radio.

I don't have your new requests obviously

idle wharf
#

Ha... yesterday when I said it prints Bad Session... oh that was my print.

slender iron
#

the submodule doesn't matter

#

just what is in your filesystem is used

idle wharf
#

And that error is what we WANT to see. Got it.

#

So my failure test case was handled correctly.

#

All is good. Ship it. 😉

slender iron
#

ya, you can only supply wifi.radio atm

idle wharf
#

0 based index fix.

slender iron
#

heh, yup

idle wharf
#

Exciting to see so much lighting up on the S2. Thank you !

manic glacierBOT
manic glacierBOT
#

This is our own definition, but it used the SD structs internally. It's actually empty now:

typedef struct {
    // ble_gap_enc_key_t own_enc;
    // ble_gap_enc_key_t peer_enc;
    // ble_gap_id_key_t peer_id;
} bonding_keys_t;

I could have commented a lot of this out completely, but I tried not commenting out everything, in order to allow some code to still stand uncommented. However, its doesn't really matter.

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

The build was failing due to some trailing whitespace in a few files. I edited most of them in github, but making the sdkconfig file empty in github failed (some kind of github bug). So I cloned and pushed the changes.

@microDev1 If you can set your editor to automatically delete trailing whitespace on save, that will prevent these kinds of minor issues. Some editors have a setting, and some have a plugin to do this.

solar whale
#

woohoo! just tried pr_3315 -- PSRAM on esps32s2 on saola_wrover ```
Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 6.0.0-alpha.2-358-gf39708abb on 2020-08-26; Saola 1 w/Wrover with ESP32S2

import gc
gc.mem_free()
2048784

#

seems to be working OK -- with blinky and I2C sensor test OK

#

Has anyone else tried importing ulab on an esp32s2 now that is enabled in main? When I build it, it still does not show up.

#

It is not enabled in the pr3315 build

manic glacierBOT
ionic elk
#

@slender iron sorry, I ran out of time yesterday before a class. I'll check out the exception thing now

#

Did limor tell you what module she's using on the Saola?

tulip sleet
#

@slender iron hi, when you are breakfasted and settled could I talk to you about the Adapter constructor? I could make it a real constructor, but then to do it properly I need to add it as an argument all over the place, to avoid using the single instance as a global. This is certainly doable but is a lot of work and could be deferred.

Also I did make draft release notes yesterday, so a release could be done quickly. Q is whether there are outstanding PR's to include (probably microS2, not sure whta else0

manic glacierBOT
#

I originally did it this way in rough imitation of displayio.DISPLAY. There is no explicit constructor for the default display, and there wouldn't be for the singleton adapter either. Unlike DISPLA`, there does need to be some initialization done to use the singleton adapter. The idea was that it would live across VM's, like the DISPLAY.

It is possible to make the Adapter not be a singleton, but it requires passing it around many more places than it is currently. Right now it's reference...

solar whale
#

@ionic elk should ulab now appear in esp32s2 builds? or am I missing something?

ionic elk
#

I was puzzled by that as well. I don't know what's going on with that. I admit I didn't test Ulab since I actually don't know how, I've never used it, but I thought that as a common-hal independent module it was just as simple as turning on the build flag.

#

It was kind of a quick afterthought from putting in Random

manic glacierBOT
solar whale
#

@ionic elk ok -- just wanted to be sure it was not something I had misconfigured.. not a problem -- I just wanted to test it. no need at this time.

solar whale
#

Thanks for restoring random

manic glacierBOT
tulip sleet
#

@ionic elk are you looking to fix the ulab issue? I tried a build to check it out but I've never built ESP32S2 and had trouble

manic glacierBOT
ionic elk
#

@tulip sleet yeah my starting docket for today is:

  1. investigate Limor's PSRAM crash
  2. find a ulab control test, test on STM32, then figure out why it isn't on ESP32
  3. Continue working on SD SPI bug
manic glacierBOT
ionic elk
#

@tulip sleet to build ESP32 requires installing the IDF and running . esp-idf/export.sh every time you want to use make, have you done that?

tulip sleet
#

I did the first but not the latter, thanks. I had to install cmake and ninja-build

#

I have prepared a draft alpha release, and am just trying to figure out what should be in it

ionic elk
#

I'd vouch for my PulseIO additions and Random addition but not for my ULAB thing, yeah

#

Oh and the meowbit fix

onyx hinge
#

huh that ulab thing is weird, it SHOULD just be setting the define in the .mk file.

ionic elk
#

¯\_(ツ)_/¯

tulip sleet
#

yeah, it looks fine, I'm confused. I looked at all the uses and I don't see anything missing.

#

esp-idf wants a plain python. should it be python2 or python3?

onyx hinge
ionic elk
#

It sets up its own virtualenv so I don't think it matters

tulip sleet
#
halbert@salmonx:~/repos/adafruit/circuitpython/ports/esp32s2$ source esp-idf/export.sh
Setting IDF_PATH to '/home/halbert/repos/adafruit/circuitpython/ports/esp32s2/esp-idf'
Adding ESP-IDF tools to PATH...
/usr/bin/env: ‘python’: No such file or directory
ionic elk
#

You can't use your own virtualenv either, by the way, so be careful of that. If you try to run esp-idf setup inside one, it'll bork out

#

Hang on let me get my "Adventures in [redacted]" computer problems journal entry for it

onyx hinge
#

@tulip sleet I have built the esp build on systems where python is /usr/bin/python is python2. I believe that the way our github actions work, python is /usr/local/bin/python is python3.

solar whale
#

IIRC I had to make sure python ran as python3 for esp32s2 builds to work

tulip sleet
#

it is calling esp-idf/tools/idf_tools.py. It's using parenthesized print statements, so looks like py3

ionic elk
#

Don't you have to set an environmental variable for the python location

tulip sleet
#

nope, I am using the system python3 and also installed python2. I have an alias py for convenience, but there is no plain python, because I want to catch things that don't say which python they want

#

I could install python-is-python3

#

but i have not

ionic elk
#

I can confirm that I ran the install process with the default python 2.7 that is installed on Mac machines. It then installed a virtual environment to do everything else

onyx hinge
#
/usr/bin/python
jepler@babs:~/src/circuitpython/ports/esp32s2$ source esp-idf/export.sh 
...
Done! You can now compile ESP-IDF projects.
Go to the project directory and run:

  idf.py build

jepler@babs:~/src/circuitpython/ports/esp32s2$ which python
/home/jepler/.espressif/python_env/idf4.2_py2.7_env/bin/python
``` After sourcing the environment script, it should be their own python
#

it is a python binary, not a symlink or similar ```-rwxr-xr-x 1 jepler jepler 3689352 Jun 25 21:15 /home/jepler/.espressif/python_env/idf4.2_py2.7_env/bin/python

manic glacierBOT
tulip sleet
#

idf_tools.py has #!/usr/bin/env python at the top. That's what I have to address.

#

i don't generally use a virtualenv. I kind of hate them if I don't need them

ionic elk
#

Weird, that would have caused problems for me too, and I'm not sure why it didn't

onyx hinge
#

I think it must work with either one

tulip sleet
#

i'll just try python-as-python3

solar whale
#

it does not

ionic elk
#

I concur, I don't have python 3 set up as the default on my machine, I only access it through virtualenvs, so it must work with either

solar whale
#

I struggled with systems that had python (python2) -- just decided to get rid of python2 ....

ionic elk
#

@tulip sleet have you tried it with python 2 and had it fail?

tulip sleet
#

i am trying it with python3 right now

solar whale
#

python-as-python3 worked for my Linux box.

ionic elk
#

@solar whale with macs I find it's more trouble than it's worth to try to get rid of system installed stuff. Easier to just have virtual environments and bash reconfiguration than actually trying to uninstall anything

tulip sleet
#

i concur with the ubuntu decision never to use bare python if you can help it

solar whale
#

but you can't to the idf install in a virtualenv

tulip sleet
#

in a virtualenv or a VM?

solar whale
#

at least I could not -- it creates its own VM

#

I meant virtualenv

ionic elk
#

@solar whale I'm confused that you had issues with the idf using python 2.7. I don't see how it could possibly have worked for me if it was incompatible, I only have python 3 in virtualenvs

manic glacierBOT
solar whale
#

@ionic elk Now that you mention it, it may npt have been an issue on the Mac -- I don't recall. It was a problem on Linux and RPi

tulip sleet
#

now it is upset that my pygdbmi is too new

ionic elk
#

@tulip sleet this seems super weird to me, this is the whole point of it making a virtualenv

onyx hinge
#

../../py/circuitpy_defns.mk:486: *** CIRCUITPY_ULAB="1 ". Stop.

#

whitespace

ionic elk
#

I whitespace goofed?

#

How embarassing

onyx hinge
#

welll

#

this is a "Make is objectively awful" actually

ionic elk
#

no argument there

onyx hinge
#

this puts whitespace at the end of var: VAR = 1 # helpful comment

ionic elk
#

why did it not bork my other enables I wonder

#

Is that seriously the first time I've left a comment on a makeflag?

#

Oh yeah, I guess it would have been, since normally you just delete them off the mpconfigport.mk list when implemented. Oh well. I'll get a fix up shortly.

tulip sleet
#

gah:

RROR: gdbgui 0.14.0.0 has requirement pygdbmi<0.11,>=0.10.0.0b0, but you'll have pygdbmi 0.9.0.2 which is incompatible.
#

from esp-idf/install.sh

#

looks like maybe gdbgui got a version bump but they didn't address that yet

onyx hinge
#

@ionic elk thanks. I was going to toss a PR up but something got borked in my tree

#

something about the content of boards/microdev_micro_s2/sdkconfig is making my git very grumpy

#

it insists I've modified it, haven't encountered this before

raven canopy
tulip sleet
#

@onyx hinge i edited that file through github to fix a whitespace problem in the micros2 PR. But it didn't work, twice. I then cloned it and pushed a change. Meanwhile, microdev1 edited it to add PSRAM. But it passed the tests. Maybe pull/merge again?

ionic elk
#

@onyx hinge not a submodule issue?

tulip sleet
#

the file originally had a blank line but was otherwise empty. The github web editor did not succesfully let me remove the blank line.

ionic elk
#

Also, what's a good, quick way to test whether ulab is working?

onyx hinge
#

@ionic elk import ulab; ulab.zeros((3,3))

ionic elk
#

thanks

onyx hinge
#
warning: CRLF will be replaced by LF in ports/esp32s2/boards/microdev_micro_s2/sdkconfig.
The file will have its original line endings in your working directory
``` the content of that file has DOS line endings
#
Cloning into 'circuitpython'...
remote: Enumerating objects: 113, done.
remote: Counting objects: 100% (113/113), done.
remote: Compressing objects: 100% (86/86), done.
remote: Total 129597 (delta 64), reused 56 (delta 24), pack-reused 129484
Receiving objects: 100% (129597/129597), 77.55 MiB | 43.44 MiB/s, done.
Resolving deltas: 100% (95682/95682), done.
jepler@rat:/tmp$ cd circuitpython/
jepler@rat:/tmp/circuitpython$ git status
On branch main
Your branch is up to date with 'origin/main'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

    modified:   ports/esp32s2/boards/microdev_micro_s2/sdkconfig

no changes added to commit (use "git add" and/or "git commit -a")
``` somehow that is causing on two computers that the file is detected as "modified" by git version 2.20.1, even on a clean clone
solar whale
#

@tulip sleet I just reran my install without issue ...

#
Package         Version 
--------------- --------
bitstring       3.1.7   
Brotli          1.0.7   
cffi            1.14.0  
click           7.1.2   
cryptography    2.9.2   
Flask           0.12.5  
Flask-Compress  1.5.0   
Flask-SocketIO  2.9.6   
future          0.18.2  
gdbgui          0.13.2.0
gevent          1.5.0   
greenlet        0.4.15  
itsdangerous    1.1.0   
Jinja2          2.11.2  
MarkupSafe      1.1.1   
pip             20.0.2  
pycparser       2.20    
pyelftools      0.26    
pygdbmi         0.9.0.2 
Pygments        2.6.1   
pyparsing       2.3.1   
pyserial        3.4     
python-engineio 3.12.1  
python-socketio 4.5.1   
reedsolo        1.5.3   
setuptools      46.1.3  
sh              1.13.1  
six             1.14.0  
Werkzeug        0.16.1  
wheel           0.34.2  
manic glacierBOT
#

My git (2.20.1 on debian buster) has a lot of trouble with the content of this file, due to DOS-style line endings. Even a fresh clone claims the file is modified!

jepler@rat:/tmp$ git clone https://github.com/adafruit/circuitpython
Cloning into 'circuitpython'...
remote: Enumerating objects: 113, done.
remote: Counting objects: 100% (113/113), done.
remote: Compressing objects: 100% (86/86), done.
remote: Total 129597 (delta 64), reused 56 (delta 24), pack-reused 129484
Receivin...
solar whale
#

ah -- older gdbgui

manic glacierBOT
tulip sleet
#

yes, i was installing fresh, so it installed the latest gdbgui for me, which caused minor havoc.

#

14.0.0.0

manic glacierBOT
tulip sleet
onyx hinge
#

@raven canopy just special-casing it seems like it could work too

raven canopy
#

it could, definitely.

onyx hinge
#

is going to the stubs a better solution you think?

raven canopy
#

long-term, i think stubs is a better option. then it doesn't depend on external changes (unless the stubs process changes)

solar whale
#

@tulip sleet once you have a stable build method, I hope you'll update the "building CP" guide....

ionic elk
#

Going to make some lunch. Fix for makefile whitespace problems after I come back.

solar whale
#

@ionic elk @onyx hinge thanks for tracking that down

onyx hinge
#

np

solar whale
#

I kept trying to figure out what I was doing wrong....

silver tapir
#

@slender iron I'm just going over this week's meeting and I saw you fishing for volunteers for a learning opensource alternative.

#

Not sure if somebody already started the discussion about it but, for the circuitpython day I had to build a website based on markdown files and static images. I used Hugo for it and it's really simple to use and to have a site up and running. I know almost nothing on the html/css/js side.

#

Hugo is writen in Go. To be honest I didn't look for an alternative written in Python which I'm sure would not be frowned upon here.

#

I have not tried to replicate some of the complex parts of learn, like pages, and mirrors, but it already handles very nicely the topic of translations.

#

For diacircuitpython.org I have a workflow of pushing to github, then fleek (hosting provider that uses IPFS to distribute the content) builds a container with hugo, and hugo transforms the markdowns to the nice site itself.

#

If anyone has a suggested alternative for Hugo, maybe python based, I could setup a workspace for making pages/mirroring work.

manic glacierBOT
manic glacierBOT
#

Closes: #3331

Also adds code to speed up shared-bindings-matrix on multi-core systems, reducing it from ~1minute to ~30seconds on my laptop (2.6GHz 2C/4T) and from ~25 seconds to ~4 seconds on my desktop (3.6GHz 8C/16T)

The order of the files is different now (it is ordered by name, not by port-then-name), but I did my best effort to compare them and determine that only "ulab" was added to the matrix.

onyx hinge
#

Thanks for the quick merge on that newline thing @tulip sleet

idle wharf
slender iron
#

Did limor tell you what module she's using on the Saola?
@ionic elk No, not that I saw. My guess is that the error happens on both.

silver tapir
#

Thanks, will try pelican first.

slender iron
#

@slender iron hi, when you are breakfasted and settled could I talk to you about the Adapter constructor? I could make it a real constructor, but then to do it properly I need to add it as an argument all over the place, to avoid using the single instance as a global. This is certainly doable but is a lot of work and could be deferred.

Also I did make draft release notes yesterday, so a release could be done quickly. Q is whether there are outstanding PR's to include (probably microS2, not sure whta else0
@tulip sleet does it need to be an argument if you allow setting the global for the time being? that seems like a reasonable middle ground

#

@silver tapir neat! That sounds like a good place to start. I think having metadata on guides is helpful too

silver tapir
slender iron
#

nice! I'd have to look more closely at learn vs hugo

#

I'm headed out on a run now before it gets hotter

onyx hinge
#

@teal bear in case you have feedback see the above links ^^, dunno where you are in your canbus research / learning the micropython version. FWIW we are targeting the SAM E54 microcontroller first, so STM32F405 will be a secondary or later implementation in CircuitPython.

tulip sleet
#

@slender iron I realized that _bleio.adapter = Adapter(...) is not possible, because adapter is a module attribute, not a property. So I'd have to provide something like _bleio.set_adapter(). I can still do the constructor for Adapter, but does this make it less attractive to you for now?

onyx hinge
#

@tulip sleet I looked a bit into why modules couldn't have properties, but couldn't figure it out. I guess adding it is .. not exactly in scope of what you're doing

tulip sleet
#

even in CPython, it's not used very often. I keep bumping into this every year or so

onyx hinge
#

Yeah, though in circuitpython it would be the "obvious" way to make a built-in module have modifiable things, like _bleio.adapter, board.DISPLAY, tc

#

I think in "real" python it's rightly a bit of an antipattern

tulip sleet
#

right, so I think we should try to be pythonic

ionic elk
#

Ugh this makefile comment thing sucks it makes the definitions so ugly

#

bleh

#

let's move to ninja

tulip sleet
#

you can set sys.path, etc.

#

but that's pretty old-school, i guess

#

@ionic elk are there other cases where there was a comment on the = line?

onyx hinge
#

.. not in circuitpython ```>>> sys.path = []
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object cannot assign attribute 'path'

#

you can mutate the thing that sys.path names, though

ionic elk
#

@tulip sleet Yeah I wrote the porting guide as a massive block of assignments you copy and paste - all of them had descriptive assignments.

#

I actually had this as a bug further down my list, because I was finding that assignment of DisplayIO and other features was failing at random

#

Fixing for all ports now

tulip sleet
#

is that issue esp32-specific, having to do with converting the makefiles? I don't remember this being an issue before, of picking up the trailing whitesapce

ionic elk
#

(and also adding countio which wasn't in there for some reason)

onyx hinge
#

we could put code somewhere to say CIRCUITPYTHON_ULAB = $(strip $(CIRCUITPYTHON_ULAB)) and so on for each variable, ugh

#

just before all the uses/tests of them

tulip sleet
#

but I am not sure it's an issue in regular make

ionic elk
#

no, it occurs for any assignment where you put a trailing comment. It's a POSIX thing

pastel panther
#

@onyx hinge brb

ionic elk
onyx hinge
#

I think any trailing whitespace might cause it, but when there's not a comment your editor or the pre-commit hooks tell you about it

#

yeah it's "supposed" to work that way, or at least it's now treated as a feature. See also: how do I create a makefile variable consisting of JUST a single space

tulip sleet
#

ABC = " " ?

#

ugh

onyx hinge
#

For a space you need to get a space into a string, I find the easiest way is like this:

    space :=
    space +=
    $(subst $(space),;,$(string))

That works because += always space separates the value of the variable with the appended text.

#

(the last is replacing the blanks between words with semicolons, it's not showing how to get the space in the var)

#

anyway this is all a tangent, and I've fallen into the trap of wanting to show off how well I know Make

#

scars, I got's em

tulip sleet
#

Stu Feldman was on sabbatical from Bell Labs at Berkeley when I was there. I will go back in time and tell him not to do that. (It may have been later than that anyway.)

onyx hinge
#

My gut tells me, many of these behaviors were initially just coincidences of the implementation, but people elevated them into features and now new implementations have to work in the same way.

tulip sleet
#

the whole "tab starts an action" was original to make

pastel panther
#

@onyx hinge it looks like my MacBook decided to install an update before booting. "ETA" is ~2 minutes

onyx hinge
#

@pastel panther no worries. Do you have a potato you can use instead in the meantime?

pastel panther
#

@onyx hinge I'll try my phone? It's saying 30 mins now

teal bear
#

@onyx hinge thanks. I have been poking at MPs canbus stuff, slowly getting a feel for how to work with it.

#

I'd be happy to try out my ... poc/test/get my feet wet code as soon as you have something I can run on my STM32

ionic elk
#

Eventually I'd kind of like to add some comment convention to this file that allows me to automatically sort these into "Core", "Dependent" and "Auxiliary" modules for auto-documentation purposes. So a porter can know what's considered "core" to a port, what modules they unlock without further effort by implementing core modules, and what modules are considered "very optional" for lack of a better term.

#

Examples being Busio and DigitalIO (core), DisplayIO or GamePad IO (dependent), ps2io and ble_file_service (Auxillary)

tulip sleet
#

@slender iron I realized that _bleio.adapter = Adapter(...) is not possible, because adapter is a module attribute, not a property. So I'd have to provide something like _bleio.set_adapter(). I can still do the constructor for Adapter, but does this make it less attractive to you for now?
@slender iron and, to top it off, the current adapter singleton is a static, not a heap object, so I have to change the references to that everywhere if it's going to be assignable

slender iron
#

I don't like how the current init is implicit

tulip sleet
#

@slender iron you have to do _bleio.adapter.hci_uart_init(...) or the equivalent. BLERadio() does this for you, but it's not implicit in _bleio. I'm not sure what you mean by implicit.

#

I had BLERadio handle the common case of having an on-board adapter

slender iron
#

it's unclear to me that hci_uart_init creates the adapter

tulip sleet
#

it doesn't, it just sets up communication with it and initializes it. It's basically some_object.init()

#

but not __init__()

#

_bleio.adapter exists beforehand, but it's not usable

#

i could call it "setup", if the init seems confusing

slender iron
#

that is what constructors are

tulip sleet
#

constructors create and initialize an object. This is more like spi.configure()

#

but spi was not usable before configure

slender iron
#

spi is usable after construction because it has defaults

bleak tiger
#

This sparkline library is so cool can’t believe it’s taken me this long to try it out! Thanks @mental nexus !

tulip sleet
#

i could set up an on-board adapter when the pins are known. I just needed an escape hatch to handle off-board adapters. I started to write the init code in C but it was easier to do in Python

#

I have to create a UART object, some digitalio object, and toggle some pins. that code is in python now

slender iron
#

this feels a lot like displays and they magically work after construction

#

so I'd model it after them

tulip sleet
#

so for on-board displays, the code in board.c takes care of the init. Otherwise there's a heap-created display that has python initialization code. i can't remember how you attach an off-board display to make it be like displayio.DISPLAY (or can you not do that)?

mental nexus
#

@bleak tiger Thanks for the positive feedback. And gotta give thanks to @lone axle for a lot of testing. Also, there's an example with tick marks and tick-mark labeling if you want to snazz it up a bit. It's like a tiny baby step toward matplotlib.

slender iron
#

@tulip sleet it won't be display.DISPLAY but it will be used by the core

tulip sleet
#

it will last past a VM restart?

slender iron
#

yes, up to release_displays

tulip sleet
#

i am looking at the code. OK, so to be like display, I can do this:

  1. Use the onboard ESP32 if it's present. It will get set up and will be _bleio.adapter.
  2. If there is no onboard ESP32, _bleio.adapter will be non-functional, and you can call the constructor, and it will either magically become _bleio.adapter, or you can do _bleio.set_adapter(), and internally it will copy the object struct into the static object, or something similar. Alternatively you could call _bleio.adapter.configure() instead of the constructor for the off-board adapter; that is just a renaming of hci_uart_init
#

in the display case, the first display magically becomes the REPL display, but it does not become displayio.DISPLAY.

bleak tiger
#

@mental nexus yeah tried that too, very nice! Going to setup a plot for each of the sensors on the enviro+ wing with some coloured backgrounds, should be fun

ionic elk
#

It's hard to tell, because we don't have build sizes on the ESP32-S2 yet, but I guess ULAB is too big for the ESP32-S2?

onyx hinge
#

@pastel panther @slender iron thanks for the chat, it was helpful

#

We'll chat again on September 1 at the same time, if anybody else is interested

ionic elk
#

Or I need to move something around

slender iron
#

@onyx hinge @pastel panther the S2 does have can but it's called the Two-wire Automotive Interface (TWAI)

onyx hinge
#

@slender iron good find

slender iron
#

requires an external transceiver

#

@tulip sleet free now?

tulip sleet
#

yeah, and I'm in better shape

tulip sleet
#

@slender iron it is in usb_midi where you have a mutable globals dict, so you can change usb_midi.ports

idle wharf
pastel panther
#

@onyx hinge after reviewing the MCP2515 datasheet, the only thing that stood out wrt filters are that it supports filter priority as well as identifying which filter resulted in acceptance

#

and that it can support filtering on standard or extended identifiers. If an for standard frames, any additional bits that would be applied to an extended frame ID are applied to the first two data bytes. It calls this out as being useful for filtering frames for high level protocols which presumably make use of those bytes for identification

manic glacierBOT
pastel panther
#

@onyx hinge Here's my bookmarks for CAN stuff including some HLP (high level protocol) stuff:

ionic elk
#

@slender iron I'm receiving the following error when I try to enable Ulab on the ESP32: esp_image: Image length 564688 doesn't fit in partition length 524288. This then spirals off into a number of other booting and SPI errors.

  1. this seems like a really large size for the circuitpython build to be, is that normal?
  2. Is there some way of regulating where larger modules like ulab are positioned in the partition table?
#

full error set:

E (323) esp_image: Image length 564688 doesn't fit in partition length 524288
E (323) boot: OTA app partition slot 0 is not bootable
E (327) esp_image: image at 0x90000 has invalid magic byte
W (333) esp_image: image at 0x90000 has invalid SPI mode 224
E (340) boot: OTA app partition slot 1 is not bootable
E (345) boot: No bootable app partitions in the partition table
slender iron
#

ya, that's normal. the idf is giant

#

my native_wifi branch bumps it up a lot

#

I've got some changes to module enable in my PR too

ionic elk
#

I was going to try and reduce the inline limit

#

But if you have a better suggestion I'm happy to do that instead

slender iron
#

I don't think that'll help

#

don't worry about ulab until the native wifi stuff hits

#

it changes the partition table

ionic elk
#

Ok, I'll reduce my latest PR to just fix the comments issue.

manic glacierBOT
orchid basinBOT
onyx hinge
#

@pastel panther thanks, just saw your messages

manic glacierBOT
slender iron
#

@ionic elk did you find the issue with displayio?

ionic elk
#

I confirmed it but haven't found it yet

slender iron
#

did you try it on a wroom? it'd be good to determine if it is because of the psram

ionic elk
#

I don't actually have any wrooms

#

I'll pick some up if you want

slender iron
#

you can just load the wroom build onto the wrover too

#

(the reverse won't work because the ram will be missing)

ionic elk
#

@slender iron what do you mean by because of the PSRAM? as in, the lack of psram on the wrover would be causing the issue? Running her displayio code def crashes the wrover

#

I can test it on main though and see if it still happens

slender iron
#

it's blocking my psram PR even though I suspect it's unrelated 🙂

#

testing on main would work too

ionic elk
#

also wow yeah the inline limit doesn't affect the flash size at all? is there a reason for that?

slender iron
#

probably because we don't run lto

ionic elk
#

I'll test on main real quick here and make a new issue if it shows up so your PR can go in

slender iron
#

thanks!

manic glacierBOT
#

When making an assignment such as CIRCUITPY_MODULENAME = 1 in a makefile, make will automatically add any trailing whitespace to the value of the assignment, which can cause evaluation failures down the line. Normally the compiler will warn you about this, but when the assignment is followed by an inline comment, CIRCUITPY_MODULENAME = 1 #somecomment, this warning is omitted.

Unaware of this I mistakenly included several inline comments in the STM32 and ESP32 ports, as well as in the ...

ionic elk
#

@slender iron it occurs on main. Making new issue.

slender iron
#

thanks!

manic glacierBOT
#

As noted during testing by @ladyada, the ESP32 encounters an error when attempting to connect to an SSD1306 I2C screen using the following DisplayIO sketch (tested on Saola 1 Wrover devboard):

import board
import busio
import displayio
import adafruit_displayio_ssd1306
displayio.release_displays()
print(dir(board))
i2c = busio.I2C(board.IO8, board.IO9)
display_bus = displayio.I2CDisplay(i2c, device_address=0x3d)
display = adafruit_displayio_ssd1306.SSD1306(display_bus, width=1...
#

@ladyada @tannewt I've confirmed that the issue with DisplayIO also happens on main and thus is probably unrelated to this PSRAM update. I've opened a new issue for it here: #3334. @ladyada if you'd like to keep testing this PR, I think most other sketches should still work, you just got unlucky with the one you tried landing on a new bug! It only occurs when the screen is physically plugged in, so removing it should allow you to recover your filesystem.

manic glacierBOT
cobalt grail
cobalt grail
#
    if (!carrier || pin || frequency) {
        mp_raise_NotImplementedError(translate("Port does not accept pins or frequency. \
                                    Construct and pass a PWMOut Carrier instead"));
    }
#

This is in PulseOut.c. I don't think that produces the expected output?

manic glacierBOT
slender iron
#

@cobalt grail it's a weird thing that @ionic elk did. I believe they were already talking about it

onyx hinge
#

@slender iron any pin restrictions on the esp32s2 TWAI?

slender iron
#

¯_(ツ)_/¯

#

probably not since it's only 1mhz

#

@onyx hinge no, looks like its only routed through the gpio mux

onyx hinge
#

good

simple pulsar
#

@tulip sleet On the *man use of tabs, did you hang out with Eric Allman too? He's a tab lover.

cobalt grail
#

@cobalt grail it's a weird thing that @ionic elk did. I believe they were already talking about it
@slender iron Yeah, I noticed it stuck more than my translation at 99%.. Well.... 🙂

ionic elk
#

Yikes, what'd i do

#

bad styling on the error?

manic glacierBOT
#

Since e121e267adacf6 (#3332), the shared bindings matrix uses the stubs. Therefore, we must build them! This should fix the failure to build the docs on readthedocs.org.

Neither @sommersoft nor I saw this locally since we had previously built the stubs. github CI didn't see it, because it manually builds the stubs in an earlier step of the build process, and does not clean the tree in between.

tulip sleet
#

@simple pulsar Yes, I was a contemporary of Eric Allman also, but never had to write sendmail files until much later.

manic glacierBOT
#

SMP Debian 5.7.10-1 (2020-07-26) x86_64 GNU/Linux
crashes often when using ESP32-S2 and it's starting to become annoying.
Kernel just freezes, I can't see nothing like register dump in syslog to see
in which function and source line crash happened.

Normal workflow that triggers crash every cca 10-20 retries is this:

cp demo.py /media/user/1234-5678/
screen /dev/ttyACM0

import demo
... it uses SPI and bitbang IO ...
Ctrl-D
editing demo.py and cp again and linux freezes, o...

manic glacierBOT
mental nexus
#

I'm trying to access a parent's getter and setter using __set__ and __get__ in CircuitPython, but it doesn't allow it. This code works in python (2.7.16) but not in CircuitPython. Is there an alternate way to access a parent class getter/setter in CircuitPython?

CircuitPython error:

  File "code.py", line 39, in <module>
  File "code.py", line 34, in scale
AttributeError: 'property' object has no attribute '__set__'

Here is my code. This works in python 2.7.16 but give the above error in CircuitPython.

class simpleGroup(object):
    def __init__(self):
        self.funny=0

    @property
    def scale(self):
        print('simpleGroup getter being called')
        self.funny=2
        return self._group_scale

    @scale.setter
    def scale(self, new_scale):
        print('simpleGroup scale setter was called with value: {}'.format(new_scale))
        self._group_scale=new_scale
    

class simpleLabel(simpleGroup):

    def __init__(self):
        self.label_scale=None

    def printsomething(self):
        print('this is a test')

    @property
    def scale(self):
        print('simpleLabel getter being called')
        return simpleGroup.scale.__get__(self)

    @scale.setter
    def scale(self, new_scale):
        print('simpleLabel scale setter was called with value: {}'.format(new_scale))
        self.label_scale=new_scale
        simpleGroup.scale.__set__(self,new_scale*5) # Set the simpleGroup's scale to (5 * input value)

print('1 ***')
my_simpleLabel=simpleLabel()
print('2 ***')
my_simpleLabel.scale=1
print('3 ***')
print('my_simpleLabel.scale initial value: {}'.format(my_simpleLabel.scale))
print('4 ***')
print('my_simpleLabel.label_scale: {}'.format(my_simpleLabel.label_scale))
print('5 ***')
my_simpleLabel.scale=2
print('6 ***')
print('my_simpleLabel.scale initial value: {}'.format(my_simpleLabel.scale))
print('7 ***')
print('my_simpleLabel.label_scale: {}'.format(my_simpleLabel.label_scale))
#

Here is the output from python 2.7.16:

iMac:Kevins programming mxxxx$ python "code 3.py"
1 ***
2 ***
simpleLabel scale setter was called with value: 1
simpleGroup scale setter was called with value: 5
3 ***
simpleLabel getter being called
simpleGroup getter being called
my_simpleLabel.scale initial value: 5
4 ***
my_simpleLabel.label_scale: 1
5 ***
simpleLabel scale setter was called with value: 2
simpleGroup scale setter was called with value: 10
6 ***
simpleLabel getter being called
simpleGroup getter being called
my_simpleLabel.scale initial value: 10
7 ***
my_simpleLabel.label_scale: 2
#

It also works fine on python 3.8.2

tulip sleet
#

micropython (and therefore circuitpython) takes some shortcuts for speed in cases like this, so I'm not surprsed

manic glacierBOT
mental nexus
#

@tulip sleet I’m trying to “intercept” the setter and do some stuff and then call the parent class setter. Do you have any suggestions on an alternate approach?

#

I think I need direct access to the parent class’s scale variable because displayio uses that to scale this object on the screen.

manic glacierBOT
radiant trench
#

hey folks... I've built a cool little macropad using an itsybitsy m0. Works great and I'm super happy with it. Only thing that bothers me is it showing up as an external drive all the time.

Is there a way to toggle its ability to show up as an external drive? (primarily because it triggers a warning to my employers security dept every time I plug it in!) 😄

mental nexus
#

Oops! you probably need data if it’s a keyboard!

radiant trench
#

Yeah... it might help 😄

mental nexus
#

Ha

radiant trench
#

I was thinking maybe there was a simple toggle hidden away in the REPL or something?

onyx hinge
#

you'd have to rebuild circuitpython from source to disable the drive

#

(and I'm not sure exactly what changes you'd have to make)

radiant trench
#

Yikes... that sounds over my head

tulip sleet
#

@mental nexus As an example, there's this existing bug: https://github.com/micropython/micropython/issues/2720. I was going to suggest using super(), but ran into that problem. However, I tried it with a setter and it seemed to work (it may have shadowed the parent property: I'm not sure). ... Definitely test with 3.x, not 2.x, as micropython targets 3.4 and later

mental nexus
#

I can’t decipher all of it but some notes from Scott suggest that CircuitPython can use property descriptors (?)

tulip sleet
#

we do: they're used in the adafruit_ble library extensively

mental nexus
#

If they are present in CP, maybe am I doing something wrong in my code?

tulip sleet
#

It may be a limitation of the superclass (Group) being a native C class as opposed to a Python class, but that's just a guess.

#

i guess the point is that we define __set__, we don't use it on existing properties, so that's not a good example

#

but normally, I would expect you to use super().__set__()

teal bear
#

@onyx hinge is there a forum (or a github issue) where I can chat about some canbus timestamp thing that is in the stm32 and maybe all but I don't know and would like to help with this if I can

tulip sleet
#

@slender iron were you expecting that I would implement the hard-reset for ESP32 to flip it into Bluetooth HCI mode in C now, as part of the constructor? I said I could do that, but I don't think I confirmed that's what you preferred. I may add some options like the polarity of the reset pin, etc, since it can vary. And there will be limitations if/when we start supporting other adapters that have different hard-reset sequences. (There is a soft reset, but it requires that the adapter is in HCI mode).

slender iron
#

@tulip sleet I hadn't thought about it. Up to you.

tulip sleet
#

I think I will leave it out for now, because it makes the core it very device-specific. The disadvantage is that you need the BLE library, or at least copy its reset sequence, but that's not a big deal.

slender iron
#

👍

#

breakfast time for me

mental nexus
#

I tried using super, but get the message:

AttributeError: 'super' object has no attribute '_group_scale'

Here is my updated code.py:

#
class simpleGroup(object):
    def __init__(self):
        self.funny=0
        self._group_scale=1

    @property
    def scale(self):
        print('simpleGroup getter being called')
        #self.funny=2
        return self._group_scale

    @scale.setter
    def scale(self, new_scale):
        print('simpleGroup scale setter was called with value: {}'.format(new_scale))
        self._group_scale=new_scale
    

class simpleLabel(simpleGroup):

    def __init__(self):
        self.label_scale=None

    def printsomething(self):
        print('this is a test')

    @property
    def scale(self):
        print('simpleLabel getter being called')
        return super().scale.__get__(self)

    @scale.setter
    def scale(self, new_scale):
        print('simpleLabel scale setter was called with value: {}'.format(new_scale))
        self.label_scale=new_scale
        super().scale.__set__(self,new_scale*5) # Set the simpleGroup's scale to (5 * input value)

print('1 ***')
my_simpleLabel=simpleLabel()
print('2 ***')
my_simpleLabel.scale=1
#

It gives the error on the line my_simpleLabel.scale=1

tulip sleet
#

you need to call super().__init__ in simpleLabel.__init()__ to create the attribute, right?

mental nexus
#

I tried that too and it doesn't work, same message.

class simpleGroup(object):
    def __init__(self):
        self.funny=0
        self._group_scale=1

    @property
    def scale(self):
        print('simpleGroup getter being called')
        #self.funny=2
        return self._group_scale

    @scale.setter
    def scale(self, new_scale):
        print('simpleGroup scale setter was called with value: {}'.format(new_scale))
        self._group_scale=new_scale
    

class simpleLabel(simpleGroup):

    def __init__(self):
        self.label_scale=None
        super().__init__()

    def printsomething(self):
        print('this is a test')

    @property
    def scale(self):
        print('simpleLabel getter being called')
        return super().scale.__get__(self)

    @scale.setter
    def scale(self, new_scale):
        print('simpleLabel scale setter was called with value: {}'.format(new_scale))
        self.label_scale=new_scale
        super().scale.__set__(self,new_scale*5) # Set the simpleGroup's scale to (5 * input value)

print('1 ***')
my_simpleLabel=simpleLabel()
print('2 ***')
my_simpleLabel.scale=1
#

Error message: AttributeError: 'super' object has no attribute '_group_scale'

tulip sleet
#

well, maybe not. I would say you don't need to do this as a subclass, you could just incorporate a simpleGroup inside simpleLabel. That would get around all this.

#

also no need to do (object), btw

mental nexus
#

The (object) was required for python, it acted strange without it (would not show my print statements or execute the getter/setters).

tulip sleet
#

for python 2.7, yes, I think

mental nexus
#

Alternate is to define a Group.set_scale function up at the C-level. I really want bitmap_label to be a Group subclass so it acts just like label.

tulip sleet
#

but don't use 2.7

mental nexus
#

ok, will focus on 3 going forward.

tulip sleet
#

2.x is discontinued and no longer supported as of January 2020

#

some people like Red Hat will be doing security fixes, but not python.org

raven canopy
tulip sleet
#

It would be nice to fix that sooner or later.

mental nexus
#

@raven canopy I'm totally new to composition, I looked over your note yesterday but struggled to understand it. Can I use composition with the builtin C classes (like displayio.Group)?

#

In my case, displayio somehow uses the scale in the Group to set the display scaling for this object. I'm not sure if displayio will "know" the value of scale if I redefine it separately in my new class.

raven canopy
#

i'm not well-versed in displayio, but from the python side i don't know of any impediments.

mental nexus
#

Currently my class "Label" is a subclass of Group. This group contains a tilegrid. If I'm following your suggestion, I can redo my structure like this:
My class "Label" is a subclass of Group. I instance a "local_Group" set the scale, and put my tileGrid into it. Then, I append "local_Group" into the self (a Group).

Structure idea (where "->" means contains)

Current: Group -> TileGrid
Proposed: Group-> Group ("local_Group") where I can directly set the scale -> Tilegrid

#

Hmm... I'm still not sure that fixes my getter/setter override issue or not, but I can give it a try.

onyx hinge
raven canopy
#

@mental nexus yeah, that proposed seems right. the "difficult" decision part is how you want to access the base Group's methods. if you want access to all of them, it requires either overriding each method/property, or accessing them via the composed attribute. i'll update the gist i linked to show what i mean here.

mental nexus
#

Ok I’ll check it out and then take another try at it.

manic glacierBOT
ionic elk
#

Has anyone dealt with the ESP32 spitting out a corrupted backtrace before? Backtrace:0x4001abc1:0x3ffde130 |<-CORRUPTED I'm hacking away at it with printf debugging but it's kind of a pain...

manic glacierBOT
mental nexus
#

@raven canopy thanks for the updated gist, I think that’s how I can do it. I’m lucky that a Group can contain a Group so I can use that ability so I my label can still subclass Group and continue a Group too. I’ll check to see what impact this will have on displayio performance since it will have another layer stacked in there. Thanks to you and @tulip sleet for the discussion on these esoteric topics. I wasn’t planning on finding cracks in the MP/CP structure, I’m just trying to draw some text on the screen! Thanks again!

slender iron
#

@ionic elk I don't have a good way of debugging it

idle wharf
#

I had some weird failed to flash events last night with my ESP32-S2 WROVER. It all worked fine. Then 20-30 minutes I couldn't flash it at all, seemed to be timing out. I then set it aside for a while and later it worked fine again.

The one thing I was doing which was different than what I normally do is I had both the external USB (the one on the WROVER) and the native USB (the esp32-s2 usb on my breadboard) hooked up simultaneously to my Mac. Is that a bad thing to do? Maybe power from both sides is evil?

#

I should mention in the time I set it aside my FeatherS2 worked fine with the same build tool chains\code\etc.

#

(saying things out loud helps) I should have tried disconnecting the power from the native usb connection...

ionic elk
#

@slender iron I've tracked the DisplayIO error a bit and it is implying the problem is inside a ValueError call??

crimson ferry
#

I've seen similar quirkiness on macOS with ESP32-S2. CIRCUITPY comes and goes, USB comes and goes from my tty listings (and sometimes names change). I haven't really found a pattern. I do like to have both serial connected, but 5v only on the USB connector, not the native.

slender iron
#

@ionic elk /shrug

slender iron
#

@idle wharf I regularly leave both USBs plugged in

manic glacierBOT
idle wharf
#

@crimson ferry that's exactly I was seeing...

crimson ferry
#

It could be something I'm doing in code isn't quite ready for prime time and makes things unstable, I haven't narrowed it down yet

idle wharf
#

@slender iron I saw you doing that on deep dive and I was like OH I should try that so I can see both sides of what's going on. Is that cable you use with the switch toggling power or data on\off ?

#

@crimson ferry yeah, that's why I wanted both sides hooked up to see the raw (?) output on the external USB. I'll try it with out power on both connections tonight.

slender iron
#

@idle wharf it toggles data but blips power as it does it

idle wharf
#

Thanks to you both, that give me some ideas !

slender iron
#

I've been on linux recently though, not mac

idle wharf
#

I have a DELL XPS15 running windows I can try too... I also could try it from a PI or BB Black.. If it keeps happening I'll see if I can pin it down to being just on Mac or not. I think that would be helpful to know. Intermittent issues are very discouraging for folks not used to that ...

manic glacierBOT
#

I'm new to canbus, so I am treading lightly.

I would like this to be exposed:

32.9.3 CAN mailbox registers
...
Bits 31:16TIME[15:0]: Message time stamp 
This field contains the 16-bit timer value captured at the SOF transmission.

p1108
https://www.st.com/resource/en/reference_manual/dm00031020-stm32f405-415-stm32f407-417-stm32f427-437-and-stm32f429-439-advanced-arm-based-32-bit-mcus-stmicroelectronics.pdf

I don't know if this is a general canbus thing that is expected ...

ionic elk
#

Ok, I'm feeling somewhat defeated by this DisplayIO error. Through repeated use of ESP32 log messaging I've pinned down the null dereference to this exact point: https://github.com/adafruit/circuitpython/blob/24fb08dbd9a16e83aded3f0874bc96fcd0462fea/py/runtime.c#L1527, but... there's nothing there. The pointers that go into it are valid, and the call itself is actually just an inline macro with nothing interesting about it. https://github.com/adafruit/circuitpython/blob/24fb08dbd9a16e83aded3f0874bc96fcd0462fea/py/nlr.h#L144

So I'm stumped. It could be an interrupt call that just happens to show up here for some deterministic reason? The backtrace is corrupted so no clues there. @slender iron if you have any ideas I'd love to hear them, honestly can't think of what to even try here.

slender iron
#

if the stack is corrupt then its possible its all invalid

ionic elk
#

what would that mean?

slender iron
#

you could see if there is freertos checks you can enable

ionic elk
#

For the record, taking out the original mp_raise_ValueError call that starts this whole rabbithole lets the code proceed normally until it tries to release a display that doesn't exist

slender iron
#

which raise call is the issue?

#

that sounds promising

ionic elk
slender iron
#

I haven't figured out to do a deliberate crash like I use asm("bkpt"); for

ionic elk
#

I've been tracking it with ESP_LOGE messages, like this:

E (434) hiero: Port Init Success
E (1374) hiero: ENTERED I2C DISPLAYIO
E (1374) hiero: BLOC
E (1374) hiero: ENTER I2C PROBE
E (1384) hiero: EXIT I2C PROBE
E (1384) hiero: BLOC
E (1384) hiero: Device ADDR 3d
E (1394) hiero: ENTERED VALUEERROR
E (1394) hiero: BLOC
E (1394) hiero: BLOC
E (1394) hiero: ptr: 0x3f0056e8, ptr: 0x3f00d128
E (1404) hiero: ENTERED VLIST
E (1404) hiero: BLOC 0x3ffc69f0
E (1414) hiero: BLOC 0x3ffc69f0
slender iron
#

the nlr stuff is going to read back up the stack to unwind

#

I'd be curious if the stack is already corrupt when the ValueError is attempted to be raised

ionic elk
#

How would one check such a thing?

slender iron
#

you could try crashing earlier but I'm not sure how

slender iron
#

you could just move the value error raise

#

like do it before the probe

ionic elk
#

trying that now

#

without a parameter of course

slender iron
#

👍

ionic elk
#

still calls nlr raise, so it should be similar I'd think

slender iron
#

yup

ionic elk
#

yes it explodes as soon as I call it

#

so that rules out a stray interrupt, whew

slender iron
#

🙂 binary search time

#

find what causes it to break

ionic elk
#

with commits? or just the same in-code message strategy I've been doing?

#

Or actually moving the call up in the program?

#

Blows up as soon as Port.c. I'm thinking that any call to ValueError is actually busted

thorny jay
#

Lovely, a french guide (not CP): https://learn.adafruit.com/makecode-fr but I believe this is in Canadian French. Not really shocking and totally understandable in France, Belgium and elsewhere. But I was surprised by at least one word that I would not have used. 🙂

Adafruit Learning System

Tout ce que vous devez savoir pour coder avec Microsoft MakeCode

idle owl
#

@thorny jay The translator is Canadian, but worked with the original author who speaks non-Canadian French in the review process. Hopefully it's enough for you to understand it?

thorny jay
#

Yes, it's OK. I don't know if there is a neutral French that avoid words that would be strange to one side or the other.

idle owl
#

Fair enough.

thorny jay
#

I was unsure at the begining, then I found "présentement" and I said to myself... I would never use that (but I understand it).

#

Also not sure if I should use Colour or Color here. 🙂

idle owl
#

The translator wants to translate more guides, and we're starting them with the CircuitPython guides. I imagine we wouldn't mind assistance reviewing them.

#

Both work 🙂

thorny jay
#

Yes I can try to help and re-read. My spelling is far from perfect, but I can spot stuff.

idle owl
#

Please try to bear in mind it will have been written in Canadian French. Ideally we can reach a happy medium.

onyx hinge
#

@thorny jay sounds like the words are just strange/dialect, not inappropriate? We'd change the latter for sure.

thorny jay
#

It's perfectly fine. Don't worry.

onyx hinge
#

OK

thorny jay
#

I know in the subtitle world or movie dubbing, when you get the "wrong" file you can get a good laugh.

onyx hinge
#

I know there are words between british and american english which are totally inappropriate in the other but are words you say to children in one

#

it can be a source of amusement but only in the right crowd, not in an adafruit guide

manic glacierBOT
onyx hinge
#

no usb_hid on stm32f405 feather? Is it the USB descriptor limitation?

#

er @ionic elk ^

thorny jay
#

Doing my homework, the difference are more "visible" in oral french, because it is less formal and the pronunciation might be different. In writing, it become less obvious. Actually, I noticed because I was hearing the word and it came with a quebec accent. So there seem to be no worries to have on written guide. The difference might be that in Quebec they try to avoid word that are too English (in order to protect the language where they are a minority) where in France, there is a better acceptation of English (technical) terminology and less attempt to find a French version of the word.

#

Of course, while watching movies, having the right version can be key. 🙂

manic glacierBOT
#

This sounds similar to #3268, which occurs on other platforms. See the links there to the linux-usb mailing list and to the Launchpad bug report.

There may be multiple crash causes. I fixed one, which is that storage.erase_filesystem() would frequently crash the Linux host. I was told that Linux would not guard against strange behavior by the USB filesystem.

People have also seen crashes on disconnect (e.g., pulling the USB plug). It's not clear whether this is filesystem-based, or du...

ionic elk
#

@onyx hinge I don't know, somebody changed the USB system - I don't even see a category for "USB_DEVICES" in the mpconfigboard.mk files anymore so I have no idea what's set

onyx hinge
#

It's computed from other defines like CIRCUITPY_USB_HID

#

this is a recent-er change

solar whale
#

This is a screenshot of some SPI transactions at 2MHz baudrate on a SAMD21 with the RFM69 radio -- you can see a longish transmission at the end when a full packet is sent. What I don't understand is why there is all this "dead" time. why is there a full ms between SPI transactions. The code is just polling a flag then sending the packet when it is ready. The bottom panel is CS and it is only toggling about once every ms. Does this have something to do with the "power savings" changes?

manic glacierBOT
onyx hinge
#

hmm defining CIRCUITPY_USB_HID stops it enumerating. Probably isn't enabled due to the endpoint limit, but unlike esp32s2 exceeding it doesn't cause a prompt crash(?)

manic glacierBOT
#

See supervisor/supervisor.mk for how USB_DEVICES is set. It is not computed based on whether various modules are enabled or disabled.

USB_DEVICES = "CDC,MSC,AUDIO,HID" was the full list.

You can adjust which HID devices are present as well. The full list is:
USB_HID_DEVICES = "KEYBOARD,MOUSE,CONSUMER,GAMEPAD"

The USB devices are enumerated after boot.py runs, but before code.py or the REPL runs. It can't be done completely on the fly without doing a USB reset; you can't ad...

onyx hinge
#

no, adding the endpoint limit check at 4 doesn't trigger an error at build time. shrug oh well, I can live without

#

I didn't THINK it's any chip specific stuff to implement HID, but what do I know

tulip sleet
#

no, it's not

manic glacierBOT
solar whale
#

For Reference if anyone is looking, here is the same SPI sequence but on an M4 -- the CS toggling is ~ every 250 microsec.

manic glacierBOT
#

Through repeated use of ESP32 log messaging I've pinned down the null dereference to this exact point: https://github.com/adafruit/circuitpython/blob/24fb08dbd9a16e83aded3f0874bc96fcd0462fea/py/runtime.c#L1527, but... there's nothing there. The pointers that go into it are valid, and the call itself is actually just an inline macro with nothing interesting about it. https://github.com/adafruit/circuitpython/blob/24fb08dbd9a16e83aded3f0874bc96fcd0462fea/py/nlr.h#L144

I thought this might be...

stuck elbow
#

Can I use DigitalInOut inside boot.py? So that once we can control the USB devices in there, I could make the MSC enabled only when a certain key is held on my keyboard, or something like that?

tulip sleet
#

sure, other people do that kind of thing all the time, mostly to enable/disable remount of the filesystem to rread/write

manic glacierBOT
#

Mentioned this awhile ago on Discord, but thought I'd chime in here.

I'm working on a tutorial and have a bunch of example scripts all stored on the CIRCUITPY drive. Switching between them requires manually renaming or copying files to code.py/main.py. This gets tedious so I wrote a menu script that lists the available other scripts on the CIRCUITPY drive. Selecting one runs it using Import. This works, in general. The problem is that larger scripts can overflow the heap when imported even...

stuck elbow
#

neat. that solves my problem

manic glacierBOT
ionic elk
#

Ok, I gotta back up a bit. @tulip sleet @slender iron , what exactly is "nlr"? and what version of nlr_jump are we using, and why? There's several different varieties, most of which are written in assembly.

tulip sleet
#

non_local_return, it's used for throwing exceptions

#

vaguely like setjmp

ionic elk
#

what is setjmp?

tulip sleet
#

multi-frame jump in C, quite old

ionic elk
#

And what is it doing, exactly? I can see that it takes an obj_t casted as a pointer. But from there on out I'm lost

manic glacierBOT
tulip sleet
#

you set up something that will catch a raised exception, and then call a routine. If that routine or something it calls raises an exception, it returns back to the catcher. Basically try-except in C

slender iron
#

Blows up as soon as Port.c. I'm thinking that any call to ValueError is actually busted
@ionic elk Sorry, in the code. It won't work if the VM hasn't started yet.

ionic elk
#

@slender iron should it return a null reference exception if the VM isn't started?

slender iron
#

it usually safe modes

#

because you attempt an allocation when the vm isn't setup

ionic elk
#

Does safe mode even work on the ESP32-S2?

#

Maybe that's what's happening here

slender iron
#

I don't think so

tulip sleet
#

i had the exact issue when working on _bleio HCI. I threw an exception when VM wasn't ready, and I got an nlr error which printed out on the next REPL invocation.

slender iron
#

but it should call the function still

ionic elk
#

Call which function?

tulip sleet
#

if you do an nlr_jump and there's nothing to catch it, that's trouble

ionic elk
#

I'm sorry for asking all these questions but this is all so over my head, what is supposed to be catching what?

slender iron
#

reset_into_safe_mode

ionic elk
#

I haven't worked with the exception system before so I'm learning a lot for the first time looking into this

slender iron
#

I don't understand the nlr stuff very well either

ionic elk
#

So, if I understand this correctly, the NLR jump is trying to go to someplace in memory that maybe isn't set up to receive it yet?

slender iron
#

it's trying to unwind the python stack

ionic elk
#

Though I don't understand how a function would not be set up, is that a VM thing? I must sound like an idiot here, I haven't worked with the VM at all

#

what does unwind the python stack mean?

slender iron
#

it means stop the function you are doing and continue the outer function to give it a chance to catch the error

#

and repeat if the outer function doesn't catch it

ionic elk
#

stop the python function, you mean. So, this is a way for the python code to do the try-except stuff

#

right?

slender iron
#

correct

ionic elk
#

that makes a lot more sense, ok

tulip sleet
#

C code can also invoke Python exceptions. We do that al lthe time, but we're assuming you invoked the C code from Python.

ionic elk
#

and that's why this would all fail if the stack is corrupted already

tulip sleet
#

or if the C code was not called from Python

ionic elk
#

if there's nothing to "back up" to, the jump in memory will explode

tulip sleet
#

yes, it's an uncaught exception, and it goes out through the roof

ionic elk
#

hmmm. Well, I know that it's being called from python, because it only happens when I have the specific line in the python code, and even then, only when the I2C device is successfully plugged in

#

But I'm not really sure how to move the exception back in the python code to try and find where it breaks. Do I try to figure out what common hal calls the python code is making, and stick random valueerrors in their construct functions?

tulip sleet
#

you can set a breakpoint on mp_raise_msg() and see what things look like from there.

#

and I usually put a bunch of print statements inside the python code to see how far it got before the crash.

ionic elk
#

I guess I'll get GDB up and running then, no putting it off any longer.

#

But I know pretty clearly where the exception is failing

#

It's just not clear where the stack corruption is happening

tulip sleet
#

i couldn't find it in discord, but did you see a memory error 65536 something before that?

#

or maybe that was someone else's problem

ionic elk
tulip sleet
#

so do you know which python line is throwing the error?

ionic elk
#

This is a null reference exception that occurs in display = adafruit_displayio_ssd1306.SSD1306(display_bus, width=128, height=64) in a ValueError message call inside I2CDisplay construct

#

^so yes

tulip sleet
#

but there's already an I2CDisplay constructor call in the previous line?

#

anyway, yes, set the breakpoint on that mp_raise, and you should be able to poke around and find out what's going on

#

i gotta go pick up a grocery order

ionic elk
#

While I don't have breakpoints, I've been poking around with the messaging, and nothing is out of place. All the input variables to the exception are fine

tulip sleet
#

but the stack might have been smashed up before that somehow

ionic elk
#

But it sounds like those aren't actually the issue, it's the destination that it calculates

#

right

#

what kinds of things can smash up the stack?

tulip sleet
#

out of bound overwrites to a buffer on the stack

ionic elk
#

ah

tulip sleet
#

it -could- be a problem with the nlr implementation for ESP32, but that's less likely

ionic elk
#

One last question before you grab your groceries, what's the intended behavior if you call a ValueError or something before the VM starts, like in port_init

#

what is it supposed to do?

tulip sleet
#

it resets into safe mode with an NLR error that will be reported when you go into the REPL

ionic elk
#

So clearly the IDF is interfering with our ability to drop into safe mode, in that case

tulip sleet
#

MICROPY_NLR_JUMP_FAIL is the safe mode reason

#

if you set a breakpoint at reset_into_safe_mode(), you imght see something. I think Scott mentioned that already?

ionic elk
#

I don't think so, the IDF is stepping in way before we get to that point

#

At least I think so... hard to check with the messaging approach. I'll probably work on getting my GDB on the ESP32 set up in the short term.

manic glacierBOT
#

I have ported a small project for ECP5 JTAG programmer
from micropython to circuitpython:
https://github.com/emard/esp32ecp5/tree/master/circuitpython

Last known good circuitpython that runs it correctly was this:

adafruit-circuitpython-espressif_saola_1_wrover-en_US-20200827-fe73cfb.bin

In later versions 2MB PSRAM support appears which is absolutely great,
but now SPI is either not working or has issues if initialized and deinitialized often.

This project needs to switch betwe...

tulip sleet
#

good luck! it will be worth it for now and the future

ionic elk
#

Anyway, I'll let you get to your errands, thanks for your help!

manic glacierBOT
#

I'd say SPI doesn't work at all now :) but I don't know the details,
for this I must analyze and investigate more.
Apart from glitches, what I see currently that it SPI doesn't send correct
data I pass it (probably it sends all 00 or FF) and reads all 0. Only the
bitbanging part is still working.

This project esp32ecp5 is in use whole year for micropython ESP32-WROOM for
ECP5 and now I got it also to work on ESP32-S2, almost at the same speed as
on micropython ESP32 dual core.

manic glacierBOT
#

I've just been doing a substantial amount of testing using 20200825 on 5.3.0. I've probably done about 200 tests of my game across all the devices. One CPB with TFT Gizmo just spat out this very odd 65536 failure:

TXing <RpsRoundEndAdvertisement manufacturer_data=<ManufacturerData company_id=0822 data=03 43 fe 01 03 03 00 15 03 51 fe 14 > > interval 0.042
Listening for (<class 'RpsEncDataAdvertisement'>, <class 'RpsKeyDataAdvertisement'>, <class 'RpsRoundEndAdvertisement'>)
Traceb...
lethal maple
#

I have been refining a data logger running Arduino code on a Feather M0 with a 3.5" TFT over the last 2 years. I write Python programs as a day job and would like to transition the project to circuit python. My concern is whether circuit python on the M0 will be fast enough to refresh the display every second. If not every second, every 10 seconds? (I don't want to invest the porting effort if the result is unlikely to be performant.

thorny jay
#

The "every 1 seconds" should be fine. But the issue might be the memory on a M0 if you want to use displayio.

#

Can someone cross-check and confirm?

onyx hinge
#

Most m0 boards do not have displayio. Check the support matrix for the board you are considering.

lethal maple
#

Yes, I saw that from another post. I'm actually using the Adafruit Feather M0 WiFi with uFL - ATSAMD21 + ATWINC1500. Is there a table somewhere that lists all the Feather CPU boards with their relative processor power?

tulip sleet
#

@lethal maple the ATWINC1500 is not supported by CircuitPython. We are using the ESP32 co-processor instead for wifi

manic glacierBOT
manic glacierBOT
#

A CLUE just blew up with another distinctive number 42241. I checked my notes and I've had two of these before on a CLUE.

TXing <RpsRoundEndAdvertisement manufacturer_data=<ManufacturerData company_id=0822 data=03 43 fe 03 03 03 00 1b 03 51 fe 1a > > interval 0.042
Listening for (<class 'RpsEncDataAdvertisement'>, <class 'RpsKeyDataAdvertisement'>, <class 'RpsRoundEndAdvertisement'>)
Traceback (most recent call last):
  File "code.py", line 448, in <module>
  File "rps_comms.py", ...
orchid basinBOT
orchid basinBOT
slate scroll
#

hello!

#

I’m trying to make a “BLE HID receiver” - gets a BLE HID report and passes it through to USB HID. Problem is I’m not sure how to get the report from the BLE connection - I tried .device[0].report to the connection (it’s a ReportOutobject) but it’s always a bytearray with ‘0x00’. pointers? I know that the BLE HID central is not implemented but I don’t need to translate the report to a letter, I just need to pass it through

solar whale
#

@tulip sleet got a minute for some SPI/sleep questions?

#

ah -- you must be busy -- nevermind -- I'll check back later -- need to head out soon myself. I'm trying to understand why polling an SPI register is taking so long. On M0 there is ~ 1ms between reads, on M4 about .25 ms... just wondering if this has something to do with the "sleep_until_interrupt" in port.c -- Is there a way to disable the power savings sleeping?

#

I'll be AFK for a few hours -- will check back later.

simple pulsar
#

@tulip sleet I was just having another look at https://github.com/adafruit/circuitpython/issues/3119 and I might have discovered something else. I have a basic start_scan running on REPL just listening for anything and it terminates early. I set it running with timeout=7200.0 and it stopped after about 10-11 minutes. Is there any legitimate reason for it to terminate early?

GitHub

I had a spate of these a fortnight ago and I just got one now on a CLUE running 5.3.0 and fairly recent libs (20200625). I've touched nothing near this part of my application recently. This...

tulip sleet
#

@slate scroll a "BLE HID receiver" has to be a central, because it's talking to a remote BLE HID peripheral. So I'm afraid you're out of luck at the moment, sorry!

#

@simple pulsar there may be a scanning timeout deep in the nrf SoftDevice. I'd have to look it up

#

@solar whale I was on but had not started discord. do you see the same problem in 5.3.1, before the sleep stuff was added?

#

@simple pulsar the scan timeout we pass to the SD is a uint16_t in 10ms units, so maybe it's overflowing

simple pulsar
#

I was getting 18000 ads at around 650 seconds when I specified 7200.0 with a little bit of variance on both time and count. I'm just trying it without a timeout

tulip sleet
#

yes, so 7200 seconds is 7200*100 10ms units, which will certainly not fit in 16 bits

#

we should validate the timeout size

#

the actual max would be 65535/100 seconds

simple pulsar
#

Ah, sounds about right, it's lasted 648.035, 648.112, 648.035 in my tests which is a bit under what one might expect. These are on-device values based on time.monotonic_ns() so perhaps they're not spot on but it's more than a few ppm.

tulip sleet
#

(7200*100) & 0xffff
64640

#

sounds close!

#

646.4 seconds is what 7200 will truncate to

#

it's just an accident that 7200*100 truncated to 16 bits is close to 65535

simple pulsar
#

Shall I log a ticket for this?

tulip sleet
#

I can do it quickly.

manic glacierBOT
manic glacierBOT
#

The ESP32-S2 includes a limited hardware security module which Espressif calls the Digital Signature Peripheral.

https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/api-reference/peripherals/ds.html

The Digital Signature (DS) module provides hardware acceleration of signing messages based on RSA.
It uses pre-encrypted parameters to calculate a signature. The parameters are encrypted using HMAC as a
key-derivation function. In turn, the HMAC uses eFuses as input key....

solar whale
#

@tulip sleet Thanks -- good idea -- I'l try 5.3.1 -- I was also just hoping to understand the sleep a bit better.. When does it sleep?

tulip sleet
#

it sleeps when it has nothing else to do. It checks for background tasks every msec or less. If there's an interrupt it wakes up before the msec is over. The SPI code is synchronous, so it should not be sleeping when trying to read.

#

if it were async, then there would be an interrupt to service reading the data, and it should not be delayed

solar whale
#

but is a "while" loop "nothing to do" so if I am polling in a while loop does it sleep?

tulip sleet
#

@slender iron @onyx hinge @ionic elk I have merged a few more minor PR's, and plan to do an alpha.3 release today. Anything left that you think should go in?

#

@solar whale what are you calling in the loop/

#

testing with 5.3.1 is the definitive test, though. I can discuss in theory but if there's a bug that would show the difference

#

if you are calling SPI.read_blah() it should not sleep

solar whale
#

ok -- yes -- calling .read_into()

#

I'll do the 5.3.1 test -- will take a few minutes to get setup

solar whale
#

@tulip sleet hmm -- same under 5.3.1 -- so why so slow?

tulip sleet
#

could you point to the code?

slender iron
#

@tulip sleet nothing from me. Thanks!

tulip sleet
#

@solar whale it uses BusDevice. Is it on its own SPI bus? If so there's no real reason to use SPIDevice to lock the bus, etc.

solar whale
#

It is same SPI bus any otehr device will use

tulip sleet
#

I don't see anything obvious going on but there is a lot of code between each read. you could comment out parts of it and see where it's spending it's time. You could toggle some pins to note where you are

#

why does this have its own read_into instead of using the regular one?

solar whale
#

I have no idea ... that was before my time....

#

maybe I should try reworking it to use the otehr one.

tulip sleet
#

but first maybe try to see where it's spending its time. Comment out things and see how long a single read takes with time differences, maybe

solar whale
#

OK -- I'll keep exploring = maybe try some other SPI devices as well-- thanks

manic glacierBOT
#
[adafruit/circuitpython] New branch created: revert\-3238\-bastwifi
tulip sleet
#

@onyx hinge ^^ could you approve instead? Scott is afk. tnx

onyx hinge
#

@tulip sleet taking a look

#

@tulip sleet you're confident that this is a real problem with the bastwifi PR and not a cache problem or temporary network problem? fatal: clone of '/home/runner/work/circuitpython/circuitpython/ports/espressif/asio.git' into submodule path '/home/runner/work/circuitpython/circuitpython/ports/esp32s2/esp-idf/components/asio/asio' failed

tulip sleet
#

I can re-run. I was suspicious because it was the only bad one. I'll let you know if it repeats.

onyx hinge
#

A good build said: -- Initialising new submodule components/asio/asio... Submodule 'components/asio/asio' (https://github.com/espressif/asio.git) registered for path 'components/asio/asio' Cloning into '/home/runner/work/circuitpython/circuitpython/ports/esp32s2/esp-idf/components/asio/asio'... Submodule path 'components/asio/asio': checked out '3b66e5b051381fb70de9c2791df70a06181c64e3'
A bad one said: -- Initialising new submodule components/asio/asio... warning: could not look up configuration 'remote.origin.url'. Assuming this repository is its own authoritative upstream. Submodule 'components/asio/asio' (/home/runner/work/circuitpython/circuitpython/ports/espressif/asio.git) registered for path 'components/asio/asio' fatal: repository '/home/runner/work/circuitpython/circuitpython/ports/espressif/asio.git' does not exist fatal: clone of '/home/runner/work/circuitpython/circuitpython/ports/espressif/asio.git' into submodule path '/home/runner/work/circuitpython/circuitpython/ports/esp32s2/esp-idf/components/asio/asio' failed

#

I'll approve so you can merge depending on the result of a re-run

tulip sleet
#

thanks!

manic glacierBOT
onyx hinge
#

@tulip sleet I'm on the trail of this rgbmatrix crash but I think it's not desirable to continue to hold the release for something that only got handed to me last night / this morning

tulip sleet
#

i expect another release as early as next week, so i think it's fine

old smelt
#

@gilded cradle - Darn. Looks like another PR on the horizon. The Markdown Preview in VSCode adds the newline. Grrr... Sorry!

gilded cradle
old smelt
#

Ok thanks!

ionic elk
#

@tulip sleet re: release, everything I had in the pipeline has been merged! Still hacking at DisplayIO and my SPI bug but those don't need to go in yet. So go for it.

slender iron
#

@tulip sleet the asio thing is a failure I've seen before

tulip sleet
#

the re-run is being successful. it was an unfortunate coincidence that particular board failed and led me astray :/

manic glacierBOT
slender iron
#

its the downside of git submodules

manic glacierBOT
manic glacierBOT
daring ridge
#

Greetings - I have question about renaming a board in the repo, is that ok to ask here?

lone axle
#

Yes, you can ask it here.

daring ridge
#

I have one board in the repo - bdmicro_vina_m0, with another being submitted soon. vina_m0 is getting some updates and for consistency, I'd love to rename it to bdmicro_vina_d21. Would I do that (on a branch of course), using the usual git-mv operations, and update any other references to vina_m0 to vina_d21? Then submit a pull-request? Or is there another way you'd want me to approach that?

#

And sorry if I missed an FAQ or similar on this. Thanks!

manic glacierBOT
#

ulab.linalg.norm function is in the documentation but not present on my version of circuitpython.

I'm using the following board:

Adafruit CircuitPython 5.3.1 on 2020-07-13; Adafruit Grand Central M4 Express with samd51p20

Thank you.

Adafruit CircuitPython 5.3.1 on 2020-07-13; Adafruit Grand Central M4 Express with samd51p20
>>> from ulab.linalg import norm
Traceback (most recent call last):
  File "", line 1, in 
ImportError: cannot import name norm
tulip sleet
#

@daring ridge yes, that's exactly what we'd expect, and you'd also want to update the circuitpython-org repo. Don't forget to look in all your board files to update the name as well.

slender iron
#

@idle owl how would you recommend I add test running to the github actions workflow? maybe a new yaml file?

#

only a few repos have tests

daring ridge
#

Excellent, thank you @tulip sleet. I don't yet have it on circuitpython-org repo. It's not quite ready for my web site, so I figured that could wait until then.