#circuitpython-dev

1 messages · Page 300 of 1

lone axle
tulip sleet
#

righto

#

click ok, and click the 3 dots in the datafile section

#

choose the bootloader-feather_m0...bin file

#

let's erase the whole chip to make the fuses be 0xffffffff so they'll get repaired

#

so after you choose the data file, click Erase Chip

lone axle
#

That popped up a window ran some progresses and then closed

#

did not seem like any errors

tulip sleet
#

IN the log you might need to scroll it to see if there are any errors

#

then click "Program device", which will load the bootloader

#

check for errors there too, you'll need to move the horizontal scroll bar to see

lone axle
#

Ah scrolling in log I see:

Selected file: path/to//bootloader-feather_m0-v3.9.0.binConnecting to J-Link...Connecting to target...Erasing...Done
tulip sleet
#

ok, now disconnect the jlink from the header and double-click

lone axle
#
Conecting to J-Link...Connecting to target...Downloading...Done
#

disconnecting now

tulip sleet
#

single-click will probably work too, because the user program has been erased

#

(worked for me)

lone axle
#

same results with double and single (only blinks yellow LED once)

tulip sleet
#

are you disconnecting the J-Link ribbon cable from the box header breakout?

lone axle
#

yes

#

I did also switch the feather from wall power to the hub

tulip sleet
#

no reason to use wall power at all, just leave it on the hub the whole time

lone axle
#

I will try again with it in the hub the whole time

tulip sleet
#

before you do that, plug in the j-link back in, and let's look at memory. Run JMem.exe

#

i mean do move it to the hub, but don't repeat the programming yet

lone axle
#

Okay, jmem open

tulip sleet
#

could you screen shot?

lone axle
tulip sleet
#

click ok

lone axle
tulip sleet
#

actually no, choose ATSAMD21G18 first in Target device

#

sorry

#

then screenshot the first page of the memory dump

#

Also choose Fixed Speed (4000)

#

(I am getting core dumps without that)

lone axle
tulip sleet
#

click ok

lone axle
tulip sleet
#

not seeing your screenshyot for some reason

#

ok, I just need to click on it

lone axle
tulip sleet
#

type 1CC0 in the Go to file and you should see the version string on the right, it should be 3.9.0

#

then Go to 2000, and it should be all FFFF's

lone axle
tulip sleet
#

go to 804000 to see the fuses

lone axle
#

Looks like they did get set back

#

Not sure how most of this works, perhaps my unplugging from wall power before clicking reset could've been a problem?

tulip sleet
#

i don't think that's true, but you can certainly skip that.

#

the fuse settings are still causing infinit resets

#

but the bootloader itself is in good shape

#

we can go back to JLink.exe and try writing it again. We could also try writing it with gdb if that doesn't work

lone axle
#

Ok

#

closing JMem and Jflash light and going back to JLink terminal

tulip sleet
#

ok, I'm trying it on mine, and the writes aren't really happening, that's a problem. so wait a bit and let me try it with gdb

lone axle
#

Okay will do

tulip sleet
#

is this the only computer you have? do you have an RPi or some other Linux machine?

lone axle
#

I do have many other computers including RPi and a Linux laptop

tulip sleet
#

could you fire up the Linux laptop and download and install the J-Link software there? What kind of Linux?

#

have you done CircuitPython builds already? DO you have the arm gcc toolchain isntalled somewhere?

lone axle
#

I did recently complete some basic circuit python builds. It was on a Debian VM inside of this win7.

#

I think the other Linux ones I have are Debian as well. I will check

lone axle
#

Debian 9.5 on another machine I'll try it there.

tulip sleet
#

it appears that JLink.exe does not know how to write to the fuses properly; it requires some special commands different than a regular write to flash

#

Then do sudo dpkg --install on the .deb

#

aha, I found a trick way to write the fuses:

mem32 0x00804000, 1
mem32 0x00804004, 1
w4 0x4100401c, 0x00402000
w4 0x41004000, 0xa505
w4 0x00804000, 0xD8E0C7FA
w4 0x00804004, 0xFFFFFC5D
w4  0x41004000, 0xa506
#

this would be easier than setting up gdb unless you're mostly there

#

