#circuitpython-dev

1 messages ยท Page 299 of 1

tulip sleet
#

@ionic elk in a working build the startup*.o file is here: ./ports/stm32/build-PYBV11/lib/stm32lib/CMSIS/STM32F4xx/Source/Templates/gcc/startup_stm32f405xx.o

#

I don't have a cpu.* of any kind in my build, source or object

ionic elk
#

So I guess my question is, how is Micropython requesting that file be compiled at all?

#

@tulip sleet it isn't in the source list - you mentioned some kind of default setting?

tulip sleet
#

i'm confused, where do you see SRC_S = supervisor/cpu.s

ionic elk
#

must have been an old thing I copied

tulip sleet
#

in micropython or circuitpython?

#

it's in circuitpython

ionic elk
#

in circuitpython. stack.c calls cpu_get_regs_and_sp

tulip sleet
#

i guess micropython took that out (if it ever had it)

ionic elk
#

I mean we still have it, I know stack.c is called and somehow it is not failing

#

Oh I see you just mean micropython. You have cpu.s in the nrf port

#

Let me back up - because I cannot figure out how Micropython is actually getting the startup_stm32f405xx.s file to produce an object file that it is using, I attempted to add it to Circuitpython's SRC_S, which currently only contains cpu.s in most ports and in mine also contains a local, duplicate copy of startup_stm32f405xx that I'd like to get rid of

#

As in, I can get boards/startup_stm32f405xx.s to compile and be successfully added to the build via SRC_S, but I cannot replace it with st_driver/CMSIS/Device/ST/STM32$(MCU_SERIES)xx/Source/Templates/gcc/startup_$(MCU_VARIANT).s for some reason

#

and I cannot figure out how Micropython avoids this issue and somehow just grabs a complete object from thin air

tulip sleet
#

could you push your current repo to your branch so I can take a look?

ionic elk
#

Sure it's about ready for that anyway.

tulip sleet
#

ok got it

#

@ionic elk you have MCU_VARIANT instead of MCU_VARIANT_LOWER, did you mean the latter

ionic elk
#

blink

#

blink

#

facepalm

tulip sleet
#

๐Ÿ™‚ 's ok ๐Ÿ™‚

ionic elk
#

thank you dan

tulip sleet
#

yw! we help each other

ionic elk
#

ugh now I'm getting the old __libc_init_array issue though

#

@tulip sleet the default ST files call bl __libc_init_array, which causes this error: in function "__libc_init_array": init.c:(.text.__libc_init_array+0x14): undefined reference to "_init". Clearly Micropython suppresses it somehow. This is C++ junk, right? I removed it in all my custom startup files but if I'm using the supplied ones I don't have that liberty.

#

I can make it go away by removing -nostdlib, is that ok?

tulip sleet
#

i'm not sure if it's ok, i'd see why the __libc_init_arry is showing up

slender iron
#

@tulip sleet how is ble bonding info restored?

#

@ionic elk you can't remove it because tinyusb has it in there?

orchid basinBOT
manic glacierBOT
tulip sleet
#

@slender iron stored bonding info is retrieved by calls to bonding_load_keys() and bonding_load_cccd_info() in common-hal Connection.c, lines 286 and 310.

slender iron
#

kk, I think packetbuffer needs to check to see if the hvx has already been subscribed to

tulip sleet
#

that should happen on BLE_GAP_EVT_CONN_SEC_UPDATE. The cccd settting is stored whenever a cccd is written (after a little delay to consolidate writes), so it should get restored on BLE_GAP_EVT_CONN_SEC_UPDATE. I don't think you should need to handle this specially.

#

i guess you mean you might not get notified about the change

slender iron
#

right

tulip sleet
#

since it's done by sd_ble_sys_attr_set().

#

maybe CharacteristicBuffer has the same problem

slender iron
#

I don't think so because CharacteristicBuffer grabs all reads and writes

#

PacketBuffer tries to limit it to one connection

tulip sleet
#

ah isee

orchid basinBOT
timber mango
#

PacketBuffer tries to limit it to one connection
@slender iron That sounds very similar to what we need for the RFM69 radio stuff.

ionic elk
#

@tulip sleet the system files that are exported/ship with stm32 cube come with the __libc_init_array by default. We could request that tinyUSB get rid of them in the st_drivers repo

manic glacierBOT
ionic elk
#

Anybody else on here a language learning nerd? I had an idea today for a language device using circuitpython.

manic glacierBOT
manic glacierBOT
lone axle
#

I've managed to make it through my first time building a CircuitPython uf2 file! blinka_cooking blinkacomputer

raven canopy
#

@lone axle yay!

lone axle
#

If I am trying to make a build with a modified library frozen into it. Do I need to do anything besides replacing my modifed version of the library repo inside the frozen directory in place of the original?

raven canopy
#

since it's an existing build with a frozen library, that should be all that's required.

lone axle
#

Where is the behavior that creates boot_out.txt defined? if I wanted to make a build that prints different information on the first line of that file how could I do that?

manic glacierBOT
solar whale
lone axle
#

Ah. Thank you Jerryn

vague monolith
#

Has anyone thought of a wrapper for displayio to make it easier to design UI. Something like tkinter or kivy or any modern UI framework. Was thinking users could specify button and pack with grid or absolute spacing. UI should handle the touchscreen setup and create a default button....

#

I donโ€™t have the skills or the time to implement this just a thought to inspire someone hopefully.

lone axle
#

There is a library for pyportal that is a sort of UI framework. It's nothing to the extent of the ones you mention but it's a start for applications with basic flow and buttons.

vague monolith
#

For use with pyportal type displays

#

@lone axle any idea what that library maybe?

lone axle
#
Adafruit Learning System

A framework to write your own forking-path adventure style stories for your PyPortal.

#

It is named for "making adventures" but really it is a UI layer like an older "HyperCard" system

vague monolith
#

Yeah the current state of UI design on pyportal is difficult for newer coffers

#

Coders

#

Also temp doesnโ€™t seem to work like other platforms like cpx

#

Weird things like that Iโ€™m sure come with time and everyoneโ€™s tireless work.

#

Just providing some insight from trying to learn with my kids

#

Thank you all for everything you do

lone axle
vague monolith
#

I wish to learn enough to contribute more someday

lone axle
#

That one is not really a framework but is a great resource for learning to make pyportal interfaces with the existing displayio tools.

vague monolith
#

Yeah that guide doesnโ€™t work on titano, Iโ€™m assuming due to some i2c address change on the temperature sensor. Also where this line of thought on a UI wrapper came from 700 lines of code vs something like a button class that already understands ts and just has an event callback. One day Iโ€™ll learn enough to help more

#

I thought I remember the cpx helper library having things like cpx.light cpx.temp etc.. I could be wrong itโ€™s been awhile

lone axle
#

@vague monolith I can try to help you get it working on the titano if you want. Lets move over to #help-with-circuitpython

tepid cliff
#

Hi, I've been trying to write a simple driver for an SPI Flash chip (W25Q64FV) so that I can use it as a storage device using the storage.VfsFat module. I have written a very basic SPI flash driver which seems to work ok (SPIFlash) and a block-device wrapper for this (SPIFlashFS) which again seems to work ok. I am able to format the device using storage.VfsFat.mkfs however if I try to create a storage.VfsFat instance all of the methods return OSError: [Errno 19] Unsupported operation . The strange thing is that if I create a simple RAMFS driver (copying the one in ./tests/extmod/vfs_fat_ramdisk.py ) this seems to work fine as a block device and I cant really work out what is different about this and my driver. I couldnt find much documentation on blockdevices so wonder if anyone has any ideas. The code is here (this is very rough at the moment I'm just trying to get things working): https://github.com/paulc/citcuitpython-spiflash

lone axle
#

This is theย Adafruit Feather M0 RFM69 Packet Radioย (868 or 915 MHz). Also called RadioFruits, Adafruitโ€™s take on an microcontroller with a RFM69HCW packet radio transceiver plus built in USB and battery charging. Its an Adafruit Feather M0 with a 900MHz radio module cooked in!...

#

Or does it need something different since it has a different frequency?

crimson ferry
#

There's a separate download for the 433MHz

solar whale
#

Yes. You just set the frequency when initializing the driver

#

There is? Where?

#

The CP build only has the pins defined. It does not know about the radio

crimson ferry
solar whale
#

No

#

That is a for LORA.

crimson ferry
#

oops, sorry, 96

lone axle
#

Incidentally I did manage to flash the bin file from this page (first time using BOSSA blinkacomputer) not sure if the radio is working, but I did get a a CIRCUITPY drive.

#

I did the same thing mixing them up at one point anecdata.

solar whale
#

The library configures the radio.

#

It will be very tight on memory. Use the . mpy lib and you may have to run any test as code.py to get it to load

#

Make sure you install an antenna before trying the radio.

lone axle
#

Ooh thank you. Probably would have tried it out and been wondering why ๐Ÿ˜ฉ

solar whale
#

@crimson ferry I wish they were not so similarly named!

lone axle
#

Is a length of wire soldered to the pin hole at the back labeled "Ant." sufficient?

solar whale
#

Yes. Thatโ€™ll be fine. The length is in the guide. Twice as long for 433 MHz as 915

#

16.5 cm

lone axle
#

Thank you

solar whale
#

Youโ€™re welcome Good luck with it!

lone axle
#

In this section of the BOSSA buide it states about using the offset with versions greather than 1.9. If I accidentally did it without the offset and thus it failed will I have erased something important on the device?

