#circuitpython-dev
1 messages Β· Page 111 of 1
also other is location based day schedule
@umbral dagger Or an NTP-synced RTC board. They have a good selection in the Adafruit store. π
@umbral dagger Cool! I'm developing a high-dimensionality (4,000+ dimensions) distributed Euclidean distance algorithm to determine "likeness" of documents (or other data sets) in large (~10,000 cores) cloud compute environments.
@drowsy geyser Haha.. the vast majority of my prototyping supplies come from Adafruit these days. Especially since I largely switched from AVR to SAMD.
my friend at Microsoft Flux study azure machine learning from coursera and he is in 3 week spot right now
AxureML is basically a front end to R....
@drowsy geyser Nice.
They're still working on the "distributed" part of it.
@drowsy geyser By "core" you mean CUDA cores or (e.g.) i7 cores? I'm assuming the former.
The former.
Well.. this got away from CP ...
Indeed it did. Good to point that out. I forgot I wasn't in #general-chat.
@drowsy geyser To bring it back... I'm wondering just how much muscle the SAMD51 brings to CP. Could it run some basic Python ML libraries. There's loads of ML/AI work being done in Python.
@drowsy geyser I might try to find out with this SAME54 eval board I just got.
@umbral dagger you could send data from CP device to cloud for example to process it using python there with jupyter notebooks
That would be cool! Perhaps @slender iron could chime in on the amount of extra power in the 51.
SAME54 and SAMD51 are covered by the same data 'sheet' (is it still a datasheet when it's 1700 pages long?)
Data book? π
@drowsy geyser I've had chats with him about it. I want to see how hard I can push it.
@meager fog how much power M4 chip bring more than M0 to Circuitpython?
@sick creek To start with, consider the massively large flash & sram space. Then consider the clock going 48MHz->120MHz.
@sick creek Depending on which version of the SAMD51 is used, it can have as much as 1M flash and 256K sram. That's pretty non-trivial.
@umbral dagger I can't wait to get my hands on one! I want to start seeing just what I can do with it, but I'm not helping enough to justify asking Scott for a prototype.
It makes me stop in wonder when I remember that I started out with an 8-bit CPU at 1MHz, 8K ROM & 48K RAM. AND managed to do some cool stuff.
@drowsy geyser grab a SAME54 Xplained board from Digikey.
@umbral dagger My 8 bit Z80 saved Zenith $40 million a year.
@drowsy geyser Hi, how ya doin?
@drowsy geyser Mine arrived a few minutes ago, thanks to @slender iron for turning me on to it.
@lofty topaz I did so much Z80 work (hand assembling some...for ZX81/TS1000), same for 6502. Glory days! I once built a Z80 system on a 6"x8" wirewrap board that was PACKED and no more capabile than what's onboard an ATMEGA328.
@umbral dagger Thanks! Ordered!
@lofty topaz Good, thanks! Been really busy with work...
@drowsy geyser Like I said, same datasheet.. but with onchip ethernet
@umbral dagger Do you remember C3 01 00
@lofty topaz How have you been?
@drowsy geyser SDcard support onchip as well.. the eval board has a full size SD slot.
@lofty topaz That does look familiar.
@drowsy geyser Much better. When it rains, it pours. Get yit back together.
@umbral dagger I always had my Z80's jmp 0100 to use the first 0FF bytes for program data.
@lofty topaz I was thinking that C3 was a jump.
@lofty topaz Amazing.. after so many years.
Everything I wrote in assembler for the Z80 started out C3 01 00.
It is a jump.
1979
Can you imagine having Adafruit in 1979???
RadioShack was actually useful back then.
@split ocean I have to run for bit but I want to send you a zip with the current state of my CPX, and have you try it looking exactly like mine. If it works, you might need to reflash the CPX, it could have something deeper causing the issue. As for your question yesterday, yes, your code can cause memory errors, it's not just the .mpy that can do it. I've even managed to get code to crash CircuitPython completely and reboot into safemode. π
@split ocean
I'll be back in a bit.
@umbral dagger M4 clock is 120 MHz vs 48 MHz. Plus it has hardware single-precision (not double) floating point. In MicroPython/CircuitPython, that's truncated to 30 bits instead of 32 bits (you lose the two lowest bits of mantissa precision). The internal CPU architecture is more pipeline and fancier, so that also gains. Rough experiments have yielded maybe 6x improvement, but it depends on the program.
@tulip sleet 6x is a nice sized improvement. That performance boost, plus the memory increases (more code, and more data) will be fun to explore.
Do any of the M0 boards charge attached lipoly batteries?
the feathers do
Oh keen. Thank you
feature of all feathers
Excellent. I have only the M0 Express. But I've also never had a lipoly so I've had no need to charge one. I wanted to get one for testing, but I wasn't sure if I needed a separate charger. I do not!
feather m0 express?
Yeah
Nice!
Hello everyone, I finally broke and create an account here.
hey @stuck elbow, welcome aboard
@stuck elbow Welcome!!
@stuck elbow hi - you'll find lots going on here
Probably not in my time zone π
@stuck elbow You'd be surprised.
maybe not. "random hacker times" might be middle of the day for you
@stuck elbow hiya π 
@tulip sleet im going to wait till scott gets back to figure out why it isnt enumerating
and hack on SAMR21 for a bit
since its languished
@meager fog hi, nice to meet you!
Hi @stuck elbow!!!
@stuck elbow Hi there!
@meager fog whoops, missed your earlier msg. m4 PID is 0x8015 for CPy right now. That overlaps with Feather M0, not Express, so I guess Scott mean that to be temporary.
@meager fog just hipchatted you a new bin
@tulip sleet I think its a bootloader thing. we'll see what it takes to get her going
~wow~
lemme go try
ok
I need a new bossa right?
kk
if you build add to the relesase, i put the m4-friendly bossa there
kk
it is, unfortunately, a total pain to build
you need wx
you're probably saying to yourself "but its a command line tool, why does it depend on wx?"
make bin/bossac worked
yay great
not sure the binary works π
i guess it need binary to work I guess
yup, rebuilding circuitpython first
want me to try on the SMT m4?
nah, I think its an interaction with the bootloader
all my testing is with the jlink loading at 0x000
I can run the bossa linux compile command in my windows 10 Ubuntu terminal π neat
Now I wish I have M4 board
It is so cool to see this interaction. thanks for sharing the work here!
@meager fog I'll try loading it with jlink after the bootloader
ok ill keep samr21'ing - ill give you a variant for circuitpy when its done π
if you have windows 10 and think using ubuntu command in it, got Fall Creators update towindows 10 so https://www.microsoft.com/en-us/store/p/ubuntu/9nblggh4msv6
@meager fog the bootloader code is in the samd51 branch right?
yah
kk
J link for the win!
@tulip sleet you have M4 already?
@slender iron I'm ready to make a new lib bundle. Can hold off on CharLCD and AMG8xx. I do want to fix the naming for ccs811. I have PR for that but could accept it myself. We can make another bundle in a few days. Want to get fixes in for 2.1. Do you want to review it or should I just do it?
@sick creek I have an earlier prototype: newer prototypes arrive tomw
@tulip sleet just do it. whats wrong with the naming? I thought the new PR I accepted had the correct capitalization
in the directory, but the actual .py file was Adafruit_CCS811.py instead of adafruit_ccs811.py. I only noticed that afterwards. Also a typo in .travis.yml.
i have a similar PR in for AMG8XX.
ah ok
what's the mcu on the new m4 ones?
SAMD51J20A iirc
Yeah, just capitals (for the onlookers): http://www.microchip.com/wwwproducts/en/ATSAMD51J20A
Just spent $340+ to resupply my workshop. Adafruits freebies were a very nice touch. Thanks @river quest
@stuck elbow You name it. I bought it. π
No, I mean the freebies
Not really. Just more Arduino stuff.
Oh, ah a Trinket MO a CPE a perma board and a Gemma?
@stuck elbow https://www.adafruit.com/free
Yeah, that's the link. Way cool. Just when I was about to order I saw the banner.
Your talking about $40 worth of very good stuff for free. How they do it is beyond me.
Now I need to get a job. π
@slender iron have to go out for a few hours, but will finish and publish bundle this evening
@split ocean Did you get everything you needed back to a working order for your stream? I know it's coming up quick enough that we're not going to troubleshoot right now but I wanted to make sure that you were at least good to go for that.
M4 freebies @stuck elbow
No M4 freebies @sick creek. https://www.adafruit.com/free
and no tiny UPS truck π₯
Haha womp womp. Better fire off an angry tweet. @tidal kiln
"It's in the photo!!!!"
Lol
What's super nice is no taxes and no shipping.
Giant UPS truck
@slender iron im goin' in 30 minutes to do a talk - so let me know if you want me to retry something. i can also just jlink
@meager fog at lunch with @timber lion will keep looking afterwards
@meager fog Have fun at your talk!
@tdicola I think what you are suggesting is similar to what @tannewt mentioned, but bury it in I2CDevice, i.e. Option 3. I think this would also cover the case of software I2C like ESP8266 as @jerryneedell has pointed out.
Summarizing thoughts to date:
OPTION 1 = current approach, works fine, but requires boiler plate
OPTION 2 = no good, relies on .SCL and .SDA, wouldnt' allow multiple sensor, etc.
OPTION 3 = maybe?
OPTION 4 = no good, see option 2
OPTION 5 = only works for fixed address
There is also option 6, make busio.I2C() without parameters default to board.SDA and board.SCL, but still require explicit creation of the IΒ²C bus. And option 7, pass I2CDevice to the sensors, instead of i2c and address, and make the I2CDevice default to board.SDA and board.SCL. Not sure how it would know the default address for the sensor, though, maybe the driver code could initialize it if it wasn't specified by the user:
from adafruit_bus_device.i2c_device ...
I really kind of want to put one of those 8Mbyte SPI flash chips on a TrinketM0. It's like a monster truck... no practical value, but it can be done.
there is a trinket m0 haxpress board definition in the repo
you will just need to write the header file for your flash chip
also, I found it's much easier to just build your own trinket using the same chip in a larger package, than to solder to those tiny legs
@idle owl thanks, I was all good for the stream, I showed color and accelerometer bahavior and only mentioned that sound would be coming as it is developed into express.mpy
Yeah that was pretty great, lol
I think I'll focus on getting it all working using the regular libraries for the first iteration of the guide, then move to express when it's ready
@stuck elbow Ya, that was based on https://daveastels.com/2017/09/01/trinket-m0-express-hack/
@stuck elbow I added a 2Mbyte flash in that one, the same ship as on the Express boards. I since swapped out the 2Mbyte flash on a feather M0 Express with an 8Mbyte version: https://daveastels.com/2017/10/15/feather-m0-express-supersizing/
Sounds like a plan. Sorry we couldn't get it going! I was really hoping to. I messed up my own project by creating express without touch and had to wait to finish a guide until I added it. So I understand π
@stuck elbow If you do your own bigger board, you pretty much have a feather. The Trinket hack was totally "hmm... I bet that would work..."
Python question/verification: not everythign results in a value, right? E.g I can't return the result of an if. Correct?
@meager fog the older version I have is an SAMD51J20 and the new one is SAMD51J19
the 19 has 512/192 and the 20 has 1024/256 I believe from my skim of the datasheet.
yup yup
@umbral dagger you can always swap it in
Since they're both the J package, I assume the pinouts are identical.. would have to verify, though
yeah, I think so
That had occurred to me
Like... why settle for what's on the board if you have an iron & an SMT tip π
@fading solstice
yes?
voice CircuitPython room?
ok
then I'll have time and brain space
in 10
yeah
@meager fog
@umbral dagger just return the conditional
def foo(a):
# something that's like if a == 42
return a == 42
@tidal kiln Ah.. but it's not a boolean:
relative_humidity = si7021.relative_humidity
if relative_humidity < (target_humidity - 5):
return -1
elif relative_humidity > (target_humidity + 5):
return 1
else:
return 0
looks ok. what're you trying to do?
I'll just be sitting here trying to decipher what this is doing.
Is this a trigger that activates depending on the humidity?
@tidal kiln Oh, that works. Most languages I tend to use would let me put the return before the if and just have the values inside (if they even require an explicit return)
@tidal kiln Python is just close enough to what I'm used to, to make me feel like it should work the same way... but I always have the feeling that that's not quite right π
return before if? how would you get to if statement?
do you have a code snippet that's like that?
@tidal kiln Yes, in ruby I can do this (the return is implied... last value computed is automatically returned):
if x < 0
-1
elsif x > 0
1
else
0
end
end
you mean something like this? return x if c else y
@floral dagger but with several cases, not just 2
that'll only give two...
@floral dagger but yes, that sort of thing. I saw that construct.. kinda cool
In Ruby, Lisp, Haskell everything results in a value, everything is an expression... you get used to it π
@umbral dagger ok. haven't worked in those langs.
Python is closer to C in that you have expressions and statements.
what about return -1 if x < 0 else 1 if x > 0 else 0
yeah. can nest.
well heck. that's dumb :p
One thing I have on my list of M4 projects is to do somethign like circuitpython but with a lisp instead of python (probably a stripped down Scheme... which I just happen to have 90% complete)
@floral dagger Huh.. ok, cool... but slightly confusing to read.
that just worked for me in the python tool
@floral dagger That works fine in CP
although I had to make x lowercase twice.
@floral dagger once that's fixed
@floral dagger Long var names makes it even more opaque. I'll stick with keeping it wordier but more obvious.
@umbral dagger awesome. You're right it is a little wonky to read.
@floral dagger OK, I used that construct to simplify another function... to the point that having it a function was useless and I just inlined the line.
@umbral dagger ah, so it was you who did it, thanks, it gave me an idea for using flash in my own board
@floral dagger @umbral dagger This made me think that an example of coding for filesize vs coding "normally" could be useful. Especially for non-express boards
@umbral dagger yeah, Python has separate statements and expressions, and you can't use a statement in an expression
Early look: https://bitbucket.org/dastels/humdiity-alarm
Monitor relative humidity and alert high and low
@umbral dagger you know that it has a real dac pin?
@umbral dagger if you are compiling your own firmware, you can enable the audioio module
and then have any sound you like
@stuck elbow Ya, I know.
no worries @river quest
The readonly arg to storage.remount() is now a keyword arg that
defaults to False. To maintain backwards compatibility, readonly
can be passed as a positional arg or keyword arg.
I tested my changes with this script. The file was renamed as main.py on the Feather M0 Express. Since the storage could not be remounted while USB was active, the test was run with the Feather plugged into a phone cha...
3ba5ba6 shared-bindings/storage/init.c: Change remo... - process1183
@process1183 fixed this! Thank you!
@tannewt Thanks! It was a bit of a learning curve, but I had fun working on this.
While working on issue #286, I discovered that there is not an easy way (say shorting a pin to GND or 3V while pushing reset) to reboot the Feather M0 Express into safe mode. I messed up some test scripts and ended up getting the CIRCUITPY drive stuck in read only mode (read only from the PC) and had to temporarily flash firmware with safe mode forced on to fix it (this was easier than switching to Arduino and wiping the SPI flash).
The Feather M0 Express doesn't have a switchable safe m...
is there a good example of using the accelerometer on CPX in CircuitPython w the adafruit_lis3dh library?
(was doing it w express.mpy before, but need to do w/o for now due to other conflict w sound playback)
@split ocean the memory issue still?
This is something I would like to work on.
ideally we'd figure that out
agreed :)
oh, i found this, I'm good: https://github.com/adafruit/Adafruit_CircuitPython_LIS3DH/blob/master/examples/accel.py
kk
@split ocean All the examples that Tony D sent you when you asked last time are using that library
Yes! That would be awesome. I think there may be a related bug about resetting from Python code too.
Are you on our Discord? Its where we discuss things and have a weekly voice meeting.
I'll switch it to the express one when that's ready, this way I can get it working and the guide together for UFO
@tannewt Yep, I signed up for Discord. I may not be able to attend the weekly meetings though, because I'm at work all day.
Hello!
Hi @process1183#4203 !
@split ocean Understandable. I still wish I knew what was going on with that, why it worked for me and not you. We'll get it sorted eventually.
Yeah, your code worked great. That zip I posted was the current state of my CPX.
(sorry, should have realized you had that working before suggesting I try it!)
@timber meteor welcome! thanks for your PRs!
now that you are a collaborator I can assign issues to you. muahaha
@slender iron sweet!
I record the weekly meetings if you want to listen afterwards. They are in posts that are pinned. (The pin icon at the top.)
@split ocean I figured send you everything I had on mine in that form to see if for some weird reason some other file you had was causing issues.
OK, cool. I'll check those out.
Hello anyway! π
Hi @idle owl!
Excellent!
woo! good job @split ocean and @idle owl
I realized by looking at your zip file that you didn't have a lib folder full of our bundle stuff. Oops.
Oh yeah!
I'm sure my memory error was just conflicts w all sorts of things
So much of it got frozen into the CPX 2.1 so it doesn't need to be in there
I was hoping sending that would clear things up!
reposting here: https://oshpark.com/shared_projects/s41LfLbB
I got so excited I almost forgot to add documentation. lol.
a .zip archive is worth 1000 words.
it's basically a snake-shaped trinket m0 without the polarity protection
and without any pins
@stuck elbow That's fantastic!
you can solder a paperclip to it and use it as a pin
@stuck elbow I feel like it would be fantastic if the eye was a LED/neopixel, and the body layers (Neck, top, middle, bottom coils) were capacitive touch buttons
@cunning crypt a neopixel would be more like the whole head
apa102s are tiny
but I;m rather thinking about regular purple leds along the neck on the back side, to not spoil the graphic
oooo
problem is, it's hard to lay it out on one layer
@idle owl for purposes of the tutorial, is the express.mpy you sent me in that .zip file available to the public yet?
I can share the Fritzing file
@split ocean I'm going to try to get it tonight before the new bundle gets created. At the moment, no it's just with me, but I'll get a pull request in.
OK, cool. I'll try to publish the guide tomorrow or Monday.
@idle owl ping me when you need a review
@slender iron I will thanks! Just need to finish up the docs bit.
@idle owl I was going to build a bundle tongiht, but if you think it will be done soon...
@tulip sleet I'm thinking 10 minutes unless there's an issue with it.
@slender iron Ok it's up. Let me know if anything needs changing or adding.
k looking now
Nice!
@slender iron OK! new bundle in a little while
π
@tulip sleet Bundle!!! Woot woot!
New CircuitPython Library bundle available: https://github.com/adafruit/Adafruit_CircuitPython_Bundle/releases/tag/20171019
Yay!
thanks everyone for all the contributions to this bundle!
@tulip sleet Thanks for getting it built!
thanks for pulling it together @tulip sleet
gotta figure out where to announce it forum, and will update the blog posts to add a pointer.
β€ everyone
All this rapid development making my head spin. I'll be like: Hey guys my M4 arrived! @slender iron will be all like, of there's a newer board now. Lol
That always happens. Like the install CDs you get with literally anything. Useless before they shipped.
Haha right @idle owl!
Good thing I've got the CircuitPython briefing sponsored by @idle owl
Lol
I just tweaked Rosie to only report status to github when it fails or succeeds rather than including "pending" and "error" states
should make it less noisy
I haven't checked discord in 5 hours. 456 unread messages. Most recent comment: artificial intelligence that matches human consciousness achieved via Adafruit CircuitPython.
And after checking just to be sure, my project code all still works as intended. lol.
The CDC removal is unrelated cleanup I spotted as doing this. Its redundant to mpconfigport.h where I moved it.
That's great @idle owl
@tulip sleet the rosie change I just made should make it more useful. it won't attach a status until it successfully runs the test
foreach??? In Python?
https://learn.adafruit.com/adafruit-circuit-playground-express/circuitpython-built-ins
Go here, it indicates foreach as a flow control statement. Typo???
@lofty topaz fixed - that was just someone writing late at night
π thought so. ><>
Also, I'm a bit concerned that "array" is a built-in. Any reason why and do you have dictionaries yet?
@lofty topaz python is all dictionaries
they are used internally and available as built-ins
@slender iron Ok, great, the text on the website just indicates Tuple, Lists and Arrays.
maybe just semantics? array being used in a general sense?
kind of like the term 'sequence'
@slender iron Please don't missunderstand me. The tutorial on CPX is fabulous. Huge to say the least, growing as we speak and very helpful. It's just when I see things that aren't quite right I tend to say something. Kudo's to you and the staff on this project.
no prob with dictionaries in cp:
>>> d = {'key':'val'}
>>> d['key']
'val'
>>>
@lofty topaz no worries. thats why I want to get us to a place where details like that can be easily adjusted
@tidal kiln Great, Doc should reflect that. Dict. are a very important part of python. I my view anyway.
I've been involved with micropython these days and will be switching over to CPX in the near future. That's why I'm getting educated on it with the webste.
don't take whats (currently) there too strictly then, don't think if it's not mentioned it's not supported.
but good feedback for updating the guide
@tidal kiln I know, it's like HTML, a living document. Not version controlled.
@stuck elbow Cool board concept.
On that same page it still says Trinket and Gemma don't have pulseio and sudioio support. Everything updates so quickly it's difficult to keep up!
Thanks to @tulip sleet space saving
@idle owl Which is why prying eyes like mine will say something so it can be updated.
@lofty topaz There's also a feedback link on the left side towards the bottom where you can provide feedeback.
@idle owl I just mentioned the 'foreach' and it got fixed in minutes. Refreshed the browser and walla, there's the fix.
@lofty topaz Yep! We can't always get to it that quickly, but we listen!
@idle owl Feedback??? Where??? Am I missing something???
@idle owl Oh, on the website page, yes, your right.
There you go!
It's a good option because there's not always someone here who can fix it.
@lofty topaz all fixed
I took a chance. CPX is getting all the attention these days so I just figured.... ><>
Dan's the man. π Thank you sire @tulip sleet
Dan is certainly the man for sure @lofty topaz
I'm just doing easy stuff after a busy week. Scott is also the man. He's climbing the very foggy ASF4 mountain right now.
@tulip sleet Yeah, I know, API development is nuts.
the doc is terrible, and he's found bugs
@slender iron hiya back
@meager fog Hello, we were just talking about the website I've been reading for the CPX. What a piece of work.
I love it.
@meager fog How was the talk?
good! i also ate food which is rad
it was a talk on 3d printing, i dont think it was vid
What a world that is. My XYZ 3D is down getting cleaned. I use it so much.
run this code
import board
from digitalio import DigitalInOut, Direction, Pull
led = DigitalInOut(board.D13)
led.direction = Direction.OUTPUT
while True:
led.value = not led.value
then soft reset or save the file, you get a
main.py output:
Traceback (most recent call last):
File "main.py", line 4, in <module>
ValueError: Pin PA21 in use
There's no LoRa libraries for CircuitPython yet, correct?
right
just searching github yields some regular Python libraries though, e.g., for RasbPi
Oh, cool. If I ever get the time, I'll take a look and see if they work.
But... that's not high on my list right now. I've got a bunch of other things in front.
@tulip sleet @slender iron and all involved great job getting CP 2.1 and Bundle released. So far, no issues rebuilding all boards with 2.1 .0 and recreating Bunndle. Looking forward to more time to check ot the changes this weekend.
The following functions are supported by Micropython, but currently are NOT supported in CircuitPython. Is this a surprise? To save memory I suspect. These function are not commonly used.
Functions
.. function:: acosh(x)
Return the inverse hyperbolic cosine of x.
.. function:: asinh(x)
Return the inverse hyperbolic sine of x.
.. function:: atanh(x)
Return the inverse hyperbolic tangent of x.
.. function:: cosh(x)
Return the hyperbolic cosine of...
Are they turned off by a #define? If so, its probably just an oversight. @dhalbert would have an opinion about whether to include them because they may increase code size.
I'm ok leaving them out until we hear from folks that they need something.
@slender iron the functions that are not in CircuitPython are surrounded by #if MICROPY_PY_MATH_SPECIAL_FUNCTIONS/#endif. concerning shared-bindings documentation. If some inline documentation is surrounded by #if SOMETHING /#endif and SOMETHING == 0, does that documentation get emitted, published ?
@fading solstice it'll get published
hmmm
the C -> RST code is very stupid
yes, stupid. oh well
the functions that are not in CircuitPython are surrounded by #if MICROPY_PY_MATH_SPECIAL_FUNCTIONS/#endif.
maybe just comment it out so it starts with // //| ?
yes.
it is smart enough to look at the line start I think
[comments crossed]
These are turned on by #define MICROPY_PY_MATH_SPECIAL_FUNCTIONS (1). If I turn them on, they use up an extra 15k flash. So they're not so desirable, even for the M0 Express boards.
We could turn them on in the M4 build, maybe, though we'll need to see what our flash budget is.
Note that complex number support is turned off on the non-Express M0 builds right now. That also is large enough to make a difference.
The embedded documentation should reflect which math functions/features are available on which boards. For example we could put a disclaimer in like "The following functions are supported on all boards: <math function list>. The following functions may not be available depending on your board: <match function list>. The determine what functions are available enter the REPL type import math followed by dir(math) "
The documentation would, of course, be simpler if all boards supported t...
Ok. I tried to flash it. It found the device, said Erase flash, done, but then says no such file or directory. ```Device found on cu.usbmodem14111
Atmel SMART device 0x60060005 found
Erase flash
done in 2.518 seconds
No such file or directory```
I changed the path, but no I didn't download a bin. Ahhh ok
you could also try building it yourself
It worked!
yay!
I have REPL!
I'm gonna make a secret role for those who have metro m4 expresses so we can mention everyone
Sounds good!
m4 for everyone
I'm trying to load 2.1 onto the Feather Huzzah, but getting the same issue I had with breakout. Anyone know if there's a way to power these with an external supply like you can the breakouts?
Is there a "mpy-cross.exe" for windows available on GitHub already compiled? I know the source code is on their but it's hard to compile.
@floral dagger have a lipo battery?
not one with a proper connection
@brisk cairn @tulip sleet might have one. I don't develop on windows so I don't
are the BAT and USB pins output only? The learn docs mention using them as power sources for connected devices, but doesn't mention if you can also use them to power the huzzah
It blinks!!
@floral dagger I load to a feather huzzah routninely, what is the problem you are haveing?
@floral dagger I don't think so
@solar whale It just loads gibberish and gives fatal errors on boot. It was the same issue I had with the breakout, but resolved it by powering with a stronger 5v supply
@floral dagger On the breakout I thought you were once using 3.3 v to power but USB to the Feather shouild eb 5V and plenty.
@stuck elbow You can always grab a SAMDE54 Xplained board from Microchip/Digikey.
or make my own
yup
make Circuitpython board what runs M4
@floral dagger - did you erase the flash before loading 2.1
@solar whale Oh yeah, you're right. I forgot my adapter is 3.3...I was just thinking USB
Thsi can be a bigger problem
yes. I've tried a powered USB hub as well
I often get prblems if I don't erase
@sick creek so far I made a m0 one, but can't get the display to work
@stuck elbow killing someone is not how you get it. you can email me and ask nicely though π
esptool.py --port COM12 --baud 460800 write_flash --flash_size=detect 0 adafruit-circuitpython-feather_huzzah-2.1.0.bin```
this is what works with the other one
@stuck elbow You'd have to fly a long ways... get back home after a murder.... seems like a huge hassle.
@ brad - should be OK - nto sure what the problem is.
@stuck elbow Yeah, but the people you'd do that to would be the ones that you'd have to keep alive to help you get it to work
Yeah, I don't know either. I'll try lowering the baud rate to see if that helps
yeah...all that looks great
esptool.py v2.2-dev
Connecting....
Detecting chip type... ESP8266
Chip is ESP8266EX
Uploading stub...
Running stub...
Stub running...
Erasing flash (this may take a while)...
Chip erase completed successfully in 8.5s
Hard resetting...
C:\Users\tbrad\Documents\esptool>```
esptool.py v2.2-dev
Connecting....
Detecting chip type... ESP8266
Chip is ESP8266EX
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Auto-detected Flash size: 4MB
Flash params set to 0x0040
Compressed 595076 bytes to 387307...
Wrote 595076 bytes (387307 compressed) at 0x00000000 in 9.3 seconds (effective 514.3 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting...
C:\Users\tbrad\Documents\esptool>```
then this over and over
tail 8
chksum 0x11
load 0x3ffe8450, len 3248, room 0
tail 0
chksum 0xfd
csum 0xfd
lββ|ββrrnbββ
lβ
bβl
bμβββll
b
βlrll
lββ|ββrrnbββllββ
bβ
bμββb
bβ
βlrlβ
lββ|ββrrnbββl
ββ
bβ
bμββl
bβlblββββnβrββn|β
l
lll`ββrβlβlβ
l`ββrβlβlβ
l`ββrβl
βββ
ll`rlββrlβββb
ββbβb
brβr
bββnβnnβ
lββ
l
β
lββllββββββlβnββββb
l
lβrp
βββb
l
βbrlrlrβnβββ
ββnββββbrbββbμβlbβlβlβlblββlnβprlβ
β#4 ets_task(40100164, 3, 3fff8390, 4)
Adafruit CircuitPython 2.1.0 on 2017-10-17; ESP module with ESP8266
>>>
@floral dagger that looks very noremal
the former looks broken
it just keeps rebooting though
@floral dagger this is on the same USB as your breakout had trouble?
@floral dagger I've had that issue with Arduino on an ESP before. Putting not enough things in the main loop would just make it continually reboot
the giggerish is completely normal -- preboot uses a lower baudrate
@slender iron I have it on a powered hub
74880 baud for the pre-boot ESP-specific stuff
weird!
just got this
Adafruit CircuitPython 2.1.0 on 2017-10-17; ESP module with ESP8266
>>> Fatal exception 9(LoadStoreAlignmentCause):
epc1=0x
@brisk cairn I haven't made a Windows mpy-cross, but would really like to be able to supply one. It's on my list to investigate. Maybe a Cygwin or MinGW executable.
i'll try that next was giving the baud ate @cunning crypt don suggested a try
It willn ot stay at that baud rate after boot - so you won;t see much π since you see the boot banner - it gets taht far.
did you exit your terminall sessio
Yes
OK - ampy won;t work if it can't get to REPL anyway
I don't want to eat up the channel. I'm going to keep throwing things at it to see what sticks. Thanks everyone. If you think of something, please let me know
OK - I'll be home later and will try loading the same image.
@floral dagger one more silly question should. After load are to pressing reset button ?
yes, and between each step of erase/flash
@solar whale 2.0 loaded btw, but same corrupt hdd I had issues with before
os.listdir() shows a bunch of empty data
Hmm. I donβt reset between erase and flash.
>>> os.listdir()
['\x00\x00\x00\x00\x00\x00\x00\x00.\x00\x00\x00', '\x00\x00\x00\x00\x00\x00\x00\x00.\x00\x00\x00',```it's identical to before
@floral dagger I just loaded 2.1 on a Feather Huzzah from Linux with esptool:
esptool.py erase_flash; esptool.py --baud 460800 write_flash 0 adafruit-circuitpython-feather_huzzah-2.1.0.bin
No problems in the REPL, and os.listdir() shows boot.py.
Connecting...
Running Cesanta flasher stub...
Erasing flash (this may take a while)...
Erase took 8.7 seconds
esptool.py v1.2
Connecting...
Auto-detected Flash size: 32m
Running Cesanta flasher stub...
Flash params set to 0x0040
Writing 598016 @ 0x0... 598016 (100 %)
Wrote 598016 bytes at 0x0 in 13.8 seconds (345.9 kbit/s)...
Leaving...
@floral dagger is using a different version of esptool
never pressed reset
I have 2.1 you have 1.2 he has 2.2-dev
yes, might be worth trying a different one. I'm not booted up in Windows to try there.
I'm tempted to see if I wuld have better luck flashing it with my raspberry pi
that would be a lot closer to what I'm doing. Do you have more than one?
I hear people talking about CP on a Feather Huzzah but I don't recall hearing if it's supported on a Huzzah32?
@marble talon - nope, sorry
Figured as much, but I also hadn't seen anybody asking about it so wondered if I was the only one with a Huzzah32 π
@tulip sleet I just have the one, but I should be able to sus out the process. It can't be too dissimilar
@slender iron are all the M4 builds are still using the internal flash fs? I'm merging in the latest 2.x changes and I had redone the logic for selecting the flash impl.
@tulip sleet yes, until we add SPI support
k
@floral dagger note on min e chip is ESP8266 - on yours it is ESP8266EX ??? ```esptool.py v2.1
Connecting....
Detecting chip type... ESP8266
Chip is ESP8266
Uploading stub...
Running stub...
Stub running...
Erasing flash (this may take a while)...
Chip erase completed successfully in 9.8s
Hard resetting...
jerryneedell@Ubuntu-Macmini:~/Downloads$ esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash --flash_size=detect 0 adafruit-circuitpython-feather_huzzah-2.1.0.bin
esptool.py v2.1
Connecting....
Detecting chip type... ESP8266
Chip is ESP8266
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Auto-detected Flash size: 4MB
Flash params set to 0x0040
Compressed 595076 bytes to 387307...
Wrote 595076 bytes (387307 compressed) at 0x00000000 in 9.1 seconds (effective 520.8 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting...
jerryneedell@Ubuntu-Macmini:~/Downloads$
yes Detecting chip type... ESP8266 Chip is ESP8266EX
no idea why or if important -just different - mine worked fine.....
the chip on your board is an ESP-12S correct?
I think so, let me check
this part https://www.adafruit.com/product/2821
yup - thats it - very odd - tryin from Raspberry Pi or with version 2.1 esptool may be instructive...
I'm using linux box.
@floral dagger sorry, I didn't follow from the beginning, but did you do eras_flash?
yes
I noticed with older versions of esptool that it didn't always work the first time
erasing the flash, I mean
given taht it erases and program OK then boots to first message, I don't thing the issue is in the programming.
try forcein flash_size to 32m instead of detect - after erase ofcourse π
tried esptool v2.1....same issue
@tulip sleet did you build a bossac for linux yet? I have other builds here: https://github.com/adafruit/BOSSA/releases/tag/adafruit_17_10_19
ok - If i build/install it is is backward compatible with older boards?
yeah, I think so
I'll try flashing 2.1 later @floral dagger and let you know if I have any problems
I use a Raspberry Pi to flash mine
buil ok - any special setting s to flah m4?
@slender iron @solar whale you mean bossac for M4? No, not yet. I wasn't sure I had a working bootloader to use yet. Been using gdb only.
ok - so I can load to it via jlink - I'll try that.
@solar whale no special setting. I think it detects automatically
@tulip sleet we have a working arduino "BOSSA" bootloader but not UF2
Note that I placed the function documentation in alphabetical order. I tested this by creating a .uf2 for my CPX board. Seems to work. The documentation for functions not compiled-in are in with the code but start with // instead of //| . Other than moving the code and setting MICROPY_PY_MATH to (0) for both atmelsamd and esp8266, the functionality is exactly the same.
Note that i could NOT build esp8366 BOARD=feather_huzzah. I assume this is just broken for everyone.
hmmm ```
~/projects/adafruit_github/BOSSA//bin/bossac -p /dev/ttyACM0 -e -w -v -R firmware.bin
SAM-BA operation failed ```
@solar whale did you doubleclick to get into the bootloader?
@slender iron did Ih ave to modify anythin in bossa build to enable samd51?
Let me try this with my M4... Oh wait! Lolololol
yes
@solar whale no, what branch are you on?
snicker snicker
I built master DEBUG
oh on bossac - ah - I wasn tmaster - yest not arduino
and didn't build debug
I was not thinking bossac - I see arduino and master - which should I use?
Yay!
lunchtime. bye all!
Yay - I can turn D13 LED on/off...
I got it too!
@idle owl did you find REPL to give funky output some times?
With dir(board) it did. And it kept changing.
same here
It's not processing characters correctly it looks like
good - not just me π
Nope!
@tulip sleet do you use Ozone with your jlink or just gdb?
jsut gdb
I tried Ozone and manged to lock up my computer π - I try gdb
never tried it!
works ok on my nrf52 - this is an ATSAMD51J19, correct?
Yes
At least some of them are, anyway. Mine is.
Might be worth checking. It says it tiny on the chip.
now I can read it -- getting old....
Time to embrace your inner cyborg: https://www.amazon.com/dp/B005C75IVM/_encoding=UTF8
@river quest That's great!!
wew!
cool
SWEET!
π
woot
π
@river quest They look fantastic
πΈ Cheers
yay!
Fanpython
@river quest Is it odd to buy adds from one of your previous endeavors?
everyone thank @clever stratus adafruit CFO
@tulip sleet are the jlink pins for the Metro-M4 the same as for MetroM0 express - same same connector - its not lableed SWD on the M4 board.
Thanks @clever stratus !
Thank you @clever stratus !!!
@clever stratus Thank you!
Nice job @clever stratus π
@molten comet my kid is 13 now, so it feels good that it's been around this long and now we're doing ads with them
@clever stratus π° -"thanks!"
daw, thanks all, but wasn't just me π team @river quest effort!
much love @clever stratus π
Thank you.
not many have snakes in hardware
I'm slightly embarrased to ask, but does CPX mean Circuit Playground eXpress or Circuit PythonX?
CPC = Circuit Playground Classic
CPX = Circuit Playground Express
CP = CircuitPython
@pastel panther Circuit Playground Express
That makes much sense
Don't be embarrassed π
I'm a bit surprised the Adafruit logo is not shown in the ads tho.
totally unofficial vernacular
i didn't want to logos designed by me on the same page (adafruit / hackaday)
this is code + community and something new π
@lofty topaz A search for CircuitPython finds you Adafruit pretty quickly. π
@idle owl I know. I just clicked on the ads in the Hackaday Home page and I immediately went to the CircuitPython page on Adafruits website.
Excellent
we'll add that to the state of circuitpython reports we are doing for the community
not get sooner metrics?
@river quest That made me pause... kid....13... huh? Then duh.
she's a teenager now, totally ok to have a job
i updated the circuitpython category page - some htmlin' later and it now has a link to the discord chat
Nice!
@river quest We going out for dinner tonight to where my kid cooks, and heβs responsible for designing this weekβs special.
yah see
this is totally ok π
nice gude π https://learn.adafruit.com/circuit-playground-express-piano-in-the-key-of-lime?view=all
@river quest Thank you!!
"key limes" π
Right?? π
@slender iron @tulip sleet I am seeing a lot of the following errs on my Ubuntu Linux system when connected to the M4 board - have you seend this? ```[ 455.798178] sd 6:0:0:1: [sdc] Sense Key : Illegal Request [current]
[ 455.798180] sd 6:0:0:1: [sdc] Add. Sense: Invalid command operation code
[ 455.802306] sd 6:0:0:1: [sdc] Unit Not Ready
[ 455.802308] sd 6:0:0:1: [sdc] Sense Key : Illegal Request [current]
[ 455.802309] sd 6:0:0:1: [sdc] Add. Sense: Invalid command operation code
Can you name these companies? Adafruit needs to show logo everywhere. The future of our realm depends on it. π
@solar whale jlink pins are the same
thanks
And CircuitPython with Circuit Playground Express is the product to use for it.
same erro messages on Raspberry pi
@solar whale I haven't had a chance to build the latest 3.0.0 at all. I'm merging in the latest 2.x changes to 3.0.0. The stuff above looks like the USB MSC commands are not working well. MSC uses a simplified SCSI command set.
@slender iron would have more to say
Sometime REPL works and other times I can't connect
he just finished the MSC implementation
quite possible ther are some bugs that might be corrupting memory - it's very early days for 3.0.0
@lofty topaz I think the idea is that CP is bigger than adafruit. Would linux be what it is if Linus insisted that there be a logo on every page?
you might try a different USB port (maybe USB2 instead of USB3); the slower speed might help
@idle owl too legitimate to quitimate
I'm on a USB2 powered hub - I'll keep working with it. I was afraid it was an isue with Jlink, but it is not.
@pastel panther And where is Linux today? On a Raspberry Pi? Why not everywhere? Because people didn't know about it. It has taken years for linux to take any kind of hold in the market. Now it's a toy. Big deal.
@lofty topaz I don't think linux's reach is limited by it's marketing, it's limited by the open source community's historical preference for features over documentation and ease of use
yes, that too.
Also not everyone needs a sonic screwdriver
@empty estuary I'll say this: Since Python got started (about 10 years after I started programming) CircuitPython is the first time I've found it interesting and useful enough to learn.
@lofty topaz Linux a toy? wut? Let me introduce you to my little friend: quad core 4GHz i7 with 64G ram & 1T M2 SSD. Running Ubuntu 17
Let's not restart the war of roses in our beautiful little virtual hackerspace
π
(admittedly I started it)
@solar whale if a hub, might try direct-connect; but I'm thinking it's just bugs. Is it erratic when you restart (mon reset; continue) in gdb?
And it runs on my Pis. Same thing. which is very cool.
@umbral dagger Right, and people want kids to use it? With command line interface? Com'on man. Embedded is the future. Operating Environments, not systems is the future for embedded. MicroPython is an Environment. And I like it.
@lofty topaz Yes, and that's a huge reason it's so interesting!
@tulip sleet I have npt gotten gdb up an runnig yet - will try later tonight or tomorrow.
@solar whale I'm back now. I've only seen serial corruption during os.listdir() for some reason
the MSC sense is likely and asf4 problem we can fix
when I connect jlink - curent goes up from 42mA to 103mA - is that normal
but JLINK is not connecting properly
ah - I wonder if it is a power issue - 5V is OK?
@slender iron omg you know that Rosie head looks similar to barrel
I'm powering mine from USB as well. But I haven't hooked up the jlink yet.
@solar whale my barrel might actually be 9v
do you also use USB for REPL connection while powered via Barrel?
yeah I do
I have a usb cable that can connect and disconnect the data lines without unplugging
@slender iron You do all the j-link stuff on MacOS?
I'm using Linux - may try MacOS next
@idle owl yup
@solar whale should be essentially the same on linux
@solar whale that looks correct to me
hmm - I have the USB port "turned off" but I guess it passes daat since I see USB drive - jlink now connected!
how did you turn it off?
my hub has switches on each port
oh nice!
lol
too may keyboards!
@idle owl, did that guide thing work out for you?
@split ocean I couldn't update one page. It worked out everywhere else for me though!
If it's the code not updating in the guide after you've changed it in Git, I have a trick for that.
No it was one page in the guide that refused to update. The code on Github is good to go.
OK, sometimes Learn gets a little stuck.
I couldn't add the embedded link and delete the inline code, it hung and refused to update.
yes, sorry, that's frustrating
usually works a few minutes later.
Say, do you have time for another UFO question?
Sure!
UFO and sharks with 
OK, first of all thank you and everyone working on express! everything is working as I'd hoped.
I'm so glad!
@idle owl I love that you did PRs for the Key of Lime code
now, I want to know how feasible it is to play audio while still checking acclerometer and adjusting the colors of the NeoPixels. Currently I play the sounds and everthing else is on hold.
@slender iron lol π
@split ocean We talked about this yesterday! As it is, no it's not possible, unfortunately. It's something we want to add to it, but it's not included right now.
LOL, we did? Ha!
@split ocean No I mean Scott and I did
Nope! Not yet, anyway
OK, no problem, I have what I need to make it fun
I'm glad! Being able to do things at the same time is on the list, but as it was, it didn't work very well and allowed for a lot of weirdness with the sound. So we wanted to get that out first!
I dig it. I may just play the sound under a particular condition, like a large change in the accel readings so it only plays sometimes, but most of the time it's quickly responsive colors
Got ya!
@split ocean perhaps you start to hack remote controlled air shark with Circuitpython
yasss!
Make sure you put a laser on it's head. The FAA won't certify it without it. ;P
@slender iron seems much happier on external power with JLink - even workin inOzone now!! Just wish I knoew how to use it π - Out of time for now will resume later or tomorrw - Thanks for the help- and the board!
@solar whale Have a good one!
@idle owl you too! thanks for the help
Yeah for sure!
quick release it. no testing needed
Just a quick update, it's looking like this is a hardware thing. My other ESP flashes fine. This one keeps geting wdt resets every few seconds as it tries to execute code no matter what I use to program it. It did the same thing in the arduino IDE when doing example sketches. It could do a simple serial.print and delay just fine, but anything more intensive just kicked it back to reset.
Anyway, just thought I'd update. Thanks again for the help.
Thanks for the update! Sorry to hear it might be hardware...
@floral dagger Given it's the ESP, I'm assuming you have nothing connected to any of the other pins?
I had a boatload of issues where stuff wasn't working because I had something weird hooked up to one of the boot pins
yeah, @cunning crypt just the bare feather hooked to a powered USB hub. Oh well, these things happen I guess
@floral dagger I think you can get it replaced.
@idle owl here's an alternate path of inquiry re: UFO sounds...
@split ocean Yah?
Limor mentioned that maybe play_tone would be a good choice
is that integrated in express already?
Yep!
theremin-like sounds would be great for UFO
she said simpleio had it, but i would love to use it from express if that's there
play_tone which asks for the frequency and a duration in seconds.
There's also start_tone and stop_tone which allow for things like the tone piano where it plays for the duration of a random-length trigger event like a button being pressed or touch pad being touched.
I'm not sure if it works the same as in simpleio though, I'd have to look
One of those should though
yeah, i worry that if i have both libraries I could run into similar conflicts as before as far as pins being grabbed for speaker
OK, I'll try that, is there any usage example code you know of?
Yep, there's the code on ReadTheDocs. Oh! And my guide! lol
sweet!
Checking it against simpleio now.
Hmm. Not finding any examples for how it works in simpleio.
How do you want to use it?
@split ocean https://learn.adafruit.com/circuit-playground-express-piano-in-the-key-of-lime/touch-tone#make-some-noise
Use tones to make the same noise as ufoup.wav?
your guide looks great, I'll try playing around with that
Thanks!!
kewl
thx
I may get fancy and play that ufoUp.wav under some condition and tones the rest of the time
Nice!
but can do just tones if that gets outta hand
I need to get some shark tunes
as circuitpython play shark tune when shark is closing or in the area
du-Nuh du-Nuh du-na-du-na-du-na-du-na Du-Nah!
even the shark is mixed reality one and moving in wifi network area inside the house
or air shark with circuitpython controls
@floral dagger thanks for the report. Sorry it sounds like HW but that does seem to be the simplest explanation.
May I ask why we're comparing circular circuit boards to limes?
It wasn't a comparison. It was a reference to a new learn guide. π
And it somehow involves green, sweet versions of lemons?
Looks like you've got a bit of lime buildup. You should look into some de-liming solutions
Yep! They're used for capacitive touch. https://learn.adafruit.com/circuit-playground-express-piano-in-the-key-of-lime/overview
Oh cool.
@solar whale FYI I'll be using the jlink stuuff on linux. I have it installed and connecting to my SAME54 board.
@umbral dagger it looks like I was having problems with power. Worked better with external power. With that the JLink was able to communicate with it via Gdb or ozone. Just getting started. Lots to learn.
I have the "debug usb" connected to a powered hub as well as the swd connector to the j-link.
Iβm using a powered usb hub for JLink and samd51 board so Iβm not sure what the problem is.
Same... different board currently, though. I have a SAME54 Xplained board from Microchip that I'm poking at.
Metro m4 has a barrel connector so I used a 9v supply and all seems to work.
My SAMD51 board won't arrive until Monday.
I wonβt get back to it until tomorrow.
@solar whale Yeah, that would seem to be the best solution.... now do I have a spare outlet near enough for a wall wart?
@silent radish good luck. Looking forward to playing with this board. I am new to JLink so much to learn.
Mine will arrive after you guys figure everything out π
@formal plover no fear of that!
Haha I'm only kidding. Mine is stuck in limbo right now. I'll help when it arrives
@solar whale New to the jlink.. same.
I have a jlink in with it as well
I ordered a j-link earlier to use with the SAME54Xplained board, before being drafted/honoured... so I have the weekend to get up to speed. My Sunday was goign to be busy but that got moved to Monday.
It's a P20 chip... so maxed out memory and all the I/O π
@slender iron I'm looking at metro_m4_express/mpconfigboard.h ...it includes internal_flash.h as expected, but also has SPI_FLASH defines. Leftovers?
@umbral dagger just hasn't been updated because we haven't added spi support
the board has spi flash, we just don't use it yet
got it
@slender iron Where are the adaFruit developer guides for Circuit Python?
what are you looking for? the build guides may be under micropython still
I don't know just generally what are the standards. Especially interested in SamD21 / D51
I am reading a "Design" book by the chief of IBM os/360 and was looking for what AdaFruit Standards are set out , where, and how?
I don't know what you mean by standards
a link in CONTRIBUTING covers it. i think. https://github.com/micropython/micropython/wiki/ContributorGuidelines
How is it looking going forward for SamD51?
Great! I have used TI Tiva C LaunchPad for developing in Keil uVision. So I have a little familiar with Arm Cortex M4 internals.
awesome!
Do you enjoy digging in the several thousand page tech. ref. for the SamD51?
I do π
What tools do you use to develop your code?
arm gcc and atom
you must be one of the top people in the field , I am honored to get to know you.
That is a real inspiration. Best of Luck and Make IT Awesome. π
thanks! let me know if you want to get into circuitpython dev. I'd be happy to help get you set up
Yes, sir. I am dipping my toe in after a little while.
Wheeee! Got the Metro M4 Express today! Now trying to figure out how to get CP onto it. Got the JLink Mini updated and working (at least with the GDB server). Kind of fumbling along, but happy to be tinkering. I'm making a OneNote page with my notes, which I'll share if anyone is interested. They differ in subtle ways from LadyAda's M0 instructions....
Just a sanity check h ere. Is it true that I can't load the Metro M4 using the usual methods? It doesn't show up as a mass storage device, so I can't just drop the UF2 image onto it. But bossac doesn't find the device, either. I'd be a bit surprised if I have to build CP from source in order to install it....
@drowsy geyser you need to update bossa https://github.com/adafruit/BOSSA/tree/adafruit_17_10_19. . Use the Arduino branch. I went through this a few hours ago π
Thank you!!!! I'll go do that now...
Good luck!
If you scroll back about 12 hours you will see my fumbling intro to the M4.
Thanks, @solar whale . The Bossa update fails since I'm on Windows 10, not a Mac. I tried building from source, but that didn't work because of an include file error. I guess I'll try to figure out how to install it on Windows 10....
Hmm. I was able to build it on a Linux box.
It's late. I'll sleep on it. π
Ok, I gave up on Windows. I connected the M4 to a Raspberry Pi, installed bossa latest from apt, then built the adafruit/bossa/arduino branch. When I run it, I get the "SAM-BA failed" error message. Yes, I put it in the bootloader. I do notice, though that as soon as I run bossac all four LEDs on the M4 come on solid (green, two amber, and red). I also tried running as root (no difference) and re-running bossac without touching the board (no difference). Any ideas?
Well that's interesting. If I run it without putting the board in the bootloader, I get a different error ("device unsupported")
Now trying different permutations of attempts. Still getting the "SAM-BA operation failed" message.
@drowsy geyser I got the SAM-BA error when I built the wrong release of Bossa You should use the Arduino Branch, not Master.
@drowsy geyser never mind. I missed that you did build the correct one. Sorry.
No worries, @solar whale . π
My weekend plans changed and so I am able to devote time to getting up to speed on jlink and M4. Goal is to be comfortable with it by Monday when the Metro shows up.
Good luck - I am having mixed results - I often get itno a sitiuation where Jlink cannot communtcate with the board. Eventually I get it back, but I have not found a reproducible sequence yet.
I started working on the board files for the SAME54Xplained board last night and am getting errors building CP during the gen phase. For any board.
That started happening after pulling the latest off master.
Iβm wondering if my GCC install got updated without me noticing.
That would be highly unlikely, and unlikely to have a breaking change like this.
did you do the git submodule update --init --recursive to get all udates in place after pulling the master?
OK. fresh clone from master, did the above. I get:
cc1: error: -Werror=lto-type-mismatch: no option -Wlto-type-mismatch
../py/mkrules.mk:79: recipe for target 'build-feather_m0_basic/genhdr/qstr.i.last' failed
make: *** [build-feather_m0_basic/genhdr/qstr.i.last] Error 1
make: *** Deleting file 'build-feather_m0_basic/genhdr/qstr.i.last'
where ... is many of that error.
I'm running ubuntu 17.04 and this worked fine with the early 2.0 release.
@umbral dagger maybe it's because Halloween approaches, but when you say "fresh clone from master" I imagine a conversation between Igor and his pet cat in Dr. Frankenstein's laboratory. β
@split ocean I like that
one other suggestin - did you do make clean first?
yes.
If I checkout the 2.x branch, it all works fine.
(building, and installing the resulting uf2 to, in this case, a feather_m0_express
odd - works on ubuntu 16.04 for me
gcc version?
arm gcc 6.3.1
if you have fall creators update in windows 10 if you want linux terminal you can install it from store so it kinda make it easier than go to enable WSL
I'm running 6.3.0.... seems unlikely that such a minor bump would be responsible... but I'll update
@sick creek I don't use windows
@split ocean you have Frankenstein Labaratory
@solar whale OK.. I installed the lastest arm toolchain from the arm site... it's building master now
@solar whale And still builds a 2.x that works fine π
Goal #1 for today is to get a PR in for my 8Mbyte featherM0
@drowsy geyser did you get it going?
@umbral dagger I try to stay up to date with the latest arm gcc
@slender iron Nope. No matter what I try I get the SAM-BA operation failed error...
@slender iron It's a good plan π
@drowsy geyser are you building it yourself?
CP? No, I'm using the image from the AWS S3 location. Bossac? Yes, I built it off the Arduino branch of your GitHub repo.
arduino from here: https://github.com/adafruit/BOSSA/releases/tag/adafruit_17_10_19 ?
Oops. Nope. Downloading now....
yeah, if its my personal repo I make no promises
dean was the one who fixed up bossa
It's compiling now. We'll see how it goes. π
π€
Interesting. Same failure.
have you doubletapped to get into the bootloader?
Hmm
@slender iron I moved back to Windows with the pre-compiled bossac and WIN! I have a running M4!
π
Three hours to Formula 1 qualifying! Good amount of time to get some testing done!
I have hockey
@drowsy geyser Way to go!
@idle owl Scott gets the credit. π
He had to help me a ton too. π
yeah, bossa is a bit finnicky
I'm torn between working on my toaster oven and trying to wrap up the uf2 bootloader
I got it communicating and everything but the flash was wrong
bossa toaster
The toaster oven would probably be more fun....
Is anyone else running jlink on MacOS? Besides Scott
@slender iron it'll be a nice break too
@idle owl I'm running linux... might be a similar experience.
@umbral dagger Did you install the Segger software pack or are you running it from commandline?
Segger from cmd line
Do I need to install the software pack first for the commandline tools to be there? Or are there packages for it
They had .debs for ubuntu
Hmm ok
@idle owl I just download and install the pack off of their website
@slender iron Ok thank you
@slender iron I am definatley having issues with the master build - it works sometimes but eventually the USB system on my linux box stops recognizing either the metro_m4 or the Jlink. I also ran into some similar problems on a metro_m0 build (at least i think so) but if its the same USB stuff taht mya be why. I end up rebooting my host system an it is OK again for awhile. I 'm sorry I don't have a clear reprducible case. I won't be able do do much more today but I'll keep at it as I can
@drowsy geyser sorry - I think I gave you the wrong BOSSA link.
Pretty sure I simply don't have the knowledge level to understand what to do with the j-link. I at least got the software installed, and I think I updated the firmware.
@idle owl have you looked at this guide? https://learn.adafruit.com/debugging-the-samd21-with-gdb/setup?view=all also I have found the Ozone tool from Jlink to work well so far.
Do yo have the mini or the "full sized" version.
@slender iron Do you have to enter bootloader when you want to download via the Jlink?
@idle owl have you gotten the cble attached correctly? not obvious how to attach to mini
No idea, might be wrong. I assumed it attached so the cable pointed away from the USB end.
actually no - not as I have it - the small tab goes away from the USB.
So if I laid them flat, the cable would be running over the USB?
yes
Ok so I had that wrong π
Yeah that's how I have it now, thank you for the picture! Clears that right up.
I'm running through the software installation command line stuff in the guide
Good luck!
one day the manufacturers of those things will actually figure out what those small tabs are for
teh metro_M4 and M0 express have keyed connectors - taht helps!
so does the bigger Jlink adapter board. j
Right I'm seeing that. The little one just has pins.
Based on my experience at Steelseries (not what we were doing) the general state of embedded dev seems pretty antiquated.
Hmm I sort of got further...
Communities/companies like Arduino & Adafruit are changing that.
well, those programmers are really just generic stm32 boards
in fancy boxes
as soon as open source firmware for them matures, there will be no reason to charge $300 for them
@idle owl as I look at it also make sure the red wire is on the same side as in my picture.
It is
ok - did you get gdb server to talk to connect to it?
I'm sorry - I will have to go offline in a fw minutes- wish I could stay to help - good luck
Jerry you donβt need to be in the bootloader for the jlink to connect
@solar whale Thank you for your help! I'll keep at it
@slender iron even to download an image to it?
@solar whale It's getting far enough along to tell me it can't halt the CPU, so I'm much further than I was.
Nope. It works through the chip debug circuitry
Not able to halt is a separate thing. I had to use a hacked arduino zero to recover mine. Do you have circuitpython on it @idle owl ?
I do. It's still flashed from yesterday and blinky still works. I'm doing this because I wanted to learn more about the jlink.
Sometimes it seemed like I could get out of that by entering boot loader. That is why I asked
I'm not even sure what it does. I assumed I could get it to show me some data from the board.
That can happen if pin states are changed or something. Usually if itβs working then Itβs ok.
@slender iron how would I got about debugging an issue with the haxpress boards (trinket's mcu + flash) where it reboots into "safe mode"?
@stuck elbow do you have a debugger? If so, you can break on the hardfault handler
I only have the stlink working, the jlink clones I have refuse to work
not sure if stlink can debug over swd
Slowly making prgress with jlink/gdb
@umbral dagger I have a patch for the lto warning building master. Are you still having trouble?
It's very simple.
I bet stlink would work @stuck elbow
I need to try
@tulip sleet I'm good. Upgrading to the latest GCC toolchain from ARM fixed all my troubles.
Taking a break from jlink and working on a writeup for the DotStar FeatherWing CircuitPython library I wrote.
Which naturally means I realize there are useful features it's missing π
I want to port the Arduino midi note library eventually. So you can have little simple songs play from a piezo. Similar to the notes used in the guide @idle owl's key of lime guide.
isn't that just a bunch of constants for the frequencies?
@stuck elbow basically. Like this note equals this frequency
Yep
And then play a c d d etcetera etcetera
have you seen https://github.com/adafruit/Adafruit_CircuitPython_RTTTL ?