(it's sending raw commands to the flash write hardware to do the work)

lone axle
#

It took me a minute to get discord up to get the links. So I am here now on the linux machine but with nothing installed yet. I'll try that way first

#

(with the trick you found, back on windows)

tulip sleet
#

\

#

there were double 0x's; I edited the above

lone axle
#

ok trying edited

tulip sleet
#

yeah, those are the bad values

#

then after the last w4, try disconnecting and reset

lone axle
#

it poped up some progress bars really fast on the last one. disconnecting the jlink ribbon now

#

still the same, yellow LED when press reset but never red

tulip sleet
#

alright, i'm going to take a break for a couple hours. you can too, or ping me when you have the toolchain installed

#

(family matters call)

#

we are close, but these tools are not great

lone axle
#

Okay. Thank you for all your help. I'll work on getting that set up and I have some other things I can work on for a while, including dinner.

tulip sleet
#

i may modify the bootloader a bit to be less strict about when it thinks the fuses are busted

#

if it doesn't work, disconnect the board so it doesn't wear out the flash trying to fix the fuses

#

or you can use JFlashLite to flash it, at 0x0. that's less tedious

lone axle
#

@tulip sleet I had unplugged the feather when I stepped away a moment ago. Just came back and plugged the feather back in (to the USB hub) and I have pulsing red now without touching reset button at all.

#

Oh, and FEATHERBOOT

#

Everything working as in intended now as far as I can tell. Thank you!

slender iron
#

@crude blaze do you have meson experience?

lone axle
#

@solar whale Success!!

Waiting for packets...
Received (raw header): ['0x2', '0x1', '0x0', '0x0']
Received (raw payload): bytearray(b'Startup message 0 from node 1')
Received RSSI: -30.0
``` 📻
tulip sleet
lone axle
#

I can't be sure, but I think the trick that you found for writing the fuses did actually work but at least in my case not until I unplug / replugged as opposed to using the reset button.

#

It was plugged into an externally powered USB Hub at the time (not sure if that matters).

#

So I did not use the new bootloader you sent.

#

When I came back and plugged it in (was about to try the bootloader you sent) I was met with pulsing red on first power up.

#

@tulip sleet Okay I've copied this update-bootloader uf2 onto FEATHERBOOT and it has reappeared.

tulip sleet
#

Then you are all set. The updater sets the fuses.

#

all done!

lone axle
#

Thank you so much!

tulip sleet
#

thanks for your perseverance. I was going to write up how to write the bootloader using the JLink tools, and this has been very informative.

#

it also gives me some hints about writing some fuse-fixing code in a future version of the bootloader

#

you're welcome and thanks again

lone axle
#

Is it possible to use the BOSSA tool to write the uf2 bootloader onto the other one of these (that I didn't mess up the offset on the first time)

tulip sleet
lone axle
#

Ah, neat I'll use this arduino sketch

tulip sleet
#

it was broken until this release, but I rewrote it and I think it should work for you.

lone axle
#

Hmm, what if It's already running CircuitPython

tulip sleet
#

you'll have to reload circuitpython, and save your CIRCUITPY contents beforehand

lone axle
#

I've got everything I need from it.

#

Will Arduino be able to see it when it's in Circuit Python mode? Or do I need to go to the bootloader or something?

tulip sleet
#

CircuitPython can respond to the upload request from Arduino. Or more simply, double-click to get the Arduino bootloader, make sure the port is chosen in Tools->Port, and then upload the sketch

lone axle
#

My arduino IDE is pretty ancient I'm going to install a newer one

manic glacierBOT
lone axle
#

@tulip sleet I got this output in arduino:

Sketch uses 19476 bytes (7%) of program storage space. Maximum is 262144 bytes.
Atmel SMART device 0x10010005 found
Device       : ATSAMD21G18A
Chip ID      : 10010005
Version      : v2.0 [Arduino:XYZ] Mar  5 2016 17:46:52
Address      : 8192
Pages        : 3968
Page Size    : 64 bytes
Total Size   : 248KB
Planes       : 1
Lock Regions : 16
Locked       : none
Security     : false
Boot Flash   : true
BOD          : true
BOR          : true
Arduino      : FAST_CHIP_ERASE
Arduino      : FAST_MULTI_PAGE_WRITE
Arduino      : CAN_CHECKSUM_MEMORY_BUFFER
Erase flash
done in 0.818 seconds

Write 19732 bytes to flash (309 pages)

[======                        ] 20% (64/309 pages)
[============                  ] 41% (128/309 pages)
[==================            ] 62% (192/309 pages)
[========================      ] 82% (256/309 pages)
[==============================] 100% (309/309 pages)
done in 0.138 seconds

Verify 19732 bytes of flash with checksum.
Verify successful
done in 0.022 seconds
CPU reset.
An error occurred while uploading the sketch

SAM-BA operation failed
tulip sleet
#

that's probably just an upload issue. Double-click to get the pulsing bootloader, and then look in the Tools->Port menu to see which one is the board, and select that one (it should have a check mark). Then try again.

#

oh, wait, it looks like it worked

#

is the bootloader still there?

#

the "error" is that the board reset, which is supposed to do

lone axle
#

Actually yep it seems like it did work. I double clicked and it came up to FEATHERBOOT

tulip sleet
#

don't worry about it

#

you're really all done now

lone axle
#

Thanks again

solar whale
#

@lone axle glad you got it working!

lone axle
#

I will try out the ack ones tomorrow.

solar whale
#

Great! Good luck!

#

Don’t be surprised if some fail. It does happen.

lone axle
#

Playing with it so far makes me interested to try to make a basic text message app where the two devices ill be able to type and send short messages to each other.

manic glacierBOT
#

When building Circuit Python in WSL for the FOMU, I am seeing a bunch of undefined reference errors. I'm following the basic instructions from here:

git clone https://github.com/adafruit/circuitpython.git
cd circuitpython
git submodule sync
git submodule update --init
make -C mpy-cross

and when I do a make:

cd /mnt/c/workspace/circuitpython/ports/litex
make BOARD=fomu

I see these errors:
...

manic glacierBOT
#

I'm trying to send keycodes from the Gemma M0 to a Linux host. I wanted to configure three buttons to send F13, F14, and F15. While this works just fine:

import usb_hid
from adafruit_hid.keyboard import Keyboard
from adafruit_hid.keycode import Keycode

kbd = Keyboard(usb_hid.devices)
kbd.press(Keycode.A)
kbd.release(Keycode.A)

This fails to send anything at all:

kbd.press(Keycode.F13)
kbd.release(Keycode.F13)

I notice that when using evtest to try to ...

manic glacierBOT
manic glacierBOT
manic glacierBOT
crude blaze
#

@crude blaze do you have meson experience?
@slender iron sorry, very little. I probably wouldn't be of much help

manic glacierBOT
#

The circuitpython repository includes the following submodule:

[submodule "extmod/ulab"]
        path = extmod/ulab
        url = https://github.com/v923z/micropython-ulab/

The trailing slash on the repository URL causes a failure when trying to clone it:

$ git clone https://github.com/v923z/micropython-ulab/
Cloning into 'micropython-ulab'...
ERROR: Repository not found.
fatal: Could not read from remote repository.

Please make sure you have the correct access...
manic glacierBOT
manic glacierBOT
onyx hinge
#

I'm interested in #2762 because there was a weird unexplained problem with the ulab submodule when I worked on actions@v2

#

I also figured out something else about actions failing due to tags

manic glacierBOT
onyx hinge
#

wonder if this matters, seen while using pip to install dependencies of circuitpython's build: ```botocore 1.15.39 has requirement docutils<0.16,>=0.10, but you'll have docutils 0.16 which is incompatible.
awscli 1.18.39 has requirement docutils<0.16,>=0.10, but you'll have docutils 0.16 which is incompatible.

#

and no, that wasn't the secret answer to whatever is wrong with ulab 😢

#

oh wait maybe I didn't rebase my branch as I thought

onyx hinge
onyx hinge
#

And in fact this run has weirdness for multiple submodules, it's not ulab that is special

#

@lapis hemlock can you make a pull request to circuitpython with all the ulab improvements? I can walk you through it if you would like. Maybe Monday before or after the meeting.

manic glacierBOT
lapis hemlock
#

@lapis hemlock can you make a pull request to circuitpython with all the ulab improvements? I can walk you through it if you would like. Maybe Monday before or after the meeting.
@onyx hinge Absolutely! In return, you've got to merge the latest PR in ulab itself😉 I'm not working on Monday, so I am flexible.

#

@lapis hemlock can you make a pull request to circuitpython with all the ulab improvements? I can walk you through it if you would like. Maybe Monday before or after the meeting.
@onyx hinge I guess, your question was triggered by this issue https://github.com/adafruit/circuitpython/issues/2762, which, in the meantime, has been resolved.

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

In order to get tags, including in submodules, we use our own fetching procedure on top of checkout@v2.

A problem occuring in about 1% of jobs was that some submodules inexplicably did not have an "origin" remote configured. "git submodule sync" configures the "origin" remote in those cases. No cause for the problem was determined.

Besides keeping up to date on actions/checkout, @v2 is supposed to fix a bug where "re-run" of a pull request would fail checking out the code. This appea...

onyx hinge
#

maybe I got it this time. 🤞

wary ember
#

newby here, just got a m4 airlift lite, trying to move from arduino. Can't find any libs or simple examples to send/receive email, like umail or maybe wifinina. Where do I look? I'm doing IoT home apps to send alerts etc when a monitored condition happens. Thanks.

crimson ferry
#

@wary ember You'll want the ESP32SPI and Requests libraries, for starters, for HTTP requests, TCP sockets and the like. They're in the library bundle here: https://circuitpython.org/libraries. There are not currently higher-level libraries for email that I'm aware of (I do a request to my server to send email etc).

lone sandalBOT
lone sandalBOT
remote dawn
#

Total noob here; I have a Metro M0 on order but who knows when they'll ship it. Meanwhile trying out Mu and starting to learn CircuitPython. But my question is this: does the Metro M0 have to be plugged in to computer USB port to work? I'd like to develop a compact little box that does a few tricks that I can carry around and not have tethered to a computer.

main meteor
#

No, once the code is loaded, it can run standalone (as long as it doesn't require the serial interface to be up)

#

That's one of the really nice things about these little CircuitPython boards, you can program them and then include them in stuff like props to do their thing.

remote dawn
#

Perfect! That's what I was assuming. But somewhere in the docs for the board it says "no EEPROM" and that made me wonder. Because of course storing the program so that it stays in there even with the power off does use EEPROM. But I'm an engineer who has used EEPROM's since the 1980's. I guess nowadays in the Arduino world EEPROM refers only to an area where parameters can be changed without changing the underlying logic of the program.

crimson ferry
#

Yeah, I remember UV EPROM. Now it's mostly NAND flash, often with a bit of emulated EEPROM.

marble hornet
#

BUG?: I am unable to import the nvm module in 5.2 on the metro m4, I grabbed it from microcontroller but is the lack of the nvm module intentional?

timber mango
#

If you just want the nvm module, you need to do:from microcontroller import nvm

marble hornet
#

@timber mango that is an instacne of a bytearray from the nvm module is it not? i'm curious if not being ale to import nvm as a module is intentional.

manic glacierBOT
zinc maple
lone axle
#

@zinc maple yep. The Pew Pew M4 (and original Pew Pew) were created by de∫hipu

stuck elbow
#

@zinc maple yes

manic glacierBOT
#

@tannewt I think I fixed all the issues you raised, except for this one. For some reason there's not a spot to reply inline, so ...

Protocols vs common_hal: Protocols take mp_obj_t as the first argument, while common_hal takes a type-specific object pointer. On reflection, I prefer getting the compile-time type checking that the protocol function pointer is of the right type, even if it means introducing an intermediate function to do the casting of the argument. (I think I did it with ...

manic glacierBOT
tulip sleet
#

@idle owl I am going to cookie-cutter a couple of new libraries. cookie-cutter looks up to date with black, etc. Is it fine to use as is now?

manic glacierBOT
idle owl
#

@tulip sleet Should be yeah. Will still require running Black on a few things as we couldn't quite get it all proper with the template bits in it.

tulip sleet
#

thanks! I'll run a whole-tree black before committing anything to the new libs

manic glacierBOT
#

The atmel-samd port doesn't have that flush, but it doesn't have a cache for internal flash, so the cache flush routines do nothing. A call to supervisor_flash_flush() should probably be added in the atmel-samd code to prevent a bug from cropping up if we did add a cache.

I added the flush to the nrf port in #1661 because the reads were ignoring the cache, which was a bug. In retrospect I guess I could have read from the cache instead. There's a background task that flushes the cac...

#

I guess the advantages in each direction would be

  • read from cache) performance improvements, especially between rapidly interspersed read/write/read/write commands
  • read from flash) avoids errors if a read is done to verify physical flash state, such as checking for shutdown readiness or something.

Note that on the H7, the flash sectors are so huge that the filesystem will never carry over between them, so the background flush is the only time the cache will ever get written to disc.

manic glacierBOT
modern wing
#

Good afternoon all you wonderful code slingers -- happily lurking today 🙂

solar whale
#

we need a lurking emoji

turbid radish
#

Hey all, weekly reminder about tomorrow's CircuitPython Newsletter - subscribe at adafruitdaily.com, send news, projects, etc. to me on twitter @anne_engineer or email anneb@adafruit.com. I don't monitor Discord for CP news (yet).

old smelt
#

Lurking

turbid radish
#

I'm lurking while doing the newsletter

errant grail
#

Lurking

timber mango
#

lurking today

fathom trellis
#

Listening in today

turbid radish
#

Hey Nina!

fathom trellis
#

👋

turbid radish
#

omg, yes

ivory yew
#

purple gang represent

sterile bronze
#

lurking

fathom trellis
#

👍 to getting pinged

ionic elk
#

speaking of notes where the notes at?

idle owl
onyx hinge
tidal kiln
#

lurking

turbid radish
#

Yea @ivory yew !!!!!!!!!!!!!!!!

fathom trellis
#

@ivory yew 🎉✨

raven canopy
#

👏 @ivory yew! 🎉

ivory yew
#

Thank y'all. To celebrate, I want 30 minutes of Scott trying to pronounce slavic names.

onyx hinge
idle owl
#

Congrats @ivory yew!

thorny jay
#

Lurking and no notes! Sorry, did nothing this week. While feeling much better and totally recovered from Covid, I could not get started doing anything.

lapis hemlock
#

@ivory yew From me, too!

ivory yew
#

💜

onyx hinge
raven canopy
#

where is the :1000: emote? 😄

slender iron
raven canopy
#

i really should get some Nitro. haha

onyx hinge
turbid radish
#

Thank you Scott

#

@anne_engineer on Twitter

onyx hinge
inland tusk
#

lurking for status update

slender iron
tiny oriole
#

Apologies for the late arrival. If i dont get it typed in in time, Group hug to all!

inland tusk
#

enjoyed the Tiny USB for ESP32 S2

lapis hemlock
#
while True:
    hug(@jepler)
solar whale
#

is there an esp32-s2 dev board available?

idle owl
#

@tiny oriole Are you text only?

tiny oriole
#

for the moment. possibly not for the weekly update though

#

had a work conflict for the first part

idle owl
#

@tiny oriole No worries, got it in the notes

tiny oriole
#

thanks!

thorny jay
#

@solar whale There was on in the video from the desk of lady Ada. But the stock was at zero for me.

idle owl
#

@solar whale It exists, availability I'm unsure of.

#

Neither do I.

lone axle
#

Go ahead and read it sorry

solar whale
#

thanks -- will keep check the video and keep an eye out

lone axle
#

I think I've got the mic settings straightened out. I will give it another try for status reports.

inland tusk
#

@onyx hinge mute

idle owl
#

@spice crypt Are you lurking?

onyx hinge
#

good to hear your voice @raven canopy

fathom trellis
#

I have to drop off! Thanks folks, this was awesome. 🙌

spice crypt
#

no mic

#

sorry

#

just listening

idle owl
#

No worries! Thanks for joining us!

spice crypt
#

how do I set "lurking"

idle owl
#

By telling us 🙂

raven canopy
#

@onyx hinge the "perks" of tele-work. 😄

turbid radish
#

Just post the word Lurking here in chat

spice crypt
#

lurking

solar whale
#

Do the recent changes to CP github workfow (like checkout v2) require or recommend any changes to users doing local builds

onyx hinge
#

@solar whale no, shouldn't. if you want to build the new litex port you need to install a new compiler though, because it's based on RISC-V instead of ARM.

solar whale
#

Do you have a link to the RISC-V toolchain that is needed?

onyx hinge
old smelt
#

Have to drop early today. Great sitting in for a bit again. Have a great week all!

idle owl
#

@old smelt Thanks for joining us!

raven canopy
#

@tiny oriole i was glued to NWS last night. we were on the tail end of that system... 😬

tiny oriole
#

yeah, i got a rando text from my Spotter friends yesterday telling me to look over at radar and was greeted with a system so large you could see a pretty well defined eye on the radar.... which for those of you not familiar with NWS Radar, being able to see a tornado signature is usually a matter of "knowing what to look for"... seeing what is called a "debris ball" signature, let alone a debris ball with a clear eye, is extraordinarily rare.

lone axle
#

Ok, go ahead and read them, sorry

inland tusk
#

@tiny oriole I was watching the MS saga through a friend;s website. Saw the major Tornado as it went by his house to north.

The trick to seeing it is to look for winds on the boundry between the red areas and a greeen areas.
they will be going in opposite directions

onyx hinge
#

@slender iron I have the 32x16 and 64x32 so yours will be a little different. but m4 feather + that wing is the quickest way to get a working display.

#

yay! belated hug for getting the "current" sphinx working, I missed that going by

ionic elk
#

@tulip sleet how often does background_tasks call the flash flush?

raven canopy
onyx hinge
idle owl
#

Or run: black --target-version=py35 .

raven canopy
onyx hinge
#

tannewt turned into a robot

#

it got better

#

@lapis hemlock do you want help making a pull request to update ulab in circuitpython? If so, would you like to do it now or at some other time?

lapis hemlock
turbid radish
#

Thanks Scott and all!

gilded cradle
#

thanks

lapis hemlock
#

@lapis hemlock do you want help making a pull request to update ulab in circuitpython? If so, would you like to do it now or at some other time?
@onyx hinge I am free now.

errant grail
#

Thank you!

onyx hinge
#

@lapis hemlock they were in 5.1 and 5.2, I noted them because those were fixed in ulab master branch but we didn't take those fixes .. and still haven't.

lapis hemlock
#

@lapis hemlock they were in 5.1 and 5.2, I noted them because those were fixed in ulab master branch but we didn't take those fixes .. and still haven't.
@onyx hinge OK, thanks! So, what have I got to do now? With the PR, I mean.

onyx hinge
#

@lapis hemlock so I think we want to take all the changes in ulab master branch into circuitpython masater branch

thorny jay
#

@tulip sleet Is there a BLE driver/example that does serial / UART over GATT. For some hardware, there seems to be a TX and a RX UUID/characteristic that I need to write to/read from. Would you have any code that drive BLE hardware that behave like that?

lapis hemlock
#

What has changed? In the past it used to happen automatically, didn't it?

onyx hinge
#

@lapis hemlock so in a git clone of circuitpython, you'd cd extmod/ulab; git fetch origin; git checkout origin/master so that the ulab submodule is pointing at the head of the master branch

#

@lapis hemlock no, it didn't happen automatically in the past

#

while I was working on the initial pull request into circuitpython, I was regularly updating

#

anyway, after that, you can run whatever local tests you want, then git add extmod/ulab, commit, and create a pull request in the usual way against adafruit/circuitpython

#

There are a number of steps but it is a fairly mechanical process

lapis hemlock
#

OK, I can do that. I am cloning at the moment.

onyx hinge
#

thanks, I appreciate it. I think right now is a good time to do a merge, it'll go out with this next set of stuff that we'll call 5.3

lapis hemlock
#

What does this mean ```You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

git checkout -b <new-branch-name>

HEAD is now at 1f17bdb4f Merge pull request #2765 from jepler/checkout-v2-subomdules

onyx hinge
#

hmm I already left out a step 🙂 so let's back up a moment.

manic glacierBOT
onyx hinge
#

check out the "master" branch again, go back to the top level, and git submodule update --init. Because I left this step out, the git checkout command actually changed the main circuitpython tree, not the ulab tree

#

I could tell that because of the commit message, which was a circuitpython commit message and not a microlab one

lone axle
solar whale
#

@tulip sleet any issues going to 20.04?

onyx hinge
#

As for that message in general .. there's a distinction in git between checking out a local branch git checkout master and checking out other things like tags and remote branches git checkout origin/master. That's simply what it says when checking out a thing that is not a local branch. Usually, in submodules, you have a specific commit checked out, rather than a local branch. So I don't think about it much, and I'm not surprised when I see that message. I think you could git checkout master; git pull and get about the same effect as git fetch origin; git checkout origin/master except you would not see that message

lapis hemlock
#

@onyx hinge Do we have to merge the last PR from ulab before going ahead?

onyx hinge
#

I can give it a quick look before we proceeed

lapis hemlock
#

OK.

#

HEAD is now at 12d2c91 Merge pull request #92 from v923z/transpose is the state before the PR.

onyx hinge
#

This doesn't seem right. ```>>> ulab.numerical.argmin([1.2, 3.4])
1

thorny jay
#

Thanks @lone axle , I need to check the implementation of adafruit_ble.services.nordic UARTService .

onyx hinge
#

This seems weird too ```>>> ulab.numerical.argmin([1])
1

ulab.numerical.argmax([1])
1

thorny jay
#

It seems that serial over BLE has not been standardised. But many old protocol were serial and ported to BLE.

lapis hemlock
#

This doesn't seem right. ```>>> ulab.numerical.argmin([1.2, 3.4])
1

@onyx hinge Indeed. That was a stupid indexing error. I have pushed a fix.

#

Sorry for the confusion!

#

github is done with the checks.

slender iron
#

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/1YIp-LKPdIzsN2LN4yRo4FzxzTTnLuFeDOJPboQKDVhc/edit?usp=sharing

onyx hinge
#

@lapis hemlock I still see some weirdness and put more details in the pull request. I need to step away and go grocery shopping now.

lapis hemlock
#

@lapis hemlock I still see some weirdness and put more details in the pull request.
@onyx hinge Too bad. I will try to find out what the problem is.

onyx hinge
#

feel free to ping me tomorrow, after 1200GMT is good for me.

#

thanks for keeping at it!

lapis hemlock
#

OK, will do.

tulip sleet
#

@thorny jay @lone axle pointed to what I would point to

#

the Bluefruit Connect applications all use BLE "UART"

#

@solar whale I have not seen any significant 20.04 problems, but I regularly get "System Problem detected" popups. I am using the cinnamon desktop and haven't taken advantage of any new mainline UI updates. I was hoping I might see fewer USB hangs, but if anything they might be slightly worse. It's nice having newer default python etc. but it's not miraculously better.

solar whale
#

Thanks -- I'll try it soon.

lapis hemlock
#

@onyx hinge I think I have sorted it out. And thanks for the test script! Next time I will have to implement the hug function with infinite recursion, like so: ```python
def hug(whom):
while True:
hug(whom)

hug(@jepler)``` Though, I don't quite know what happens in such cases. It might break my computer. 😆

onyx hinge
#

you must have fixed the bug in my test script too

lapis hemlock
#

Yes, I have. Was that intentional?

onyx hinge
#

no

lapis hemlock
#

Such a shame! It would've made for a good prank.

onyx hinge
#

there was no poisson d'avril this year

lapis hemlock
#

We can merge it, then, right?

onyx hinge
#

I just did

lapis hemlock
#

Thanks! Do you want to proceed with the circuitpython stuff?

#

I can stay for a couple of minutes, but not longer than half an hour.

#

I have pulled in the changes, this is my status now: HEAD is now at 22813d6 Merge pull request #91 from v923z/argmax

onyx hinge
#

that looks right

lapis hemlock
#

What do I do now?

#

Issue a PR on your end?

onyx hinge
#

right. do you have a fork of circuitpython yet? Or, if you have a micropython one, that works.

lapis hemlock
#

I can fork CP.

onyx hinge
#

you create a branch, "git add extmod/ulab", push the branch to v923z/circuitpython, and create the PR using the web interface

idle owl
onyx hinge
#

"git add", "git commit", push

lapis hemlock
onyx hinge
#

if you use "git gui" it can show you a summary of the ulab commits that are being added

#

yes, that's more or less expected. Because circuitpython is forked from micropython, github doesn't create any new forks when you do that

#

(I think it's not ideal, but they have reasons for doing it that way)

lapis hemlock
#

OK, then I would have to add ulab to that.

onyx hinge
#

you started by cloning adafruit/circuitpython, right?

lapis hemlock
#

That's correct.

onyx hinge
lapis hemlock
onyx hinge
#

Not really, because you need to start with the circuitpython master branch, not something from micropython

#

Let's do it this way. git remote add v923z git@github.com:v923z/micropython-property.git ; git fetch v923z. That should print something that looks successful.

#

In your circuitpython clone

lapis hemlock
#

Do you want all the bells and whistles?

onyx hinge
#

not if it looked succesful

lapis hemlock
#

It didn't complain, but I don't quite see anything familiar.

onyx hinge
#

you can paste it if you're not sure

lapis hemlock
#
remote: Counting objects: 100% (3722/3722), done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 13303 (delta 3716), reused 3719 (delta 3716), pack-reused 9581
Receiving objects: 100% (13303/13303), 6.54 MiB | 4.91 MiB/s, done.
Resolving deltas: 100% (9759/9759), completed with 1019 local objects.
From github.com:v923z/micropython-property
 * [new branch]          cross                   -> v923z/cross
 * [new branch]          dynamic-native-modules  -> v923z/dynamic-native-modules
 * [new branch]          esp-extra-scripts       -> v923z/esp-extra-scripts
 * [new branch]          iabdalkader-cc3k-update -> v923z/iabdalkader-cc3k-update
 * [new branch]          make                    -> v923z/make
 * [new branch]          master                  -> v923z/master
 * [new branch]          parse-bytecode          -> v923z/parse-bytecode
 * [new branch]          reentrant-gc            -> v923z/reentrant-gc
 * [new branch]          travis-clang            -> v923z/travis-clang
 * [new branch]          travis-esp8266          -> v923z/travis-esp8266
 * [new branch]          travis-stackless        -> v923z/travis-stackless
 * [new branch]          travis-testing          -> v923z/travis-testing
 * [new tag]             v1.10                   -> v1.10
 * [new tag]             v1.11                   -> v1.11
 * [new tag]             v1.12                   -> v1.12
onyx hinge
#

that's great

lapis hemlock
#

I am glad that you are so excited.

onyx hinge
#

those are all the branches you created previously and pushed to micropython-property.git(as well as some tags of micropython versions)

#

we'll get there

#

let's see .. did I have you create a branch in your circuitpython clone? If not, let's do that now: git checkout -b update-ulab

lapis hemlock
#

Done.

onyx hinge
#

at some point I hope this gets close to the familiar pull request workflow you already knew well enough

#

if you didn't git add / git commit (or your favorite way of creating a commit, such as git gui), do that next.

lapis hemlock
#

I am OK, the question is, whether you are.

#

What do we want to add?

onyx hinge
#

extmod/ulab

lapis hemlock
#

OK.

#
[update-ulab 965ef48a3] added ulab
 1 file changed, 1 insertion(+), 1 deletion(-)
onyx hinge
#

git push --set-upstream v923z update-ulab

lapis hemlock
#

This is weird: ```
ERROR: Permission to v923z/micropython-property.git denied to deploy key
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

onyx hinge
#

that is weird. we just ran right past the edge of my git knowledge 🙃

#

do you usually use "git@github.com" when you pull/push things for ulab generally?

lapis hemlock
#

No, I have a key.

#

This is the answer to a different question, I guess...

onyx hinge
#

want me to just complete the pull request process this time around and we can worry about it some other time?

lapis hemlock
#

I am fine, I don't mind, if you want to work on this for a bit.

#

But if I am wearing you out, then...

onyx hinge
#

I'm not sure how to proceed, I'm unfamiliar with this message

#

also I can't reproduce this locally to look for resolutions to the problem

lapis hemlock
#

We can let it drop, if you want to.

onyx hinge
#

for now anyway, I'll put in a pull request so we actually get these bug fixes and improvements you worked on in the past, and then next time there are some accumulated changes you'd like to see in CircuitPython we can revisit it.

lapis hemlock
#

OK.

#

Sorry for all the trouble. I will try to find out what went wrong here.

onyx hinge
#

In the long run we'd like to have you be comfortable creating a pull request to circuitpython with ulab improvements (or other stuff 🎁)!

lapis hemlock
#

What I don't quite get is, why this failed with this: fatal: Could not read from remote repository.

#

Everyone should be able to read that repository.

onyx hinge
#

the "git remote add" command I had you run must have been wrong, except that when you did a "git fetch v923z" it looked like success to me. I'm confused.

lapis hemlock
#

So am I.

manic glacierBOT
onyx hinge
#

I'll let you go for now. Have fun with your projects, I look forward to hearing about them when they're sufficiently ready.

lapis hemlock
#

I will keep you posted. 👋

#

@onyx hinge How come ulab fails on circuitpython, but passes with micropython?

onyx hinge
#

uh oh! I don't know (yet)

#

nothing interesting. ```$ ../ports/unix/micropython -X emit=native ../extmod/ulab/tests/argminmax.py
NotImplementedError: native yield

lapis hemlock
#

But yield has been in micropython for ages, I am pretty sure it is also in circuitpython.

#

I know you split off at v.1.94, but that is not too old.

onyx hinge
#

"-X emit=native" means, roughly, turn all python code into native (in this case, x86_64) code. it's not the default.

lapis hemlock
#

Let me know if you want me to re-write the test script.

onyx hinge
#

so in that case we just need to skip it. (It still gets tested in circuitpython without -X native). There are many tests that have this flag set.

lapis hemlock
#

Or that.

onyx hinge
#

ah, tests

lapis hemlock
#

OK, so there is nothing I have to do on my end.

onyx hinge
#

nope

lapis hemlock
#

OK, then see you!

onyx hinge
#

👋

crimson ferry
#

The CircuitPython TFT display libraries are basically write-only to init the drivers. Is it possible, and desirable, to add some kind of read status back from the drivers so that CircuitPython code can verify the presence and function of the attached display?

crimson ferry
#

This is generally a feature I like in peripherals, but atm this is driven by my 240x135 (ST7789) going blank after a couple of days. The 2.4" and 3.5" displays don't do that. If I ^C ^D, it will start displaying again.

slender iron
#

folks who are waiting for a PR review from me will have to wait until tomorrow. I'm barely through email now

#

will be grocery shopping for a bit in the morning too unless I go tonight

solar whale
#

Be careful out there!

slender iron
#

they're orchestrating things well. I'm not worried about it

raven canopy
#

i scored toilet paper today. the benefit of not going at night, like i usually do. 😄

slender iron
#

they send a big box so we've got plenty left

manic glacierBOT
manic glacierBOT
#

Looks like you were using a riscv64 compiler that didn't have either the 32bit ABI enabled, or multilib. If you were building gcc from scratch it can be a tricky to get all the build options correct.

Do you have that compiler still installed? Might be worth checking some options? For reference this is my gcc

riscv64-unknown-elf-gcc --help=target
The following options are target specific:
  -mabi=                      Specify integer and floating-point calling convention.
  -march=...
manic glacierBOT
onyx hinge
#

the "upgrade ulab in circuitpython" PR had more loose ends than I expected, in a way I'm glad that I hit a snag working with v923z to do it.

manic glacierBOT
#

I was just peeking at your guide for how I can test this. I think we want these all to be kwarg-only args because they are either numbers, pins or lists of pins. Reading the code doesn't help with what is what. The current positional arguments can be required and have no default.

I'd also take in the height even though it's implicit in the address pins. It can make the framebuffer smaller than the available address pins and can also validate enough address pins are given.

manic glacierBOT
#

Yeah, I can make them kw-only.

I can make it so that height, if specified, is checked against the expected number. I'm not sure of the use case of creating a 16 line display on a 32 line panel, though.

however, the raspberry pi lib for driving these displays (I think that's the one) can drive multiple displays wired in "zigzag" fashion. In that case, the relation between the WxH of the screen is decoupled from the true width of the display. Protomatter C library doesn't support t...

#

There is a wrapper module, but it's not uploaded anywhere yet. It may just end up committed in the guide repo at this time, because I'm not sure there's time to get it into the library package on the timeline in which we want the guide to appear.

Looks like I can't get the current content at this computer I'm at, but it's close to this:

import displayio
import _protomatter

def protomatter_display(
    width,
    depth,
    rgb_pins,
    addr_pins,
    clock_pin,
    latc...
manic glacierBOT
half geyser
#

I'm looking through the circuitpython source, and I see this function cpu_get_regs_and_sp(regs) that gets called a lot. It assumes there are 10 registers.

  1. This isn't the case on RISC-V, which has 30 registers, and
  2. The regs argument doesn't appear to ever be used.
    Could this be replaced with a function cpu_get_sp()? Or is the register list actually used somewhere that I'm not seeing?
manic glacierBOT
lone sandalBOT
tulip sleet
#

@half geyser cpu_get_regs_and_sp(regs) gets called two places, when the stack is allocated, and in gc_collect(). You're right, it seems like it doesn't use regs; perhaps it used to check the register contents for pointers to gc. Could you open an issue? Thanks.

manic glacierBOT
#

The cpu_get_regs_and_sp(regs) function appears to be used in two places, and the regs argument is completely unused. Additionally, the regs argument is hardcoded several places to be 10 elements long, which doesn't work for platforms such as RISC-V which has 31 general registers.

Unless this function has other uses I'm not aware of, we can increase portability and remove unused code by renaming this function cpu_get_sp() and removing the argument.

manic glacierBOT
sour lynx
#

@slender iron I was watching your livestream about ESP32-S2 support in micropython, and had a couple of pointers/ideas on integrating with the ESP-IDF.

slender iron
#

@sour lynx that'd be awesome! I'm not sure where to start since we use make and the idf uses cmake

sour lynx
slender iron
#

I was considering it but I'm not sure it'll improve things much for us

sour lynx
#

Until then, there is an alternative: create a "hello_world" project with IDF, and build it with the IDF build system. Then add a CMake target to dump the CFLAGS and LDFLAGS of the main component into some file. Then you can read this file and use the CFLAGS and LDFLAGS with make.

slender iron
#

ya, I was considering that using a tinyusb example

sour lynx
#

The idea is that you write a Makefile which calls CMake to build this simple IDF project. This produces all the static libraries of IDF components. An extra rule in CMakeLists.txt saves the compiler and linker arguments to some file, which your makefile can read.

slender iron
#

that sounds like a good approach

sour lynx
#

yes, although that was based on GNU Make build system (which was used in IDF 3.x and before)

#

i think you could do something similar with CMake

#

Let me try it locally and see if it works...

manic glacierBOT
slender iron
#

I'm not sure it's getting many changes now

#

do you have any pointers for integrating with freertos? that's the other thing I'm wondering about. right now we don't have an rtos at all

sour lynx
#

I'm not sure it's getting many changes now
@slender iron Yes, this fork has been dormant for a while...

#

Regarding FreeRTOS, you probably need some "main" task where the interpreter runs, this is the easy part.

slender iron
#

heh, ya and it's micropython code is old too.

#

do you recommend the idf as a submodule or is there another way we could pin ourselves to a version of it? I know there is a docker for CI

sour lynx
#

A submodule is not a bad option. Keep in mind that if you want your users to be able to rebuild circuitpython with a slightly different IDF commit (e.g. to try out a fix we have released), they will need to manually change the submodule commit.

slender iron
#

ya, that's common for other libraries we use

#

tinyusb is a submodule for example

sour lynx
#

OTOH, submodules give better control over the specific revision than the docker image. We only tag docker images for release tags and the tips of release branches, so if you want a specific commit on a release branch, then the docker image might not exist for that commit. Note that you can still used the docker image for the respective release branch. Just git checkout the right commit of IDF inside the docker image, before building.

slender iron
#

cool. we try to avoid things shifting out from beneath us.

sour lynx
#

The docker image is useful also because it comes with all the tools and python packages already installed; you can also run install.sh in your CI job, but this might take longer than fetching the docker image.

slender iron
#

I do want to make sure I set it up so that we can easily update versions

#

ya, we need to explore that for our other toolchains too. our arm install is non-trivial

#

are you using github actions for CI?

sour lynx
#

We don't have pre-made Github Actions for IDF projects yet, although one team member is working on it.

#

But the docker image is pretty close. Let me show an example...

slender iron
#

docker image is enough. mainly just asking about the provisioning

#

we're always looking to speed up our builds

sour lynx
slender iron
#

👍 nice!

sour lynx
#

This runs on a slightly different image, igrr/idf-qemu, but the only difference from espressif/idf is that there is Qemu added to the image.

slender iron
#

right

#

ok, so I'll 1) add idf as a submodule 2) write make rules to build the idf using cmake and output the flags and 3) link those libraries into the main build

#

any idea if the IDF works with LTO? we use it on arm for small builds

sour lynx
#

No, unfortunately LTO doesn't work at the moment because we place certain functions into IRAM (for reasons) and LTO can accidentally move them to Flash.

slender iron
#

oh interesting!

sour lynx
#

however Flash size is usually not a concern with ESP chips (since you have plenty of external flash), so the gains are not so important for the app

#

we are looking at enabling the LTO for the bootloader though, since it has to fit into RAM.

slender iron
#

we use it for the way we do translations now but we can fit both the english and translations into flash

#

I thought there was a ROM bootloader. is it just part of the loaded image?

#

we're keen on having a uf2 bootloader

sour lynx
#

There is indeed a ROM bootloader (a.k.a 1st stage bootloader), and the bootloader in flash (a.k.a. 2nd stage bootloader). The ROM bootloader is always there — and it always allows flashing the app over UART or USB (CDC/DFU). The bootloader in flash doesn't handle flashing. It is mainly responsible for:

  1. OTA updates — switching between copies of the app, when the app self-updates over Wi-Fi.
  2. security features, such as flash encryption, secure boot, rollback protection — although you will likely not use these in circuitpython
slender iron
#

ok, awesome!

#

ya, we may not use any of that

sour lynx
#

You don't have to use partitions, you can access flash at any address directly, but it recommended to establish partitions for your data storage, such as FAT.

#

The minimal number of partitions you need for a functional application is probably 2: one for the application itself, another for "NVS", a non-volatile storage library which IDF uses, for example for Wi-Fi credentials storage.

slender iron
#

we usually do it through linker scripts at the moment

#

but we're pretty new to having circuitpython on an external flash chip

#

(though we do have the filesystem on internal flash in some cases)

sour lynx
#

I see. The flash memory on the ESP32 is not directly mapped into the address space. That is, it can be mapped by the MMU, but since MMU is configurable, there is more than one possible mapping. This means that theoretically you can store the application at any 64kb-aligned offset in flash, and the MMU will map it into the spot in the address space for which the application was linked.

#

This allows having two "slots" for the application in flash, and use them on a round-robin basis for OTA updates. The application runs from one slot, downloads a new version into the other slot, then restarts, asking the bootloader to switch to the new slot.

#

The application is linked in the same way, regardless of where it will be flashed. The MMU deals with mapping the application into the correct location in instruction and data memory.

#

(except that there is only one CPU)

slender iron
#

cool cool! thanks for all of the pointers

#

I'll likely stream when I work on it next so folks can give feedback. 🙂

#

I've gotta head to the store now

#

thanks!

manic glacierBOT
#

Issue #1639 Application exception output to serial (over USB) appears truncated due to buffering issue

Increased size of #defined CFG_TUD_CDC_EPSIZE to 128 from tinyusb default of 64.
Reproduced issue 80%+ of the time by running in REPL on CircuitPlayground Express:

raise AttributeError('abcdefghij' * 12)
Note that there is certainly some timing/host driver issue involved, since running the same code when
connected to a Linux instance on the same system never reproduced the code.
...

manic glacierBOT
manic glacierBOT
manic glacierBOT
slender iron
#

talking about longer term plans

slender iron
#

@onyx hinge hey, I'm trying to get protomatter going

onyx hinge
#

@slender iron ahoy

slender iron
#
import _protomatter
import framebufferio
import board

pm = _protomatter.Protomatter(32,
                              3,
                              [board.D6, board.D5, board.D9, board.D11, board.D10, board.D12],
                              [board.A5, board.A4, board.A3, board.A2],
                              board.D13,
                              board.D0,
                              board.D1,
                              doublebuffer=True,
                              framebuffer=None)

fb = framebufferio.FramebufferDisplay(
        pm, width=32, height=32
    )

print("hello")
onyx hinge
#

looks plausible, assuming you didn't pull the latest changes to make all args kwargs-only

slender iron
#

this isn't doing anything for me. is the next debugging step a logic analyzer?

onyx hinge
#

no error, no LEDs?

slender iron
#

I've got a feather m4 and 32x32 display

#

nope

#

Adafruit CircuitPython 5.2.0-47-g5466ddcfd on 2020-04-13; Adafruit Feather M4 Express with samd51j19

#

downloaded it from github

#

didn't see your kwarg changes pushed

#

is that the right pinout for the feather?

onyx hinge
#
Author: Jeff Epler <jepler@gmail.com>
Date:   Tue Apr 14 10:02:08 2020 -0500

    Protomatter: Make all arguments kw-only, add rgb count and optional height checking
#

yes that pinout matches what I've been using

slender iron
#

kk

onyx hinge
#

ouch the typos in that commit message 🤢

#

besides looking for pulsing with scope or LA, another option would be to try the arduino protomatter demo.

slender iron
#

heh. just notice the panels power isn't plugged in

#

...

onyx hinge
#

usually I just get a messed up display then, not no-display

slender iron
#

bingo

onyx hinge
#

it's possible that going straight to console mirror doesn't work, I don't think I tested that

#

oh really!

slender iron
#

no blinka but I see a >

onyx hinge
#

I have had missing blinka too

#

but I have really not concentrated on seeing the REPL..

#

@slender iron ok the push for that commit failed to build due to a spurious network error.... intersphinx inventory 'https://circuitpython.readthedocs.io/projects/register/en/latest/objects.inv' not fetchable due to <class 'requests.exceptions.HTTPError'>: 502 Server Error: Bad Gateway for url: https://circuitpython.readthedocs.io/projects/register/en/latest/objects.inv

#

but I'll try the re-run button

slender iron
onyx hinge
#

is only half the panel working?

slender iron
#

perhaps

#

I should try to load the display ruler image

onyx hinge
#

you could pass in a framebuffer of b'\xff' * 32 * 32 * 2

#

to get all white

#

and not construct a displayio

slender iron
#

I'm not sure my power supply can handle that

onyx hinge
#

and there may be bugs if you try to use it that way, I haven't since the very beginning

#

(I know there are bugs, but you can see pretty lights and usually not hit them)

slender iron
onyx hinge
#

are the colors wrong?

slender iron
#

Wonder why terminal blinka is missing

onyx hinge
#

or just translating weird

#

ok that's what's in the file. looked weird, I'd never seen it before

#

deliberately lo-fi?

#

oh for pity's sake, re-run doesn't work because I'm still branched from the point where checkout@v1 was used.

slender iron
#

that's an old version

#

for eink

#

rebase time!

#

color looks wrong

#

blinka's eye is yellow

onyx hinge
#

there are two color conversions, first from the internal colors to RGB565, and then to (in your case) RGB333. Double conversion isn't ideal, and it may be causing color artifacts(?)

slender iron
#

ya, the bottom right of the eye should be dark blue

#

tries to find the original image

onyx hinge
#

is that the only pixel out of place?

slender iron
#

no, I think the red and blue are swapped

#

blinka should be more blue than red

onyx hinge
#

colors aren't just generally swapped, though. bitmaps from disk look right to me

slender iron
#

hrm, weird

onyx hinge
#

All the LCDs swap the byte order of RGB565 vs what I use

#

is this drawing going through some path which .. doesn't?

#

.rgb888 = 0x0736a0,
.rgb565 = 0xf501,

slender iron
#

red seems weird

onyx hinge
#

this looks pre-swapped (from the palette of built in blinka)

slender iron
#

same file looks ok with ondiskbitmap

onyx hinge
#

in displayio_colorconverter_convert I added code to swap(-or-not) color values when going to the RGB565 colorspace

#

originally, everything was swapped there

slender iron
#

right, so you changed the default

onyx hinge
#

but this kind of palette that the internal blinka image has, contains pre-swapped RGB565 colors, and those are getting out

#

so would it be anything with a palette?

#

displayio_palette_get_color

slender iron
#

so I must have standardized rgb565 to bgr565 actually

onyx hinge
#

whatever to call it, the LCD panels clearly like it

slender iron
#

well the LCDs can swap them in their init code

onyx hinge
#

this branch will break palette colors for current LCDs

slender iron
#

I had trouble just getting them all the same

onyx hinge
#

though the built in blinka bitmap will not show it

#

I took the swap out of displayio_colorconverter_compute_rgb565 and moved it up a level (and made it conditional)

#

but the way displayio_palette_set_color uses it, means it'll stop swapping the color around for LCDs that need it, giving wrong results

slender iron
#

right

onyx hinge
#

and the reason that the built in blinka is different is, all those values were precomputed so they could be in ROM, so they're right for LCD and wrong for Protomatter

#

Do you see the "right" place to put the swapping?

slender iron
#

the simplest things is probably to reswap in protomatter

#

if we change the built in blinka then we have to change all other display init

onyx hinge
#

that may be the best thing right now.

slender iron
#

it sucks that it's bgr but I had a bunch of trouble getting it all uniform

onyx hinge
#

I'm sad about doing so many more memory references for every refresh

slender iron
#

can you do the swap at the same time as the RGB333? then atleast it stays in a register

onyx hinge
#

alternately, I could move the swap down into protomatter C library where it would just be a register op, but that puts another pull request on the timeline and we have a timeline

#

(jinx)

slender iron
#

🙂

#

don't let a timeline compromise your work

#

dislikes clocks

#

for now we can hack it in cp if you like

#

there are so few pixels it won't really matter

onyx hinge
#

I think it's possible to merge this on schedule and then not drop the ball on fixing the stuff that was less than perfect.

slender iron
#

¯_(ツ)_/¯

#

it's not the end of the world to have it

#

I doubt anyone will notice

#

there are plenty of other places to optimize

onyx hinge
#

the imx framebuffers may force us to face this

slender iron
#

ya perhaps

pseudo pebble
#

Hey guys! I am loving CP so far... but I wonder what is the preferred way to track CP code in a git repo? Obviously dont want the repo to live on the microcontroller drive... so I'll need to hold it on y machine and move it over in a build step. Anyone have a preferred method of that with VS code before I just knock something together with build tasks / gulp ?

slender iron
#

@pseudo pebble I think that ladyada uses git on the fs 🙂

#

I usually just copy files back over when I'm done

#

@onyx hinge does palette just need to look at the swap bit in colorspace too?

onyx hinge
#

mmmmaybe, but how does that fix the rom'd palette?

#

if you show me what you were thinking about, I can show you what I was coding but haven't tested yet. it's probably better..

#

I was busy writing a big apologetic comment which is never a good sign

slender iron
#

the colorspace is dynamic from the display right?

onyx hinge
#

I think that's right

slender iron
#

so we 1) default it to swapped and have the cc and palette swap on out

slender iron
#

and 2) change the rom representation to rgb565

onyx hinge
#

right, 1) is half-done, maybe we just need 1.5.

slender iron
#

I don't think we need to undo what you've done

#

palette also needs to swap

onyx hinge
#

okay, I'll try that

#

@slender iron ^

slender iron
#

nice!

#

did you swap the hard coded palette too?

onyx hinge
#

Let me build for clue or something rq too

#

Yes

slender iron
#

👍

#

great! I think we sorted it out

#

should also test with an in-memory bitmap

onyx hinge
#

I have a program that uses OnDiskBitmap only at this point

#

blinka looks good on pygamer, so does an OnDiskBitmap

#

OK, that's pushed

slender iron
#

kk. will look

onyx hinge
#

on pygamer anyway, an in memory bitmap also looks right

#

I just set the 0th palette entry to red, green, and blue and each one was right

slender iron
#

cool. I think we handled all of the cases

onyx hinge
#

I feel silly for not knowing blinka looked all wrong

slender iron
#

np. I had the same issue

#

I spent lots of time in those weeds

onyx hinge
#

the purple was .. pretty close honestly

slender iron
#

easier to see on this display

manic glacierBOT
#

Issue #1639 Application exception output to serial (over USB) appears truncated due to buffering issue

Added code in serial_write_substring() to split large writes into chunks to help avoid buffer overflows.
A limit of CFG_TUD_CDC_EPSIZE was used, since that is the limit used in tud_cdc_n_write_flush() from lib/tinyusb/src/class/cdc/cdc_device.c.
Prior to the fix there was a reproduction of the issue about 80% of the time using
>>> raise AttributeError('abcdefghij' * 12)
After the f...

onyx hinge
#

okay, I am hungry enough to eat a 🌮

slender iron
#

kk, sorry for keeping you up!

#

or at your desk

onyx hinge
#

thanks for the testing! It's fine, I planned to totally front load this week for Protomatter's sake...

slender iron
#

kk, cool

onyx hinge
#

I'll be back this evening if you have more to tell me on whatever medium, also to deal with stuff that comes from guide moderation

#

👋

slender iron
#

kk

slender iron
manic glacierBOT
slender iron
#

looks like CircuitPython is still using the Contributor Covenant

simple pulsar
#

@onyx hinge What res is that neopixel screen you're working on? It looks very cool.

onyx hinge
#

@simple pulsar it's 64x32. And it's not neopixels, it's this other thing. Sometimes called HUB75. https://www.adafruit.com/product/2277

#

that's the specific one I've been working with, Scott's got a 32x32 variant, and there are others

simple pulsar
#

I only ask because I've been messing around writing a program that generates test card images. I just tried it at 64x32 and it's not quite tuned for such a low resolution!

onyx hinge
#

interesting!

simple pulsar
manic glacierBOT
onyx hinge
#

@simple pulsar that's neat, I can almost see Limor in the tiny one after seeing the full size

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

@tulip sleet It's actually quite simple to patch the CoC on the libraries without creating a lot of havoc. Please submit the fix to the Adafruit Community Code of Conduct repository and we can pull it from there.

tulip sleet
#

@tulip sleet It's actually quite simple to patch the CoC on the libraries without creating a lot of havoc. Please submit the fix to the Adafruit Community Code of Conduct repository and we can pull it from there.
@idle owl not worth doing separately; I'd wait until you have to do another pan-library edit

raven canopy
#

its only like 5 tiny steps. grab copy, stick it in a repo, commit, git format-patch, submit a PR, then run it... (ok. 6 tiny steps.)

tulip sleet
#

it's very unworth it to generate all those PR emails

#

i don't think anybody has tried to contact me via the old username

raven canopy
#

its only one PR. the patch is applied as a direct commit.

tulip sleet
#

one pr per library?

raven canopy
#

nope. one PR to adabot. the libraries are direct. (except NeoPixel, or any failed patches)

tulip sleet
#

ah, I see; i was thinking about the black PR's, but those were complicated

raven canopy
#

yeah, can't patch those since a single diff won't compute.

tulip sleet
#

anyway, I submitted a pr to the code of conduct repo; thank you

manic glacierBOT
manic glacierBOT
manic glacierBOT
simple pulsar
#

It's almost like it has a crazy high gamma / brightness setting and saturates at very low levels. Is there a chance the initalisation is failing? Or that a default value is relied upon and this is a variant of the screen with an unhelpful default?

simple swift
#

Trying to get a better idea of micropython vs circuit python. I keep seeing videos about the esp8266 but that is micropython is it not? Am I understanding that circuitpython is build and maintained by adafruit?

lone axle
#

@simple swift I believe the esp8266 can use micropython (but I'm not certain). Circuit Python is a community project that Adafruit created and supports heavily by sponsoring some of the lead developers. But it's not exclusively maintained by Adafruit, there are also many non-adafruit folks working on it. And there are roughly just as many non-Adafruit devices that now support Circuit Python as there are ones made by Adafruit themselves.

simple swift
#

@lone axle great answer thank you. Is it reasonable to assume circuit python is getting more support than micropython?

lone axle
#

I am perhaps not the best person to speak on it. Personally I am way more involved and familiar with Circuit Python than Micropython. But I don't think I would say that micropython is lacking support really. They are continuing to make improvements the core and have produced a few new versions of the flagship PyBoard devices.

#

There is a fair amount of carryover as well. For instance one of the newer features within Circuit Python is called ulab (micro-lab) which is a numpy-like module that allows quick math operations. I believe that was working with Micropython before it was more recently brought in to Circuit Python. So it's an example of improvements to one leading to improvements in the other.

main meteor
#

It's nice to see: instead of a fork that keeps diverging, it's a fork that stays somewhat parallel and improvements in one get propagated to the other.

simple swift
#

Ah ok thanks again so much to learn I just want to have my python app start talking to hardware

timber mango
#

The STM32F405 Feather can run Micropython.

#

I prefer Circuitpython though because the hardware support for sensors and such is better.

ionic elk
#

@slender iron is there a specific method to avoiding merge conflicts with translations? It seems like I'm having to constantly go in all these files and change that one line that conflicts every merge

#

but I don't see them in other PRs that often

slender iron
#

@ionic elk ya sit tight. On my phone. Will send shortly

ionic elk
#

Having a failure in the... unix port too now? A recent merge maybe?

manic glacierBOT
slender iron
#

@ionic elk when merging git checkout --ours -- locale/*

#

then make translate

#

the first line gets you back to the merge version

#

basically reruns your addition (I think)

ionic elk
#

good trick

slender iron
#

I should make sure it's preserving the master version

ionic elk
#

Dan mentioned it might be beneficial to just get rid of the PO Created_date line altogether since it's the only thing that conflicts

#

which seems reasonable to me

onyx hinge
#

@slender iron I'm pleasantly surprised at how well OnDiskBitmap performs in this protomatter demo, fwiw. Portions of about 9 20x20 tiles from an OnDiskBitmap are visible at a time, and I'm getting "lotsa" FPS refresh rate.

manic glacierBOT
raven canopy
manic glacierBOT
#

Hi,

     I was able to reproduce it about 80% of the time using a

CircuitPlayground Express
connected to a Windows 10 system using Teraterm. I ran from the REPL:

raise AttributeError('abcdefghij' * 12)
This should return
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError:
abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghij

When it fails it only returns
Traceback (most recent c...

ionic elk
onyx hinge
ionic elk
#

@onyx hinge again?? I thought I fixed that... is this another failure of my git fu?

#

I'm not touching the submodule

onyx hinge
#

I don't blame anyone for having trouble with git, especially where submodules are concerned.

ionic elk
#

does it get changed on merges or something?

#

during a git fetch upstream and git merge upstream/master event?

onyx hinge
#

When it comes to submodules, it feels like there are a number of gotchas. It's hard to guess which one you got got by

ionic elk
#

Also thanks for pointing it out I would not have guessed. The only way I can seem to get it to be correct is to manually navigate to the submodule and checkout the version I see on github...?

onyx hinge
#

If you don't update your submodules with git submodule update, they will continue pointing at whatever ref they were at, when you pull, change branches, rebase, etc.

ionic elk
#

I run git submodule update --init --recursive every time

onyx hinge
#

If you then use a bulk commit command like "git commit -a", it will record the ref that was checked out and include it in the commit

#

then my story doesn't apply to your workflow

tulip sleet
#

@ionic elk is your version of git up to date? it's possible something is fixed

#

I have 2.25.1

onyx hinge
#

the unintended change came in as part of a89928c13c748b7f25bd4e734cfe487b0020a25d "Implement requested changes"

ionic elk
#

2.24.1

tulip sleet
#

that should be good enough

#

what i see is that sometimes (all the time?) a merge from upstream doesn't roll forward the submodule commits; is that the essence of the problem here?

ionic elk
#

@onyx hinge I'm just so puzzled by that because I run a git status after every git add . so it weirds me out that a submodule would be affected without me knowing

tulip sleet
#

I use this alias:

alias gitsubupdate='git submodule sync --quiet --recursive && git submodule update --init'
#

i have dropped --recursive on the second half because it seems to mess up tinyusb sometimes

ionic elk
#

@tulip sleet the essence of that being that I need the submodule sync first? because it's not coming in with the merges?

slender iron
#

--recursive brings in a bunch of tinyusb submodules we don't need

ionic elk
#

and yeah I also get issues with tinyusb a lot, I'll try your version

onyx hinge
#

@ionic elk speculating about what caused the problem aside, do you know how to resolve the problem, or would you like a hand?

ionic elk
#

I just went ahead and manually checked out the submodule to the master version and committed it, and it's resolved the file difference

#

we'll see if it makes the Unix problem go away too

onyx hinge
#

since the errors were about ulab I think the odds are in our favor

ionic elk
#

Well, thanks all for the help!

onyx hinge
#

you're welcome

#

at $OLD_JOB some days it felt like I was simply on call to help developers with their submodule problems. Only 22% joking.

idle owl
#

@tulip sleet What sommersoft said. It doesn't generate PRs. But we can wait. I'll look at your PRs in a bit here.

manic glacierBOT
#

User facing names:

>>> import rgbmatrix
>>> rgbmatrix
<module 'rgbmatrix'>
>>> rgbmatrix.RGBMatrix
<class 'RGBMatrix'>

Constructing and using:

matrix = rgbmatrix.RGBMatrix(
    width=64, height=32, bit_depth=3,
    rgb_pins=[board.D6, board.D5, board.D9, board.D11, board.D10, board.D12],
    addr_pins=[board.A5, board.A4, board.A3, board.A2],
    clock_pin=board.D13, latch_pin=board.D0, output_enable_pin=board.D1)
display = framebufferio.FramebufferDisplay(matrix,...
raven canopy
tulip sleet
#

@onyx hinge github actions seems to be stuck at the moment. queued jobs are not being run. I'll keep an eye out

onyx hinge
#

@tulip sleet I appreciate it, thank you!

#

I'll be AFK for lunch soon but I'll keep an eye on my notifications on all the systems

manic glacierBOT
#

Hi,

  Yes, this reproduces on CPY 5.2. Also, I rewrote to use

tud_cdc_write_available() but that still fails in the same way.

                -Dave

On Wed, Apr 15, 2020 at 11:40 AM Ha Thach notifications@github.com wrote:

Ok, so it is windows only issue. It sounds like this tinyusb issue. There
is a pending PR in the stack repo hathach/tinyusb#260
https://github.com/hathach/tinyusb/pull/260

I will try to reproduce first then get back to you. One last question,
does...

ionic elk
#

In my latest CI check failure I appear to have lost bool support on some boards?

#

@onyx hinge any chance this is related to new protomatter changes?

#

They aren't my boards, it's a bunch of SAMD ones

#

nevermind I think it's another submodule issue

manic glacierBOT
tulip sleet
#

@onyx hinge I tried to restart #2774; it cancelled some but not all of the jobs and now is in some kind of limbo. If we can get #2775 to build all the way through, I'll approve that and we can close #2774 as subsumed by #2775

onyx hinge
#

@tulip sleet thanks. I had pushed to 2775 the responses to the 2774 review comments anyway, because I wasn't paying attention.

onyx hinge
#

thanks

lone sandalBOT
tough flax
#

Hey folks... I screwed up... I meant to order 10 esp32-s2 wroom modules from <@&453561466486915072> and instead ordered the raw chips. Does anyone working on esp32 support want these?

ivory yew
#

I'm getting a linking error when building the uf2 bootloader for winterbloom_big_honking_button from master:

section .binfo LMA [0000000000001ff0,0000000000001fff] overlaps section .relocate LMA [0
000000000001e90,000000000000205f]
#

same with others, hrm.

manic glacierBOT
onyx hinge
#

2020-04-15 20:50:49 (99.3 KB/s) - ‘gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2’ saved [116802378/116802378]

#

hmm the one job in progress spent 20 minutes downloading this file DSL-slow

#

2020-04-15 20:25:08 (97.0 MB/s) - ‘gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2’ saved [116802378/116802378]

#

1/1000 the speed of this other download of the same asset

#

"checkout" took 10 minutes

#

and then suddenly all the rest of the jobs started and finished

tulip sleet
#

@onyx hinge I was wondering if we were being rate limited due to the new GitHub pricing (better for us), but sounds like not.

manic glacierBOT
raven canopy
#

@slender iron what branch were you having frequencyio issues on? 5.x, master, lower_power?

slender iron
#

@raven canopy I believe I was testing 5.1.0

#

(and lower_power did the same thing)

raven canopy
#

k. starting to dig in...

ionic elk
#

@slender iron I missed your top level comment, sorry! I'll work on that first thing tomorrow.

#

my b

slender iron
#

@ionic elk np!

#

misses uf2 on stm

ionic elk
#

uf2 on stm?

#

??

lunar crown
#

Minor bug on Pyportal Titano

Pyportal Titano
UF2 Bootloader v3.9.0 SFHWRO
Model: PyPortal M4 Express
Board-ID: SAMD51J20A-PyPortal-v0
Adafruit CircuitPython 5.2.0 on 2020-04-09; Adafruit PyPortal Titano with samd51j20

The Docs for adafruit_pyportal say

# Backlight function
# Value between 0 and 1 where 0 is OFF, 0.5 is 50% and 1 is 100% brightness.

The backlight seems to be totally extinguished between 0.0 and 0.4.
Very dim at 0.45, increases linearly as expected from 0.45 to 1.0.
So, if you follow the examples in “Making a PyPortal User Interface with DisplayIO” and set the backlight to 0.3, you end up with a dead screen, rather than a dim screen as the example would imply.

I didn’t see any open issues that seemed to apply to this.

--- Graham

manic glacierBOT
#

Just tried this on 5.2.0, with a Feather M0 piping PWMOut into a Metro M4:

Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 5.2.0 on 2020-04-09; Adafruit Metro M4 Express with samd51j19
>>> import frequencyio
>>> import board
>>> import time
>>>
>>> freq = frequencyio.FrequencyIn(board.D0)
>>> while True:
...     print(freq.value)
...     time.sleep(1)
...
0         # Feather freq out: 500Hz
0
0
0
0
0
0
1087      # Feather freq out:...
slender iron
#

uf2 on stm?
@ionic elk yes. so the process is the same for all boards

ionic elk
#

@slender iron something I need to take care of or something you're working on atm?

slender iron
#

not urgent. just something I'd like to see

#

may see if @gentle bronze wants to help with tinyuf2

ionic elk
#

Ohhh right you mean the UF2 bootloader doesn't support H7s right now

slender iron
#

does it support any stm?

ionic elk
#

sure, the F4s

#

UF2 is enabled for the Feather

#

and any other F4 board that it can reasonably fit on (ie ones with external flash)

slender iron
#

I may have messed mine up with jlink

ionic elk
#

I see you meant "misses" as in "I miss it lets bring it back" not "this got missed"

slender iron
#

ya, I miss it

manic glacierBOT
crimson ferry
#

Did something in a post-5.0.0 version of CP break this? ```
# ...
# logbox is a displayio.TileGrid(terminalio.FONT.bitmap`
logterm = terminalio.Terminal(logbox, terminalio.FONT)
print("Testing", file=logterm, end='\r\n')

manic glacierBOT
#

Worked for me built with current #2685 .

Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 5.1.0-117-ga6fb0beaa on 2020-04-15; Adafruit Metro M4 Express with samd51j19
>>> import frequencyio
>>> import time
>>> import board
>>> freq = frequencyio.FrequencyIn(board.D0)
>>> while True:
...     print(freq.value)
...     time.sleep(1)
...
0          # Feather freq out: 500Hz
0
0
0
1000       # Feather freq out: 1KHz
1000
1000
1000
1000
210...
#

Found a thread to pull on... Looks like Grand Central D6 doesn't have a TC, which should be throwing an error.

https://github.com/adafruit/circuitpython/blob/master/ports/atmel-samd/boards/grandcentral_m4_express/pins.c#L35

    { MP_OBJ_NEW_QSTR(MP_QSTR_D6),  MP_ROM_PTR(&pin_PD20) },

https://github.com/adafruit/samd-peripherals/blob/master/samd/samd51/pins.c#L824

#ifdef PIN_PD20
PIN(PD20, EXTINT_CHANNEL(10), NO_ADC, NO_ADC,
    NO_TOUCH,
    SERCOM(1, 2),
    SE...
manic glacierBOT
manic glacierBOT
#

@dhalbert I started with SPI_FLASH_FILESYSTEM, but the SAMD51 was crashing before CP could start (The SPI flash device is on the QSPI pins such that I have successfully used the board with a native QSPI device occupying the footprint).

My initial tests were using #define SPI_FLASH_MOSI_PIN etc... in the mpconfigboard.h file as you described. I got GDB running to debug and found it was failing when attempting to configure the QPSI pins for SPI. A quick sanity check showed any [existing ...

manic glacierBOT
manic glacierBOT
#

I could reproduce the issue with detail instruction from @DavePutz, will try to troubleshoot it and post update here.

This should return
 Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError:
abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghij

When it fails it only returns
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError

The rest o...
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

Thanks for adding this feature!

My comments are pretty much about whether you are special-casing your particular chip in the SINGLE case. The SINGLE flag should be able to work with any flash chip. If you need special handling for the MRAM chip, then there should be flag bits set in the chip description struct that say what to do.

Have you tested these changes against regular dual and quad QSPI boards? It would be good to make sure there isn't a regression.

manic glacierBOT
#

@tannewt I've been looking into the issues with startup on each board this morning. It looks like the H7 issue is contained to the .bin file - it loads just fine over GDB, which is why I didn't notice it, so you could try that for testing in the short term.

I'm not sure yet why the .bin is so bloated. It has to be something with the linker/port.c allocations - similar posts from other STM32 projects suggest this happens when data is accidentally mapped to RAM or other discontiguous memory...

tulip sleet
#

@slender iron hi, when you're on, could I talk to you about BLE advertisement prefixes? I'm confused about their length fields.

manic glacierBOT
#

Nothing is jumping out at me in the codebase. I've walked the register settings against what the Grand Central should have from ASF4/samd-peripherals; can't see anything that would be set incorrectly.

I don't have a GC, so I can't verify the registers; would be my next step if I did have one.
DigiKey has them in stock, so I may just pick one up. Having that many GPIO could surely come in handy for something. 😄

tulip sleet
#
#

but maybe I should contact support directly .. ok, I did

slender iron
#

@tulip sleet on my laptop now but not at my desk

tulip sleet
#

can wait

slender iron
#

spook is being slow about eating his breakfast

slender iron
#

and now vin is on my lap...

manic glacierBOT
onyx hinge
#

I wasn't intending to work today, but I did spend time looking into whether we can enable "1 == array" in ulab. It requires code in micropython which isn't in circuitpython. There's not "just one" cherry-pickable commit that adds the core code necessary, so I think we'll have to put it off until/unless we put in the time to merge micropython into our tree again.

#

@lapis hemlock ^ you may be interested (but dismayed) to know

manic glacierBOT
slender iron
#

@tulip sleet at my desk now

slender iron
#

@onyx hinge looking at your protomatter pr now

onyx hinge
#

🔍

slender iron
#

are there two? 2775 does have height in RGBMatrix's constructor

manic glacierBOT
tulip sleet
#

@slender iron ok, just finished lunch if you are free

slender iron
#

yup!

lapis hemlock
#

I wasn't intending to work today, but I did spend time looking into whether we can enable "1 == array" in ulab. It requires code in micropython which isn't in circuitpython. There's not "just one" cherry-pickable commit that adds the core code necessary, so I think we'll have to put it off until/unless we put in the time to merge micropython into our tree again.
@onyx hinge I am open to any reasonable alternatives, e.g., if you conditionally want to switch off 1 == array in circuitpython, or I could factor out the code for this into a separate function, and then we could attach equal: https://docs.scipy.org/doc/numpy/reference/generated/numpy.equal.html. At least, circuitpython would then have a workaround. Unfortunately, == and equal are not exactly the same thing in numpy...

onyx hinge
#

@lapis hemlock we can also just live with the limitation for now

lapis hemlock
#

@lapis hemlock we can also just live with the limitation for now
@onyx hinge The snag is that it is not simply a limitation, but the function behaves entirely differently in the two environments.

manic glacierBOT
ionic elk
#

@slender iron analyzing the .bin file from the H7, it's normal right up to the end - it's just got 3.2 billion extra zeroes.

slender iron
#

@ionic elk ya, I'm looking now too

ionic elk
#

there's nothing actually at the end, though, you could chop it all off and it'd be fine

slender iron
#

it's the .dtcm_bss section that is the issue

#

imx gets around it by explicitly including sections in the bin

ionic elk
#

hmm that's a bit over my head

#

is there a i.mx appnote I could check out?

slender iron
#

it's not imx specific

#

it's the objcopy command in Makefile

ionic elk
#

ah

slender iron
#

-j includes a section explicitly

#

the stm makefile includes all sections it thinks it needs

ionic elk
#

I see, this binary -j .flash_config -j .ivt -j .text -j .ARM.exidx -j .data -j .itcm -j .dtcm_data $^ $@?

slender iron
#

right and it doesn't include dtcm_bss

ionic elk
#

I just swapped in $(Q)$(OBJCOPY) -O binary -j .isr_vector -j .text -j .data -j .itcm -j .dtcm_data $^ $@ and it works/has a reasonably sized bin

slender iron
#

its the "progbits" that causes it to end up in the bin

ionic elk
#

any reason I shouldn't just plop a flag in there and swap it?

slender iron
#

+1 just include the flags to be explicit

ionic elk
#

could you clarify?

slender iron
#

include the -js

#

the line above looks right

#

ok, I gotta exercise. will keep testing after lunch

ionic elk
#

Still don't totally get what you mean but I'll put something together and just push it so you can suggest what you're thinking of

#

Sorry still learning this makefile stuff

slender iron
#

I think you are thinking what I'm thinking. change the objcopy lines to list the sections to include

ionic elk
#

Ok new fix is in

manic glacierBOT