solar whale
#

I donโ€™t think so. The critical parts should be protected.

#

Should be able to just reload

lone axle
#

Okay, I seem to have ended up in a weird state. After it failed with the wrong offset I was able to run Write and Verify and both were successful

#

Same as I did on the first device. But on thise second one I pressed the reset button afterward and now it seems like it's bootlooping

#

LED 13 is blinking 3 times in a row on, then off a moment, one time on, then off... then repeat

#

If I double press reset I can see LED 13 start to "pulse" briefly like it's going to bootloader mode but then the blinking loop resumes

solar whale
#

Hmm. Not something Iโ€™ve seen. You may need to check with @tulip sleet

#

Do you have a JLink?

lone axle
#

I don't

#

Theoretically that could be used even if USB were some how broken?

solar whale
#

Yes - you can reload the bootloader. Even load a uf2 bootloader.

#

You have to tack wires onto pads on the bottom of the board.

#

But hopefully there is a simpler way!

lone axle
#

uf2 would be nice if it's posslbe.

solar whale
#

IIRC it just uses the feather_m0. (Not express) bootloader. Either bossa or UF2.

lone axle
#

I'll have to put it down for a bit for now. nothing I can do seems to change it from it's blinking and reconnecting

solar whale
#

๐Ÿ˜žgood luck!

lone axle
#

yep, thank you

solar whale
#

I was trying the same thing with an rfm9x M0 a few weeks ago and now that youโ€™re explaining what you are seeing, I may have done the same thing. I ended up putting the uf2 bootloader in it. I hope you can recover it more simply.

lone axle
#

I've looked into getting a jlink before but never had a specific reason for one.

#

Looks like digikey has got lots in stock if it does come to that.

slender iron
#

@tepid cliff I don't know of anyone that uses VFSFat except the SD card code. Maybe look their?

manic glacierBOT
#

BTW, CP is a bit more permissive on use of underscore in literals.

Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 5.0.0 on 2020-03-02; Adafruit Gemma M0 with samd21e18
>>>
>>> print(123__456)  # 3.6.6 does not like this
123456
>>> print(123_456_)  # 3.6.6 does not like this
123456

I don't know how close you want to stay to PEP-0515 but thought I'd mention it.

idle owl
#

@vague monolith Using our products and code, and giving us feedback is one of the most important ways to contribute. I understand what you mean though.

#

@lone axle Congrats on the build! The EDU Mini Jlink is affordable and would do everything you need - if you decide to get one. You may need an adapter cable to go with it - I don't recall if it comes with the cable or not.

timber mango
#

Yes. Thatโ€™ll be fine. The length is in the guide. Twice as long for 433 MHz as 915
@solar whale @lone axle Not quite, it should a little more than twice because 915/433 > 2. Get the exact length via the wavelength formula: L=c/f where c is the speed of light and f the frequency, then for the antenna length take 1/4th of that = 17.3 cm.

lone axle
ionic elk
#

@slender iron do you have any suggestions for a reliable 4.2 or larger e-paper screen, after the work you were doing on them? I was thinking I'd just grab one for use with https://www.adafruit.com/product/4224, wanted to see if you had any suggestions first though.

timber mango
#

I have two of the Feather M0 RFM69 boards. They are great for Arduino, but they can not do much using CircuitPython. I did manage to get just enough on them for a very small node though. There just is not enough RAM for much else.

#

I will be LURKING for the meeting because I am in the hospital.

idle owl
#

@timber mango I've added you to the notes as lurking. Hope you get well soon.

tulip sleet
#

@lone axle If you forget the offset it loads it at 0x000. This could overwrite the bootloader except that on most boards we have protected the bootloader from overwriting. If you double-click do you get a pulsing red led?

manic glacierBOT
lone axle
#

@tulip sleet upon double clicking reset I can see the #13 LED start pulsing for just a second and then it goes back to the blinking pattern without any further input / action on my part.

tulip sleet
#

@lone axle Can you upload Arduino Blink to the board (probaby not)? A J-Link is very useful so if you can get one, great. https://www.digikey.com/product-detail/en/segger-microcontroller-systems/8-08-91-J-LINK-EDU-MINI/899-1061-ND/7387472 is fine

idle owl
#

CircuitPython Weekly meeting in just over two hours. Everyone is encouraged to attend! Please add your hug reports and status updates to the notes document, even if you'll be attending the meeting - it's super helpful. Looking forward to talking to you soon. Thanks! <@&356864093652516868> https://docs.google.com/document/d/1YZYYrODJwUpKD4PWWzjpPhzBAvf5Mf196r4z7uo6dns/edit

tulip sleet
#

@lone axle also get this: https://www.digikey.com/products/en/development-boards-kits-programmers/accessories/783?k=adafruit 2743 (see https://www.adafruit.com/product/2743), and make sure you have all the appropriate cables (I think the Edu Mini comes with the right ones but double check)

lone axle
#

@tulip sleet thank you. I'll try out Arduino blink a bit later, though I think you are right probably won't work because from the PC side it keeps seeing the device reconnect over and over, never staying long enough to get a COM port # any more. Thank you as well for the info on J-Link and accessories!

tulip sleet
#

ah I bet that's because the "fuses" have been overwritten with all one's. If they are set to all 1's then the watchdog timer is enabled with a very short timeout, and the board keeps resetting

timber mango
#

@lone axle Cheers. Now I wonder, though, why Adafruit lists 16.5 cm when the optimal length is 17.3 cm. Perhaps 8 mm of internal connection length? Or simply a slight miscalculation.

tulip sleet
#

that is pretty simple to fix with a j-link

lone axle
#

Hooray, glad I didn't manage to break it more permanently. I will look into getting a J-Link ordered tonight so I can get it revived.

#

@timber mango internal connection length seems plausible to me. But I'm still brand new to the radio world I would have to defer to someone with more knowledge of radio generally, and/or the circuit on this device.

tulip sleet
#

physical length != electrical length

#

but it's also true it may have to do with board trace length too

onyx hinge
#

I've still got at least one memory bug in protomatter, after updating code.py a few times I get a MemoryError.

tidal kiln
solar whale
#

@timber mango there are severl "calculators" out there like this on e http://www.csgnetwork.com/antennagpcalc.html they all give the 16.5cm value in use -- they do assume there are also ground plane radials .... it's not a perfect world ๐Ÿ˜‰

lone axle
#

@tidal kiln had not seen this yet thank you! definitely will be coming in handy.

timber mango
#

@tulip sleet @solar whale Thanks. So apparently the calculation is made for a velocity factor of 16.5/17.3=0.95, or effective permittivity of 1.1, which according to the page mainly depends on the surrounding dielectric i.e. the insulation around the wire. I guess if one were to use bare wire, it would be 17.3 cm.

solar whale
timber mango
#

@solar whale Oh! That link from @onyx hinge says the velocity factor of bare copper wire itself is 0.95... Alright. (And insulation is another factor of 0.95, apparently.)

onyx hinge
#

and if you forget it, you accidentally come up with a finding that neutrinos travel slightly faster than light ๐Ÿ™‚

#

A link from a GPS receiver to the OPERA master clock was loose, which increased the delay through the fiber. The glitch's effect was to decrease the reported flight time of the neutrinos by 73 ns, making them seem faster than light.[21][22]

timber mango
#

Faster than light is possible for charged particles in a medium, which gives Cherenkov radiation ๐Ÿ™‚ https://en.wikipedia.org/wiki/Cherenkov_radiation

Cherenkov radiation (IPA: /tสƒษ›rษ›nหˆkษ”v/, Russian: ะงะตั€ะตะฝะบะพะฒ) is electromagnetic radiation emitted when a charged particle (such as an electron) passes through a dielectric medium at a speed greater than the phase velocity of light in that medium. The characteristic blue glow of ...

tulip sleet
#

@timber mango velocity factor also depends on wire diameter; I don't know if that's negligible in this case

timber mango
#

@tulip sleet Maybe that's the 0.95 for "bare copper wire" as per the link of @onyx hinge because normally it would be 1 for a (near) perfect conductor.

timber mango
#

I have a couple of 433 MHz rf modules, i think i must do an antenna length experiment now ๐Ÿ™‚ will report back, i think in 2 days.

thorny jay
#

Test

slender iron
#

@ionic elk That's the largest Adafruit carries. There is one 7" I have my eye on but I haven't tried it

ionic elk
#

@slender iron are you referring to the 4.2inch one in the link I posted? That doesn't actually seem to be stocked by adafruit, it's just there for the picture

#

If adafruit has a 4.2 inch epaper I'll get it but I don't see one

slender iron
#

ah, hrm

ionic elk
#

only has the hats

slender iron
#

I may have snagged one as a proto

#

you could remove it from the hat ๐Ÿ™‚

ionic elk
#

lol I mean I can always default back to Waveshare

#

Is that the 7" one you have your eye on ?

#

I just find their software to be ehh

slender iron
#

there is an old 7" and a new one

#

the old one has a very weird api

ionic elk
#

What's the new one? I could pick it up too and test

#

if it's waveshare than that's exactly what I'm talking about, they make weird software decisions

#

I want to make a new device that puts my Anki decks on epaper

slender iron
#

I think that's the new one. triple check the IC to make sure the red bits are a separate array from black and white

modern wing
#

Good afternoon all you wonderful folks -- happily lurking today ๐Ÿ™‚

#

@timber mango Your mic is on ๐Ÿ™‚

#

Yepper!

onyx hinge
#

woof, grabbing a glass of water before the meeting

turbid radish
#

The CircuitPython Newsletter will be out tomorrow morning, Sign up at https://www.adafruitdaily.com/ - no spam, leave anytime, the list is never sold, all that good Adafruit mojo.

timber mango
#

lurking

wraith tiger
#

Just lurking...

tiny oriole
#

Just lurking about today as i work on some work stuff

turbid radish
#

I'm lurking but available for interaction as needed

errant grail
#

Very quiet in the studio today so I'm un-lurking for a change!

sterile bronze
#

lurking

half sedge
#

lurking

onyx hinge
idle owl
slender iron
#

jeff has been

modern wing
#

Thanks Jeff! ๐Ÿ‘

onyx hinge
#

swoon

slender iron
#

looks like minecraft

onyx hinge
serene warren
#

Lurking. Sorry late.

slender iron
#

๐ŸŽ‰

tiny oriole
onyx hinge
#

Just curious, since I was reviewing in there, is Adafruit_Python_PureIO something that would show up in the stats?

slender iron
#

@onyx hinge we should probably include that in the blinka stats

#

I don't think we're comprehensive with that though

turbid radish
#

Awww, thanks

modern wing
#

That really was a nice Show & Tell from JP

serene warren
#

I'm super sad I missed that miniSAT.

slender iron
#

yay!

onyx hinge
#

@slender iron if you can dive into the docs and get those names in correctly that'd be excellent. (about the 3H)

slender iron
#

yup yup

lapis hemlock
#

You have to read

raven canopy
#

is Adafruit_Python_PureIO something that would show up in the stats

@onyx hinge it is not included, and neither is Adafruit_Python_PlatformDetect. We could include them; just would need a little more flow-control possibly. feel free to put up an issue. ๐Ÿ˜„

slender iron
lapis hemlock
#

@onyx hinge Thanks!

slender iron
#

nice job!

modern wing
#

I know I'm quietly lurking, but for what I'm doing outside of Circuit Python -- aside from working, I've just picked up a first-gen Surface Book. Been a mac user for ages, and I needed a bare-metal Windows machine for some accessories I want to use for streaming.

gilded cradle
#

I forgot to mention what I was doing outside of CircuitPython stuff. I finished building a Prusa Bear 3D Printer.

modern wing
#

Smarter than the average printer ๐Ÿ™‚ /yogi

gilded cradle
#

๐Ÿ™‚

serene warren
#

Very Nice @gilded cradle , I watched Chris's Basement build his.

gilded cradle
#

Thanks. Mine's taller than the typical Prusa Bear

onyx hinge
#

my 3d printer is too small to print the face shield headbands, I'm bummed about that.

manic glacierBOT
#

I ran into this indirectly while trying to use an MCP9600 because the MCP9600 library will fail with a cryptic "Input/Output Error" when you use board.I2C or otherwise use the default frequency.

It would be helpful for the library to be able to read the frequency in __init__ and raise an exception if it isn't within an acceptable range (datasheet says 100K, examples use 200K apparently).

@cogliano your input would be appreciated

gilded cradle
#

I'm having mild symptoms, so I don't want to make the problem worse by printing PPE.

onyx hinge
#

Print something fun instead

gilded cradle
#

๐Ÿ™‚

tiny oriole
#

Thermal Cameras are fun ๐Ÿ˜›

gilded cradle
#

I have the stuff to make a thermal camera on hand

modern wing
#

Good luck getting out of debt ๐Ÿ˜‰

lone axle
#

๐Ÿ•

wraith tiger
#

I've been playing a lot of Minecraft - the pre-1.16 snapshots.

slender iron
#

haha, exactly

turbid radish
#

I did wire wrap too back in college & at JPL

raven canopy
#

at JPL...instant jealousy-mode invoked. ๐Ÿ˜„

turbid radish
#

Intern there for a year

#

I have started cooking but I. Will. Not. Bake. Bread.

errant grail
ionic elk
#

I'm learning how to make bread this week lol

turbid radish
#

I made biscuits, sausage & gravy last night, Pillsbury biscuts

errant grail
#

Yum!

ionic elk
#

I need to get back into making scones

#

Good quarantine food

raven canopy
#

yeah, Pillsbury is about the closest i get to making bread. ๐Ÿ˜‰

slender iron
#

@inland tusk do you have a link to the keybed?

modern wing
#

There are some fun dessert breads that aren't anything more than "mix a handful of things together, toss into a pan and into the oven for X minutes". I really don't enjoy the process of kneading and proving bread.

wraith tiger
#

I had a bread machine years ago. It was fun. I baked a few bricks while experimenting with modified recipes.

errant grail
#

Blueberry Buckle is classified as a "bread" in my cookbook but it's just a handful of this and mouthful of that...

onyx hinge
#

๐Ÿคค

tidal kiln
#

@tulip sleet i've had some linux lock ups also, total system freeze, requires reboot. been happening for a while. maybe related, but can could at least maybe double check what you're seeing.

turbid radish
#

My browser windows have all crashed, I need to reboot, I plan to be back

raven canopy
#

DHT. they always bring joy...

tulip sleet
#

@tidal kiln I'm running the Ubuntu 20.04 beta, but I was seeing hangs in 18.04. This manifests as a complete Linux hard crash if I do import storage; storage.erase_filesystem() on a SAMD21 board (might also be SAMD51 or more).

#

if you could try that it would be great, not on your machine right now ๐Ÿ™‚

#

i have a Dell Optiplex 7010 with Intel motherboard USB hubs, I think

tidal kiln
#

@tulip sleet yah. i'll try at some point and report back. i'm 18.04.

tulip sleet
#

I can't reproduce on a 20.04 Dell E5250 laptop

onyx hinge
raven canopy
#

@tulip sleet i've got 18.04 on a Dell Inspiron laptop, and 19.10 on an RPi3B+, if you want more testers.

tiny oriole
#

woooooo

inland tusk
slender iron
#

neat!

modern wing
#

That's a nice thing, always good to unplug.

wraith tiger
#

I converted my Chromebook to run GalliumOS, which is based on Xubuntu.

tulip sleet
#

@raven canopy I doubt it would crash on the RPi, and the laptop is probably ok too, but you could try. It doesn't always happen, but on the 7010 it happens most of the time.

raven canopy
#

any syslog hints?

onyx hinge
tulip sleet
#

it doesn't show up in syslog because it's crashing immediately, but the dmesg output from the crash is in the bug report in the second comment

modern wing
#

"A number has been divided by zero 13 times today."

serene warren
#

Umpteen Dozen

onyx hinge
inland tusk
#

You guys know how to make somebody hungry๐Ÿ˜„

crimson ferry
#

Pynt has its own UF2, but no board in the ports? What triggers the unique UF2 creation?

half sedge
#

display size?

crimson ferry
#

Pynt is 320x240, same as Original PyPortal

tulip sleet
#

some boards use the same UF2 as another, it's just a copy with a different name

crimson ferry
#

real question is... is it possible for a Pynt to know it's a Pynt, programmatically in user code?

tulip sleet
#

no

crimson ferry
#

ah, thanks Dan

#

So maybe we need a .../ports/board/... for Pynt... only difference would be board os.uname().machine

#

(Titano does have a unique machine name relative to Original)

tidal kiln
#

@crimson ferry could check for existence of ADT7410, maybe?

lone axle
#

Sorry if that keyboard clacking was loud =x

#

Is there a way to "check for" an I2C device other than initializing it and catching the exception? Like just see if an address is connected without initializing it?

crimson ferry
#

Can scan I2C to see if the address exists

#

but it could be a doppleganger, possibly

#

probably a way to do register-level checking...?

slender iron
#

thanks @turbid radish !

solar whale
#

Sorry -- I have to go -- have a great week all ๐Ÿ‘‹

inland tusk
#

@solar whale have a good week

serene warren
#

Great meetup folks. Be safe and well.

raven canopy
#

Thanks everyone! Have a great week!

gilded cradle
#

Thanks everyone

errant grail
#

Thanks!

onyx hinge
#

see you later everyone!

lapis hemlock
#

๐Ÿ‘‹

turbid radish
crimson ferry
half sedge
#

there is a matrix keyboard library

#

I used that for a C64 keyboard that is 8*8

#

Yes, there is one.

#

You give the sending lines, and receiving lines.

#

You cannot avoid the input pin, but there is a way to reduce the output pin number.

#

Something related to shift register.

#

See you.

lone axle
#

Thank you @crimson ferry

tidal kiln
#

@tulip sleet i got lock up to happen with Trinket M0 and Itsy M4, both running 5.1.0, doing storage.erase_filesystem(). i don't have kdump installed, but could if that would provide useful info.

tulip sleet
#

so just lockup, not crash; you are not running the new bootloader, so it's not the bootloader, so I don't need to hold that up

tidal kiln
#

total freeze. have to hold power button in to recover.

tulip sleet
#

I am going to talk to Thach about doing a cleaner USB shutdown on storage.erase_filesystem()

#

I have that too

tidal kiln
#

i think i've had this happen with arduino also - when it resets after upload

tulip sleet
#

this actual crash is something new.

#

Yes, I think see that sometimes too, but rarer

#

i think it's the MSC drive disappearing abruptly or something

#

but I thought it had to do with the new drive appearing, so maybe not sure about that

tidal kiln
#

oh - two different things happening? crash and freeze.

tulip sleet
#

possible; what's the model number of the machine this happened on?

#

i will look up which usb controller it uses

tidal kiln
#

some dumpster dive HP....not really sure...let me look...

idle owl
#

Dumpster Dive HP โ„ข๏ธ

tulip sleet
#

going for a (safe) walk with my wife; will be afk for a while, but thanks!

tidal kiln
#

HP Compaq 8200 Elite

#

"built for Win7" !!

raven canopy
#

@tulip sleet no hang/lock for me on the laptop w/18.04.

manic glacierBOT
#

As far as the backlight, it can delegate to the underlying framebuffer (a protocol function that is permitted to be NULL), or it can use a pin as now as a fallback. protomatter uses 0 to mean pause, nonzero to mean not paused; it doesn't scale RGB values to emulate intermediate brightness levels. I have a feeling that adding a fixed off time might give better results, so if that's important we should talk to @PaintYourDragon about it.

If we thought at least 2 framebuffers would do ...

wraith tiger
#

Hmmm... I should have looked more closely at the 3.5" TFT FeatherWing before I started soldering.

#

I didn't reqlize the connectors were backward so you can stick a feather on the back of it.

#

I wanted to use the feather quadrupler but the screen will have to go on the back.

#

I'll figure something out.

gilded cradle
#

Quadrupler might work if you soldered some male pins on the underside of it.

wraith tiger
#

Yeah, that's what I'm thinking. I had already soldered femail headers to the front. I was going to just use some unsoldered male headers between the two femail headers.

#

For now I've just got my M4 express stuck to the back of it. I think I'll try the displayIO learn guides before moving on.

#

I'll probably try learning KiCAD and designing my own board in the end if my concept works out.

#

I had the idea of using two of the TFT displays, one in lanscape orientation and one in portrait. That would reaquire a custom board anyway.

lone axle
#

Is it possible to have one Circuit Python device "talk" to another one via SPI?

manic glacierBOT
slender iron
#

@lone axle no because we don't have SPI slave support. UART would work though

#

and sphinx 3.0.0 is out and broke my build

manic glacierBOT
simple pulsar
lime trellis
#

Any writeups for debugging CP development? I'm happy to debug over JTAG, but don't know how folks are "easily" integrating it into the build process

tulip sleet
#

Scott and I don't use Atmel Studio at all; we just use gdb via the J-Link.

#

Good places to set breakpoints are reset_into_safe_mode() and HardFault_Handler()

lime trellis
#

@tulip sleet thank you ๐Ÿ™‚ I had read through those but I'm attempting to debug a setup that may not even properly be flashing the firmware onto the external flash.

#

Is there a way to print out any errors the bootloader encounters when attempting to flash CP?

simple pulsar
#
#

@lime trellis Oh, from last comment, it seems you are in it a bit deeper, in many ways

lime trellis
#

@simple pulsar thank you I agree big-boy python can be helpful! But yeah I don't yet have the python interpreter up and going yet haha ๐Ÿ™‚

tulip sleet
#

so this is for a processor without internal flash? I'd have the bootloader verify each write and complain by blinking if it failed

#

sorry have to be afk now

lime trellis
#

I'll dive into the bootloader. Thank you @tulip sleet!

slender iron
#

@lime trellis what do you mean flash external flash?

#

(the same gdb process works with the bootloader source too if you aren't getting out of it)

lime trellis
#

@slender iron writing the firmware.uf2 to flash

slender iron
#

on a samd51 that is still internal flash (imx rt is actually a separate flash chip and is why we're being pedantic)

#

can you flash CP with a jlink ok?

lime trellis
#

@slender iron I'm trying to use a very abnormal external flash (devices.h). For example I've modified external_flash.c and spi_flash.c quite heavily during my experiments.

slender iron
#

that shouldn't impact the bootloader

lime trellis
#

How I understand it is the bootloader caches the UF2 on internal, then loads it onto the external device.

#

I believe it's failing to communicate properly on the "load it onto the external device" step

#

So I'd try and use the bootloader as my debugging outlet, right?

manic glacierBOT
#

I'm feeding a Grand Central M4 500 Hz on D6 and it's returning 0 for the value.

Adafruit CircuitPython 5.1.0 on 2020-04-06; Adafruit Grand Central M4 Express with samd51p20
>>>

Test code.py:

import frequencyio
import time
import board

frequency = frequencyio.FrequencyIn(board.D6)
while True:
    print(frequency.value)
    time.sleep(1)

I have a metro m4 generating the 500Hz signal and verified it is working with a Saleae.

slender iron
#

@lime trellis the UF2 bootloader knows nothing about the external flash on SAMD51

#

as the blocks of a UF2 are written to the bootloader's fake filesystem they are written to internal flash at the location the block has as metadata

lime trellis
slender iron
#

not sure, I haven't used them

#

what are you trying to do and what is happening?

lime trellis
#

I'm trying to use a very abnormal external flash. micro is a SAMD51.
I have the whole setup working with standard NOR flash.
I then take the NOR flash chip off and put a NVRAM chip on. It uses most of the standard flash SPI commands and whatnot. So I then build CP for this new setup (with lots of mods to external_flash and spi_flash).

Putting the board into bootloader mode and dragging the new UF2 = nada after the file transfer.

slender iron
#

ok, my next step would be to use a jlink to load CP and break on main

#

that will rule out the bootloader (which I suspect isn't the problem)

#

then I'd break on reset_into_safe_mode because you might be crashing

lime trellis
onyx hinge
#

@slender iron thanks for the in-response-to-review changes! Ping me if I don't report taking another look at stm32.

slender iron
#

@lime trellis correct

#

@onyx hinge np. looking at imx now

#

this stuff is tough because the registers don't always reset

lime trellis
#

@slender iron thanks again for the help! I found I'm crashing somewhere in spi_flash_flush_keep_cache. The hunt is still on ๐Ÿ”Ž but your guidance made all the difference

raven canopy
#

@slender iron the 500Hz returns 0 isn't surprising. It doesn't handle sub 1KHz, which is documented.

#

trying to remember precisely why...

raven canopy
#

I vaguely remember it being related to the timer overflow. it can only rely on catching a single OVF flag...

floral nacelle
#

I want the wait_for to expect to always be triggered besides when the message is deleted

#

Any clue on how it is done?

ivory yew
#

Hey @floral nacelle, since that's regular Python and not circuitpython and more focused on a specific library (discord) there might not be anyone here that can help. You might have better luck on the Python discord.

crimson ferry
#

or Discord Testers discord, #bot-help channel nm, that's for something else

slender iron
#

@raven canopy ok. I can try faster. would 5k be ok?

raven canopy
#

should be. my test PWMOut started at 2M and doubled every few seconds.

#

iirc. looking

#

yep. started at 2M, doubled every 5 seconds.

slender iron
#

kk

tulip sleet
#

@slender iron @idle owl I'm confused; most libraries now install black as a pre-req in build.yml, but I don't see that they use it to re-format or to check.

idle owl
#

Yeah... Sommersoft caught that. We missed adding it.

#

It's not hidden. It's not there.

#

We need to patch the libs.

slender iron
#

it is in cookiecutter

#

though it'd be better to do before pylint

tulip sleet
#

@slender iron @idle owl. I'll fix it manually in a PR I'm doing now (scott noticed it initially)

idle owl
#

@tulip sleet Ok, we'll be running a patch soon on everything as well.

slender iron
#

thanks!

idle owl
#

@slender iron Tagged you on a cookiecutter PR to move black before pylint.

slender iron
#

@idle owl awesome! looking now

idle owl
#

@slender iron Dan approved it, I merged it. ๐Ÿ˜„

slender iron
#

๐Ÿ™‚ I'm ok being too slow

#

thanks!

idle owl
#

yep

manic glacierBOT
ionic elk
#

@slender iron at some point, on the topic of power, we might want to talk about the ST Hal's GPIO_SPEED_FREQ_ parameter which adjusts pin slew rates. I believe lowering it is a power saving measure, but I'm not sure what kind of interface is appropriate for it. I don't see a direct analog in the other ports.

slender iron
#

that's probably pretty far down the list I think because it only applies when the pin is actually in use

#

there is plenty of room to optimize when things are off

ionic elk
#

Looks like the other primary use for it is to prevent ringing EMI, but I guess that's not that relevant either, at least not until we have more audio stuff

slender iron
#

ah ya

#

I think there might be some discussion of adding drive strength to DigitalInOut

ionic elk
#

That would be where this would apply then yeah

idle owl
#

Anyone have an answer to how Tkinter is pronounced? I have listened to multiple videos and they all pronounced it differently.

ionic elk
#

@slender iron other quick style question. For my line differentiation blocks like

#elif (CPY_STM32F4)
#include "stm32f4xx_ll_gpio.h"
#else
#error unsupported processor
#endif

Should I always end with that unsupported processor catch? It'd only come up if we added a new line like the L4 and didn't grep every instance properly.

slender iron
#

@ionic elk I don't think it's needed. I presume something further down will fail without the include

raven canopy
#

@idle owl i've always said tee-kinter internally. ๐Ÿคท

idle owl
#

@raven canopy I'll take it. Thanks.

prime flower
golden bear
#

Hey everyone, I don't know if this is the place to put it, but here's my code for the handwashing timer on the circuit playground bluefruit. It uses taps instead of motion detection, however, so just wanted to point that out. I'm posting this because the tutorial of the handwash timer left out a circuitpython example on bluefruit. But Here you go:

"""
Start a 20 second hand washing timer via proximity sensor.
Countdown the seconds with text and beeps.
Display a bitmaps for waiting and washing modes.
"""
 
import time
import board
import pulseio
from adafruit_circuitplayground import cp
 
cp.pixels.brightness = 0.2
cp.detect_taps = 1
RED = (255, 0, 0)
YELLOW = (255, 150, 0)
GREEN = (0, 255, 0)
CYAN = (0, 255, 255)
BLUE = (0, 0, 255)
PURPLE = (180, 0, 255)
WHITE = (255, 255, 255)
OFF = (0, 0, 0)

def color_chase(color, wait):
    for i in range(10):
        cp.pixels[i] = color
        time.sleep(wait)
        cp.pixels.show()
    time.sleep(0.5)

while True:    
    if cp.tapped:
        color_chase(RED, 0.5)  # Increase the number to slow down the color chase
        color_chase(BLUE, 0.5)
        color_chase(PURPLE, 0.5)
        color_chase(OFF, 0.5)
#

(Ping me if this isn't the place, and I'll move the message to wherever)

tulip sleet
#

@stuck elbow et al: I'm adding bootloader download info to circuitpython.org. If you haven't done a PR to one of the bootloader repos for your board, but are instead using one of the bootloaders for another existing board, could you let me know which one, and I'll add it to the data file I'm making.

stuck elbow
#

@tulip sleet PewPew M4 is added to the Microsoft's repo, he ยตGame and PewPew Standalone both use the Trinket M0 bootloader

tulip sleet
#

@stuck elbow pewpew10 and pewpew13 are both trinket?

#

I'll be merging from microsoft repo pretty soon, so I'll pick that up.

#

tnx

slender iron
#

@indigo wedge where is the feather_m7_1011 schematic? I'm trying to test neopixel with my lower power changes and not having any luck

#

tried it on A5 and D5. the onboard neopixel doesn't light either

indigo wedge
#

it's a private repo that I shared with Limor, I'll add you, not sure if it should be public now or not, we never discussed it ๐Ÿ˜„

slender iron
#

kk

#

thanks!

#

got it. gonna test now with master to see if it's related to my changes

indigo wedge
#

the neopixel on my feather works just fine with my latest fix, but I am using the 2020 version, unsure if it matters

slender iron
#

I'm trying an external neopixel too and not getting anything

#

using neopixel_write

#

maybe I need to set the pin mode

indigo wedge
#

never tried with an external one tbh ๐Ÿ˜„

slender iron
#

it looks like it should work ๐Ÿ™‚

#

internal one is just dim green

#

nope, not working on master for me either

#

ok, external one works once I switch the digitalinout to out

raven canopy
#

PSA: adabot patch imminent. apologies for any inadvertent open PR conflicts caused. adabot

ionic elk
#

@slender iron will your microtrace buffer help find the location of return statements?

#

I'm having trouble determining where the heck a HAL_ERROR is coming from in the ST_HAL, since they tend to just return that value on failures without actually saving any information about the error, and I can't break on returns.

#

I have an especially wacky case right now where a function is returning an error, but assembly breakpoints inserted before every one of it's return statements never trigger?

slender iron
#

@ionic elk interesting! can you push the code somewhere?

ionic elk
#

but, if I add I2C_WaitOnSTOPFlagUntilTimeout as a breakpoint, it never triggers!

#

what the hecking heck

#

Oh I see, it's an optimizer issue ๐Ÿค”

lime trellis
#

I was able to get my crazy contraption to boot! yay! ๐ŸŽ‰
@slender iron is it feasible (with hacking) to use an SPI flash device on the QSPI interface? I've made serious progress, but I'm not sure if there's a light at the end of the tunnel

lime trellis
#

FULLY FUNCTIONAL! woot woot! ๐ŸŽ‰๐ŸŽˆ
I'll tidy the code up and make a PR in case folks want to use standard SPI devices on the QSPI for flash memory.

Now that I think about it... this would allow an SD card attached to the QSPI bus to work as mountable CP storage as well.

slender iron
#

nice work @lime trellis ! sorry I was in the imx sleep weeds

lime trellis
#

no worries. thanks for the support!

tidal kiln
#

i just did a build with latest head for CLUE and displayio seems to not work, can connect to REPL, but nothing on TFT

slender iron
#

@tidal kiln does 5.1.0 work ok?

tidal kiln
#

yep

slender iron
#

hrm

#

looks at commits since then

tidal kiln
#

i checked out 5.1.0 and built and pushed that firmware, just to make sure my build setup still works

#

that worked

slender iron
#

is the backlight on?

tidal kiln
#

appears to be

#

yah, it is

slender iron
#

hrm

#

ยฏ_(ใƒ„)_/ยฏ

#

please file an issue

tidal kiln
#

sorry. wait. no.

#

i was in bootloader

slender iron
#

my brain is mush

tidal kiln
#

b043384 works

#

54e8c63 does not work

manic glacierBOT
tidal kiln
#

@slender iron ^^ issue filed

simple pulsar
#

I've been using 5.1.0 on a CLUE btw and I've not had any problems.

manic glacierBOT
onyx hinge
#

@traversaro (and everyone else affected) - We've engaged the mirror hosts and they have added capacity to improve it's reliability. I'll keep this open until we can confirm the issue is resolved. Please let us know if this continues to occur. Thank you for the reports.
Maybe the Actions / azure / apt install error will be gone.. if not, I guess we can comment on https://github.com/actions/virtual-environments/issues/675 again

main meteor
#

I never expected to see "azure" and "Ubuntu" in the same sentence, wow.

manic glacierBOT
#

@caternuson Can you elaborate on "from within bitmap" ?

I have been doing board.DISPLAY.auto_refresh = False to turn it off. I hadn't worked out a satisfactory way to do a one-off refresh or to inhibit auto for a specific task but you can see an attempt at a manual refresh in refresh_screen(). Setting target_frames_per_second to a high value would probably make it a touch quicker, it has a complex spec. I put in #2696 to get a cleaner way of doing this.

manic glacierBOT
#

Whether FAT12, FAT16, or FAT32 is used depends on the size of the filesystem. A FAT12 filesystem is defined to be < 4087 clusters, a FAT16 filesystem is 4087 to 65526 clusters, and FAT32 is a range above that. The typical 2MB filesystem we supply can therefore only be FAT12, by definition.

One issue has been that FAT12 is not well supported, as you see. On Windows, there's a bug (which is supposedly being fixed) that delays writing to a FAT12 filesystem for tens of seconds. See #111.

I'...

manic glacierBOT
#

Sure. Sorry for being vague. I was thinking from within the C code in the firmware. For this fill feature, I've got a loop in Bitmap.c to do the fill. Now want to do the equivalent of board.DISPLAY.auto_refresh = False before the loop. And then re-enable after. As @tannewt mentioned above:

A C implemented fill will still be faster since it can both prevent the intermediate refresh and quickly fill the underlying buffer.

So - how to do the first part? Not seeing how one can access th...

timber mango
#

I never expected to see "azure" and "Ubuntu" in the same sentence, wow.
@main meteor That does look odd...

ionic elk
#

@tulip sleet do we have strict standards on excluding gotos?

#

I need to rework the nested loops in Busio because the H7 layers new peripherals like I2C4 on top of the existing low number ones, which would needlessly require a whole new bus if used.

#

I can do it by stuffing them into a function that returns, or by using a Goto

tulip sleet
#

no, but there should be a good reason, like using it in a structured way to jump to a common error return point or something. are you trying to do a multi-level break or something like that?

ionic elk
#

Multi level break yeah

#

I need to force a nested loop to pick the first item that matches, rather than the last

tulip sleet
#

if it's straightforward, do it; if there's a clearer way we can suggest it in the review

ionic elk
#

so it doesn't use these wasteful high-number peripherals by default (I2C4, SPI6)

#

I think the only other way to do it is to refactor the whole nested loop into a function and have it return, which is fine structurally but I feel it reduces readability.

tulip sleet
#

the language doesn't provide labeled breaks or similar, so it makes sense

simple pulsar
#

You can also make the goto labels very descriptive to cover why they are being used and what for.

idle owl
#

@slender iron Do I remember there being some way to initialise all the repos inside the bundle? As in, a way to make all the folders inside of it actually have all the git repo files for all the libs.

slender iron
#

@idle owl should be git submodule update --init .

idle owl
#

Ok thanks

slender iron
#

@tulip sleet @ionic elk I have a strict no goto policy. just use a boolean in the loop checks to escape

timber mango
#

@tulip sleet @ionic elk I have a strict no goto policy. just use a boolean in the loop checks to escape
@slender iron So do I. There are quite a few ways one can avoid using the "goto." I like to use while loops.

ionic elk
#

yeah but to be fair for UART it's going to be like 20 lines of code vs like, 4.

slender iron
#

doesn't matter if the 20 lines are clearer

ionic elk
#

but is it really so bad for a multi line break? That's the single case where I've seen people say gotos are acceptable, because it's so easy to see what they do compared to the workarounds.

#

... but I'll pipe down and avoid the holy war ๐Ÿ˜‹

tulip sleet
#

Java has break labels, C does not, so I agree that it's a solution here. But I'm not setting the policy. But it's also worth considering if it's possible to restructure the whole nested thing to be clearer.

ionic elk
#

I've thought a bit about these loops, but it's pretty straightforward what's happening. This is the part where it iterates through combinations of pins and sees if they're valid - I don't think there's any other decent way to do that then a simple nested loop.

#

I've seen some pretty bad goto spaghetti in /extmod, I'm not looking to emulate that. I just feel like goto multibreak; //breaks out of nested loop .... multibreak: isn't such horrible syntax compared to packing it in a function or having a bunch of boolean checks.

timber mango
#

It is not a bunch of boolean checks though. In a while loop you have one check at the top and possibly one check inside the loop if you want to exit.

slender iron
#

goto is an extra control flow concept that is known to be confusing. Yes, we inherited some from MicroPython. No, I don't think we should add more.

timber mango
#

@slender iron I agree! ๐Ÿ™‚

orchid basinBOT
#

Add a section on each board download page with links and information about updating the bootloader. There is a corresponding new data file, _data/bootloaders.json. Right now it needs to be updated manually, but should eventually be automated.

The section appears only for atmel-samd and nrf boards right now, but not for STM and other famiies for which there's a built-in bootloader or we don't have a good story yet.

Some third-party boards have not PR'd changes to the https://github...

manic glacierBOT
orchid basinBOT
#

This looks great, however I'm concerned with removing the Gemfile.lock is that it may not compile on Github Pages after that. I was able to generate the pages, but I believe it locks things to certain versions.

If I delete the Gemfile.lock file, it is re-created each time I ran bundle exec jekyll serve to check the build locally. So I thought this was just a lock file created by the local test webserver to prevent multiple webservers from running simultaneously, or something like tha...

manic glacierBOT
#

Turns out it was something I missed in #2733. It appeared an issue between b043384 and 54e8c63 because b04 was based on the state of master before #2733 was merged. The commit list is deceiving because git history isn't linear. The changes between b04 and master are only in master with the merge commit 54e.

A way to get around this is to only test merge commits when finding the bad commit.

Fix is in PR #2753

orchid basinBOT
tulip sleet
idle owl
#

@tulip sleet Melissa got it.

tulip sleet
#

thanks

manic glacierBOT
#

These additions/changes allow single-SPI (as opposed to dual or quad SPI) storage devices to act as external flash memory on the QSPI bus. Also adds a pycubed_mram board.

  • My specific use-case was for NVMRAM (Everspin MR25H40), but this should also enable things like an SD card to serve as external flash storage (and natively mount as a mass storage device).
  • These changes preserve original NOR flash functionality, but enable devices that don't have JEDEC responses or specific page/sec...
manic glacierBOT
#

Hi Guys,
I finally managed to get a 16MB (largest possible for SAMD51) flash device working on a Feather M4 Express-based board. I used this:

`#define GD25Q127C {
.total_size = (1 << 24), /* 16 MiB /
.start_up_time_us = 5000,
.manufacturer_id = 0xc8,
.memory_type = 0x40,
.capacity = 0x18,
.max_clock_speed_mhz = 104, /
if we need 120 then we can turn on high performance mode */
.quad_enable_bit_mask = 0x02,
.has_sector_protection = f...

simple pulsar
#

@slender iron I'd say you have to take goto on a case by case basis. Based on practical experience in C, I've noted it creates phenomenal complexity if you jump back up a few hundred lines. The flip side is you can use it to jump to some housekeeping/logging then return in a short function and it's verging on elegant.

manic glacierBOT
#

Ok, @tannewt @dhalbert @jepler this is ready for another full review. Changes include:

  • Addition of the F767 Nucleo and general F7 support
  • An overhaul of the linker and startup file system to support TCM and reduce clutter. Optional startup code for TCM is in port.c, like the i.mx, but most boards still use the weakly declared startup versions.
  • Busio is now enabled for the F7 and H7, with some edits to support new peripheral scope.
  • Various requested style changes implemented...
manic glacierBOT
#

I started pulling on this thread a little, and came across this commit: https://github.com/sphinx-doc/sphinx/commit/23604730128e9b802b1e7344839d58a30384695d.

Seems like a direct cause of our Sphinx 3 issues. A little heavy-handed imo, and I'm surprised that there isn't a new issue opened up about it blocking other projects. However, I'm not sure if there was a better way for them to avoid this, even when a specific parser is supplied.

I'll spend some time looking through our docs to det...

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

This is functional at least. I basically just stole from the pixel set code and loopified it.

Test program:

import time
import board
import displayio

WIDTH = board.DISPLAY.width
HEIGHT = board.DISPLAY.height

COLORS = (0xFF0000, 0x00FF00, 0x0000FF)

bitmap = displayio.Bitmap(WIDTH, HEIGHT, len(COLORS))

palette = displayio.Palette(len(COLORS))
for i, color in enumerate(COLORS):
    palette[i] = color

tile_grid = displayio.TileGrid(bitmap, pixel_shader=palet...
lone sandalBOT
manic glacierBOT
idle owl
#

@pastel panther It looks like LSM303 is still in the bundle, but the repo was archived in October. Is that intentional or did it slip?

pastel panther
#

@idle owl probably a slip but I'll double check

idle owl
#

Thanks!

pastel panther
#

yup, it's a mistake. I can put in a PR later today

idle owl
#

Thank you.

manic glacierBOT
slender iron
#

any objections to me releasing master as 5.1.1? the destabilizing stuff hasn't landed yet

idle owl
#

Beta?

manic glacierBOT
ionic elk
#

@slender iron nothing from me, everything STM-wise is pretty stable up to the F7 H7 stuff

slender iron
#

@idle owl no beta yet

idle owl
#

@slender iron Then I'm confused as to what you're asking to release.

slender iron
#

master has some fixes in it including one we need for ble midi

idle owl
#

So you want to release a new stable?

slender iron
#

yes

idle owl
#

Fair enough.

#

ยฏ_(ใƒ„)_/ยฏ

#

Do it today if you're going to do it.

#

So we at least have tomorrow to field issues.

slender iron
#

ya, will do it later after I solder stuff

manic glacierBOT
idle owl
#

@tidal kiln Stumbling upon your commit messages always makes my day a little brighter. Thank you.

ionic elk
#

@tulip sleet anything I need to do on that UF2 issue or is it just a website thing?

tulip sleet
#

@ionic elk which issue?

manic glacierBOT
tulip sleet
#

i'm only fixing the samd21 and samd51 bootloaders. Is there an STM32 bootloader we're using?

ionic elk
manic glacierBOT
#

Awesome, I added it in there and now it works. I didn't realize I wasn't
using the QSPI library. Somebody might officially add this chip to
circuitpython and SPI_Flash, as the other ones this large in size did
not work for me at all. It's the largest you can use with a SAMD51:

#define GD25Q127C {
.total_size = (1 << 24), /* 16 MiB */
.start_up_time_us = 5000,
.manufacturer_id = 0xc8,
.memory_type = 0x40,
.capacity = 0x18,
.max_clock_speed_mhz = 104...

manic glacierBOT
#
[adafruit/circuitpython] New tag created: 5\.2\.0
orchid basinBOT
idle owl
#

Here is the notes document for Mondayโ€™s CircuitPython Weekly meeting. 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/1brXruQuOrHT1cdZ6Do-4O9wlcwYZDUV8MIQPYe_1gdo/edit

manic glacierBOT
tulip sleet
#

@slender iron very minor typo in the release notes: MIDI baudrate is 31250, not 32150.

slender iron
#

@tulip sleet fixed

prime flower
#

@idle owl Thanks for posting the notes doc, I've been unable to attend due to a lecture at that time. Added to it!

idle owl
#

@prime flower Thanks for adding notes!

slender iron
#

ok, 5.2.0 is out

tulip sleet
#

yay!

spice crypt
#

Nice

#

@slender iron do you have a readme of some sort for nrf low power usage?

#

or example using pulsein?

slender iron
#

the low power stuff doesn't wake on input yet

#

I had enough trouble just getting sleep going on all the platforms

spice crypt
#

ah, I kept seeing commits with PulseIn. ๐Ÿ™‚

#

I'll play with sleep then for now

slender iron
#

ya, I had to change how it kept time since the RTC is lower resolution

spice crypt
#

Theoretical question, do you suppose display initialization will stay intact after recoving from sleep?

indigo wedge
#

Congrats!

slender iron
#

the current lower_power code should at least make it possible to add the wake on interrupt and other things

#

changing the time keeping was the hardest part

#

though waking up is tricky too

manic glacierBOT
manic glacierBOT
#

so the idea is, enable SysTick while doing this busy-wait. No need to sleep because microsecond-scale delays are too short to derive benefit(?). Limited to delays which fit in uint32_t counts of SysTick, which is 10s at 400MHz (I don't know actual stm32 clock frequency offhand, trying to overestimate). Should be fine, but maybe for sleeps >1ms it should hand off the "big" portion of the sleep to common_hal_time_delay_ms or something?

manic glacierBOT
manic glacierBOT
orchid basinBOT
manic glacierBOT
simple pulsar
#

Is there any work afoot to put CircuitPython on non-Adafruit Arcade devices?

orchid basinBOT
#

I'll be sending a PR shortly, waiting on better pictures. :)

On Thu, Apr 9, 2020 at 4:27 PM Melissa LeBlanc-Williams <
notifications@github.com> wrote:

The following boards are showing as unknown. I should be able to find some
info about at least a couple of these. @theacodes
https://github.com/theacodes, do you want to submit a PR for
winterbloom_big_honking_button? We have a guide available at
https://learn.adafruit.com/how-to-add-a-new-board-to-the-circuitpython-org-website
...

ivory yew
#

opening my email after the black changes

tulip sleet
#

and i've got about 50 more to do

ivory yew
#

Bring it on

tulip sleet
#

@idle owl I did all the remaing Black reformatting PR's except for a few where I made some stylistic edits, so someone else should review my edits. Then there is one with a question about removing unnecessary pass statements, which have pylint ignores, but we could also just remove the pass statements, and get rid of the pylint exceptions.

manic glacierBOT
#

There are actually two versions of this board with different pinouts, irritatingly enough. The first has an older break-off STLink V2 and the second can't be split and has an Stlink V3. There's a number of differences besides. Micropython kinda-sorta supports the second one? But they've got a lot of mistakes either way in their implementation, it doesn't fully fit either board.

I don't have a V1 on hand, it'd be identical in layout to the F767 though.

floral nacelle
#

does anyone know how to check datetime.datetime.now()'s time zone?

ivory yew
#

tz_info

#

but, it's probably None.

#

your best bet it figure out what timezone datetime.now() is actually based in is to use dateutil.tz.localtz

orchid basinBOT
orchid basinBOT
onyx hinge
#

@floral nacelle circuitpython's time implementation isn't sophisticated enough to know about time zones. I suspect that most people set their devices to "local time", if they set them at all.

floral nacelle
#

Oh

#

Thanks for the info Jeff

orchid basinBOT
idle owl
#

@tulip sleet Thanks! I merged all of the ones with minor changes. Looking at the ones involving pass now. I didn't add the disables, all of that was already there.

#

Wondering if I should ping Bryan to find out why he did it in the first place before removing them to see if the docs build.

tulip sleet
#

yah, what I'm suggesting is to remove the pass and the disables. Bryan would know. I kind of like the pass to make it clear it's an empty class, but I don't like the disables: I'd rather just drop the pass if it's considered passรฉ (oy)

idle owl
#

@tulip sleet I understand and agree. I simply wanted to make sure there wasn't another reason he did it.

tulip sleet
#

yeah, that's why I didn't change it right away

idle owl
#

@pastel panther For LSM6DS, you have a lot of pass #pylint: disable=unnecessary-pass in empty classes. It this strictly necessary or a stylistic choice?

pastel panther
#

what?

idle owl
#

It says you did the initial commit, I assumed you wrote it. Am I incorrect?

pastel panther
#

I wrote it, but I still don't understand what the question is.

idle owl
#

@tulip sleet Maybe you can explain it better.

pastel panther
#

Just saw the above context

idle owl
#

@pastel panther We want to remove the pass # pylint: disable=unnecessary-pass if possible.

#

So I wanted to understand the reasoning before simply removing them.

pastel panther
#

If the pass doesn't need to be there you can remove them

idle owl
#

Ok I'll try it and see what happens. Thanks.

pastel panther
#

I'm not really a fan of that empty class in the first place, so if we can come up with something better I'm all for it

idle owl
#

Sphinx update was released and resolved our doc building issue! ๐ŸŽ‰

idle owl
#

I will be requesting reviews from CPLibians on 8 more PRs.

#

Looked again: it was released 15 minutes ago. Good timing on my part checking ๐Ÿ˜„

#

No more open PRs! Thanks @tulip sleet @slender iron @onyx hinge for the reviews and merges!

onyx hinge
#

phew now I can retire

idle owl
#

๐Ÿ˜„ hold on, let me make 200 more just to keep you around!

onyx hinge
#

I only did about 10, it looked liked danh was really putting 'em away

tulip sleet
#

i was tired last night and reviewing trivial PR's was all I could handle; I have muscle memory now for all the clicks

idle owl
#

That's how it was for creating them ๐Ÿ˜„

#

my vision was blurry by the end of the day.

#

Strung my first command line commands together using && though.

#

I've copied and pasted others' commands before, but never did my own.

onyx hinge
#

watch out, you'll become (viewed as) an expert if you're not careful

idle owl
#

ah bugger. I HAVE NO IDEA WHAT I'M DOING.

#

(Maybe they'll remember me saying that instead)

tulip sleet
#

there was one black reformatting that was something like:

   x = foo(abc, def, ghi, jkl, mno, pqr, stu)[
      0
   ]

I thought maybe I should submit it to the black maintainers, but I forgot which one it was

idle owl
#

I'll admit to it taking me a minute to figure out that you simply used the alphabet and those letter groupings didn't have some special meaning.

#

the def threw me off ๐Ÿ˜†

tulip sleet
#

oh sorry, i meant stv, not stu

raven canopy
#

ngl, i've written a couple lines like that. its not easy to read...

onyx hinge
#

rummages through the box a third time for one of these boards

tulip sleet
#

i have some

#

it is right on my desk

#
Adafruit CircuitPython 5.2.0 on 2020-04-09; Adafruit ItsyBitsy M4 Express with samd51g19
>>> import protomatter_pinout_guesser

Protomatter pinouts for port width 8:
 7: MOSI SCK A0 A4 A1 A5 D2
 8: D0(RX) D1(TX) D7 D9 D10 D11 D13 D12

Protomatter pinouts for port width 16:
11: MOSI SCK A0 A4 A1 A5 D2 SDA SCL D4 D5
 8: D0(RX) D1(TX) D7 D9 D10 D11 D13 D12

Protomatter pinouts for port width 32:
19: MOSI SCK A0 A4 A1 A5 D2 SDA SCL D4 D5 D0(RX) D1(TX) D7 D9 D10 D11 D13 D12
onyx hinge
#

thank you!

#

The only one I can "find" is the one in my keyboard, makes it hard to run code on it

ruby atlas
#

I need to finish inventory of what's here. and publish the code :-)

#

in your keyboard ?

simple pulsar
#

@idle owl it looks like you need either pass or a doc string so it is superfluous but probably wasn't before docs were added

idle owl
#

Fair enough. Thanks.

ionic elk
#

What's probably the best channel on this Discord for C questions that aren't Circuitpython related?

idle owl
#

@prime flower You have a minute?

lone axle
simple pulsar
onyx hinge
#

@ruby atlas my keyboard runs circuitpython ๐Ÿ™‚

ruby atlas
#

I gathered that. Did you build a full keyboard, or modify an existing?

simple pulsar
#

Modded ASR-33?

onyx hinge
#

@simple pulsar that would be neat

ruby atlas
#

@onyx hinge that is a really cool keyboard. must have taken a long time to assemble?

onyx hinge
#

Yes, it's quite labor intensive.

#

I was surprised that there were relatively few wiring faults, because it's quite easy to be inattentive since it's fairly repetitive

#

I never did connect the neopixels or install all 4 strips it was designed to contain.

ruby atlas
#

That is a thing of beauty! I'm really impressed.

onyx hinge
#

thank you!

#

others manage much cleaner hand-wiring than me, but it is functional.

onyx hinge
manic glacierBOT
prime flower
#

@idle owl I'm around.

manic glacierBOT
idle owl
#

@prime flower Hey! So I'm wondering a couple of things. Is there a good true "simpletest" for AdafruitIO that can go in the main examples folder, and can we rename these folders to include adafruitio_ in the name? How badly does that mess up guides? We're going to be updating the check to force inclusion of the libname in folders since the examples bundle has a lot of folders in it that are unclear. https://github.com/adafruit/Adafruit_CircuitPython_AdafruitIO/tree/master/examples

prime flower
idle owl
#

Excellent.

prime flower
idle owl
#

Right on. I'll take care of it. @prime flower Do you mind if I tag you on the PR for a review?

prime flower
#

@idle owl tag away ๐Ÿ™‚

idle owl
#

Thanks!

#

@prime flower Tagged. Thanks again.

prime flower
#

๐Ÿ‘€ looking

idle owl
#

@prime flower Thanks. Merged and guide updated.

#

@gilded cradle I have a sort-of-Blinka question. It's more an opinion question.

gilded cradle
#

ok

idle owl
#

As in does it make sense for use with Blinka on SBCs etc

gilded cradle
#

Does it require PyPixelBuf?

idle owl
#

No

gilded cradle
#

Then yeah. It might be kind of cool.

idle owl
#

random, time and math

#

Ok. I'll get it sorted then. Thanks!

gilded cradle
#

yw

slender iron
#

thanks for making the prs @idle owl

#

anyone have opinions about meson or cmake as alternatives to make? esp-idf 4+ uses cmake and it'd be nice to integrate with it

idle owl
#

@slender iron You're welcome

orchid basinBOT
prime flower
#

@slender iron thanks for tagging, responding in a few.

manic glacierBOT
stuck elbow
#

@slender iron the only opinion I have about alternatives to make: whichever you choose, please still have a makefile that calls them, at least with 'all' and 'install' targets.

slender iron
#

@stuck elbow ya, I'd like make BOARD=foo to work still

#

at least until folks learn the new way

stuck elbow
#

perfect

#

packagers are not going to learn the new way

orchid basinBOT
lone axle
#

Would I need to use bootloader-feather_m0-v3.9.0.bin booloader file for the Feather M0 RFM69HCW Packet Radio - 433MHz - RadioFruit ?

#

or perhaps bootloader-radiofruit_m0-v3.9.0.bin ?

manic glacierBOT
tulip sleet
#

@lone axle use feather_m0; radiofruit is something else (SAMR21), a board which we haven't producted

lone axle
#

Thank you

tulip sleet
#

@lone axle do you already have a UF2 bootloader on the board? If so and it works there is no strong reason to update that particular board. There are good reasons to update SAMD51 boards

lone axle
#

@tulip sleet I think that I killed the bootloader when I was attempting to use BOSSA to flash circuitpython

#

I failed to set the offset value properly when I did this device so it flashed with the new default (0x000) and now the board seems to just bootloop

#

I can double press reset and see the red LED start to pulse but just a second later it goes back to the blinky (bootloop?) pattern.

tulip sleet
#

you may have just erased the fuses. it is important to set those too. Did you get a j-link?

lone axle
#

I did

tulip sleet
#

or do you have an Atmel ICE?

#

ok, great, I can walk you through resetting the fuses if you wire up the right jumpers.

lone axle
#

Ok, thank you. Do I need the wires soldered to the pads on the bottom?

tulip sleet
#

yes. Or if you have a small piece of header you can tack that on. Let me find a picture.

#

this is slightly tricker, but it's less fragile. You need some female jumper wires to connect to the pins

#

put solder on one pad, hold in place with pliers, tack, then add solder to the other pins

lone axle
#

Neat, okay I've got to get those soldered be back in a moment.

#

The feather seems to only have 2 pads on the underside

tulip sleet
#

yes, that's just for SWDIO and SWCLK. The other connections you can get off the breadboard (VCC, GND, and sometimes RST)

lone axle
#

Need to solder pins on the SWD breakout also one more moment.

manic glacierBOT
tulip sleet
#

@lone axle when you are ready I've found a simple way using just the JLink-supplied software (don't need Atmel Studio, ec.)

lone axle
#

@tulip sleet Okay I've got everything soldered. I was just looking at installing Atmel studio and running into an issue with it so that is perfect actually

tulip sleet
#

are you on windows, mac, or linux?

lone axle
#

Windows7

tulip sleet
#

did you install the JLink software already?

lone axle
#

I did install this: JLink_Windows_V670c

tulip sleet
#

great, I want you to run Jlink.exe, wherever it is, from a CMD window

#

i know where it is on Linux but not windows

#

you should see a J-Link> prompt when you run it

lone axle
#

though I do not have the device plugged in yet

tulip sleet
#

ok, so exit, and connect everything up. Connect the J-Link via USB, plug the multiwire cable into the J-Link and the header, and wire SWDIO on the board to SWIO on the header, and SWCLK to CLK, vref to 3.3V pin, GND to a GND pin, and RST to RST

lone axle
tulip sleet
#

say Yes

lone axle
tulip sleet
#

type connect

#

device is ATMSAD21G18 ATSAMD21G18

#

then do S for SWD, and choose default clock rate

lone axle
#

do I need to type in the default (it shows 4000) or just press enter with empty prompt?

tulip sleet
#

press enter

#

you should get a bunch of informational stuff and no errors

lone axle
#

should it be ATMSAMD21G18?

tulip sleet
#

oops,sorry typo ATSAMD21G18

lone axle
tulip sleet
#

excellent, now type:
J-Link>mem32 0x804000,2 to see the fuses

lone axle
#

just to confirm J-Link> is the prompt, I start my command at mem32... right?

tulip sleet
#

right

#

this command reads two 32-bit words of memory starting at the given address

lone axle
#

Could not read memory.

tulip sleet
#

make sure you have the right number of zeros

#
Cortex-M0 identified.
J-Link>mem32 0x804000,2
00804000 = D8E0C7FA FFFFFC5D 
J-Link>
#

is there a usb cable attached to the feather/

#

you need to power it

lone axle
#

There is. It's connected to wall power adapter. Should that be plugged into the same PC as the JLink?

tulip sleet
#

doesn't need to be, but wouldn't hurt

#

there'd be a common ground that way

#

type halt at the prompt and see what you get

lone axle
#

Same results with feather plugged into same USB hub as the JLink. I will double check all of my connections

tulip sleet
#

type st

lone axle
#

Ah, I missed the RST pin

#

same results with RST connected from the Feather to breakout.

tulip sleet
#

exit and restart JLink

#

i'm googling this, another suggestion is to do rx 0 at the prompt

lone axle
#

Exited and restarted, made it through the steps back to mem32 0x804000,2 but still same results.

tulip sleet
#

does st still show TRST=?

lone axle
#

Got bluescreen'd while I was looking down at the wiring. Not sure if it was related. Getting back into that prompt now.

tulip sleet
#

this is plain windows, right, not a VM?

lone axle
#

Correct

tulip sleet
#

I'm researching the "can't halt" problem

lone axle
#

Win7 Pro 64bit.

#

st does still show TRST=?

tulip sleet
#

i'm not sure exactly what that means but it might mean it's still not connected to the reset pin

lone axle
#

I can grab the multimeter and check

manic glacierBOT
lone axle
#

I've got continuity on VREF <-> 3V, GND, and RST

#

checking the bottom ones now, gotta get it up out of the breadboard

tulip sleet
#

if you put those header pins on the bottom pads it might not be making great contact into the breadboard; wires would be ok

lone axle
#

I ended up using wires, The feather pins made it seem pretty tight to try to get a female jumper in there onto the pins.

#

It seems that I do have continuity on CLK and SWDIO as well

tulip sleet
#

i think swclk and swdio are fine because it recognizes all kinds of things about the chip. It just can't reset it for some reason. It MIGHT be because it's in a reset loop, but it should be able to grab the chip forcibly using the reset line.

lone axle
#

One of the GND's on the breakout seems labled slightly differently GNDd I'm not using that one, should I be? I'm using the GND pin right next to VREF

tulip sleet
#

doesn't matter

#

i don't think, let me check

lone axle
#

after running st the blinking loop on the red LED stopped.

tulip sleet
#

so it might be halted now; does halt work now?

#

GNDd is ground detect

lone axle
tulip sleet
#

MUCH better. I wonder what is different now

#

alright let's go back to mem32 0x804000,2

lone axle
tulip sleet
#

ok, so the fuses are all smashed, but I just added fuse repair to the 3.9.0 bootloader. Did you download .bin for feather_m0?

#

i think you just had a bad connection above, or you needed to power cycle the whole mess

lone axle
#

I didn't download it yet, let me grab that now

lone axle
#

Got it downloaded

tulip sleet
#

then do loadfile bootloader-feather_m0-v3.9.0.bin 0

#

normally we might have to disable the bootloader protection, but the fuses are already set to do that

#

obviously you have to give the right path to the file so it can find it

#

after you do that you can do verifybin bootloader-feather_m0-v3.9.0.bin 0 to check that it got written

lone axle
#

Verify Successful !

tulip sleet
#

woot! OK, pull the J-Link cable from the header, and power cycle the board, and double-click and see if you get a bootloader pulsing LED and FEATHERBOOT showing. You can't reset with the cable connected to the board

#

actually don't do that yet

#

my fuse fixer won't work because the first fuse word is not all 1's

#

so we need to fix the fuses by hand

#

since the fuses aren't fixed you'll still get a reset loop

#

so put it all back together and get back to J-LInk>

#

do

w4 0x804000, 0xD8E0C7FA
w4 0x804004, 0xFFFFFC5D
#

that writes the correct fuse values to the fuse memory locations

lone axle
#

Okay I haven't unplugged anything but I did blue screen again ๐Ÿ˜Ÿ possibly power related still not certain though. Will attempt these now

tulip sleet
#

ohmygoodness,sorry, I don't know why it would have anything to do with this

lone axle
tulip sleet
#

you can do the mem32 again to verify the fuse values were written

lone axle
tulip sleet
#

mem32 0x804000,2 should show the rewritten fuse values

lone axle
#

It may be unrelated. Does happen from time to time on this laptop. But not typically over and over. I've got way less stuff running this time though ๐Ÿคž

tulip sleet
#

i have no idea why it's mem32 but w4. this is not exactly the greatest command interface

lone axle
#

Looks like those fuse values are in there now.

tulip sleet
#

so now if you pull the j-link cable and double-click the board you should get a good bootloader

lone axle
#

The red LED is no longer blinking at all after unplug and reset.

#

double clicking reset is blinking the yellow LED left of the USB, but no response from the red LED

tulip sleet
#

this is a feather m0, right?

#

not m4

lone axle
#

Correct, Feather M0 RFM69

tulip sleet
#

ok, I will try to replicate this, back in a bit

lone axle
#

Thank you

tulip sleet
#

@lone axle I have the 3.9.0 bootloader running on my Feather M0 RFM, but I put it on with the updater. Now I'll try to replicate what we did.

lone axle
tulip sleet
#

ok, I think there's a bad user program that's overwriting the flash. so to fix this...

lone axle
#

(I plugged everything back in and re-ran the verifybin and checked the fuses again)

tulip sleet
#

connect up the jlink again, and let's write zeros to disable the user program

w4 0x2000,0
w4 0x2004,0
#

then redo the fuses as before

#

then disconnect and double-click

lone axle
#

Ok everything is written.

#

Should I close out of the JLink prompt before unplugging?

tulip sleet
#

doesn't matter

lone axle
#

same thing as before. Yellow left LED blinks when I press reset but no response from red LED on double click

tulip sleet
#

ok, let's go back to the j-link

#

meawhile I will try writing the bootloader by hand

lone axle
#

Okay, I'm reconnected and back to JLink>

#

At first I was getting Couldn't read memory again checking the fuses (not sure if it's just a fluke or not). I unplugged everything and went back to feather powered from wall (which is how it was a moment ago when I wrote everything). Now I am back to the prompt again and checking the fuses they are back to FFFFF8FF FFFFFFFF

tulip sleet
#

can you do mem32 0x2000,2

lone axle
#
J-Link>mem32 0x2000,2
00002000 = 20007FF8 00024DF5
tulip sleet
#

that's not good, it didn't write the zeros, but I'm seeing similar issues

#

ok, let's try a different way of writing the bootloader

#

leave the J-Link connected, stop that program, and start JFlashLite.exe