#circuitpython-dev
1 messages Β· Page 112 of 1
@slender iron I'm trying ot use the PA00 and PA01 pins for something other than the APA LED, is it enough for me to remove the HW_APA102 defines from mpconfigboard.h?
because I suspect that this might be crashing it...
@stuck elbow I think so. Check the list of pins that don't get reset in that file as well
I was wondering what the MICROPY_PORT_A was for
there is one more possibility -- that there is some bug on deinit of spi that makes it crash when a soft reset happens during an spi transfer...
I will test it on a normal trinket m0 to make sure
bugs are possible π
huzzah update 2...it works....sort of? So I decided to put it on a bread board and manually pull the pins to the proper values to try and see if that would stop it rebooting. As I was getting some resistors I glanced over and noticed it seemed to be running fine. Checked it out, and sure enough it's good.. BUT whenever it is removed from the breadboard it starts the reboot cycle again.
@floral dagger hmm interesting
I'm slightly confused lol
That is odd
Confused is a correct response
I just soldered headers onto my Huzzah, haven't tried to flash it yet.
Mines been on a breadboard since day one. I still have 2.0 on it.
@floral dagger Maybe there's stray solder or something up under the pins that's bridging something but when it's in the breadboard it's forced to be straighter so it works?... I'm reaching here, but it doesn't make sense to begin with.
maybe @idle owl. I even thought maybe the pins are somehow floating and there's just enough capacitance/resistance in the breadboard to stabilize it.
Exactly, something like that.
@slender iron the bug is the gamepad module
@slender iron is there some way for me to run some code before shutdown?
@slender iron to disable key scanning
I swear, I end up with the weirdest issues sometimes
@stuck elbow ah, on reload? its common for implementations to add a reset_* method that gets run when the port resets
looks for reset_all_pins as an example
thanks
Look at that, @floral dagger has a photo now!
no problem @stuck elbow
π
@formal plover Yeah.. I didn't recognise him.
@slender iron it should go to master, or also to 2.x?
both?
ok
If a soft reset happens while the gamepad module is scanning for button
presses, there is a moment when the pins get de-initialized, but the
gamepad module is still trying to read them, which ends in a crash.
We can avoid it by disabling scanning on reset.
If a soft reset happens while the gamepad module is scanning for button
presses, there is a moment when the pins get de-initialized, but the
gamepad module is still trying to read them, which ends in a crash.
We can avoid it by disabling scanning on reset.
(cherry picked from commit 470a23d4c9345785bbaa830fdc036b4e982496c6)
Conflicts:
atmel-samd/main.c
@slender iron that part with resets is commented out in master currently, so I added the code as commented
Another silly question, I guess. Is there a 3.0beta library bundle? Or is "latest" ok?
(I ask 'cause busio has gone away and I need to instantiate an I2C device....)
LOL. NM. I'm RTFMing. π
@drowsy geyser π
@idle owl Yeah, but I think I still need busio, but it isn't in the 3.0beta for the M4.... I'm not sure how to get it. Still looking.
(I'm starting out by testing the si7021 sensor)
@drowsy geyser Hmm, yeah. I'm not sure either. Is it adafruit_bus_device or is that different?
No, that just has the i2c_device interface.
Ah
It looks like you need to do something like i2c = busio.I2C(board.SCL, board.SDA) and then initialize it with the i2c_device....
The interface definitely seems to have changed, though.
Could be it's not included yet? I'm not entirely sure how all of that works so it's only conjecture.
Could be. I'll ask Scott when he's done gaming.
As in I'm not even sure it can be not-included.
Yes, I'm not sure either.
I'm wondering if it's pin mapping. I know the dir(board) shows some weird stuff. But that seemed more like a REPL issue.
But I also have no idea how that works.
I don't think so. I get a no such module error when I try to import busio
Ah
@drowsy geyser what board are you using?
Metro M4 Express.
LOL!!!!
That doesn't have spi yet either
Ahhhh, ok.
@drowsy geyser I think you will find 3.0 has fairly minimal library support at this time.
I have confirmed that configuring a JLink for samd51 and then trying to use it in a samd21 does not work π even if you try repeatedly!
I never really got it working, but that's good to know since I might have tried going to the Metro M0 to try it.
I wanted to try it with a 2.1 build on metro M0 just to confirm it was all working. It is if configured correctly!
When misconfigured I had a lot of βcanβt haltβ errors
That's as far as I could get. What command do you use to start it?
Hey I got my OLED Featherwing working on CircuitPython!
hey folks. Trying to use neopixels w/2.1, and I keep getting this errorTraceback (most recent call last): File "<stdin>", line 1, in <module> File "/lib/neopixel.py", line 75, in __init__ TypeError: Expected a Pin
Code:```from machine import Pin
from neopixel import NeoPixel
pin = Pin(2, Pin.OUT)
np = NeoPixel(pin, 1)```
Any thoughts on what I may be doing incorrectly?
esp8266
@floral dagger use digitalio not machine. This changed with 2.1 to use the new library
ahhhh...ok. I'll give that a try then. Thanks @solar whale
I must have the wrong neopixel library then. I had to go look for one since it doesn't load from the bundle
Are you using the new bundle?
yeah, just downloaded it a little whileago
adafruit-circuitpython-bundle-2.1.0-20171019
It has neopixel
If I remove the one I uploaded, I get this ```from neopixel import NeoPixel
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: no module named 'neopixel'
Did you upload lib/neopixel.mpy from bundle?
There is no βbuilt in β neopixel now
Hmm. I did not think it would fit.
ampy --port COM12 put C:\Users\tbrad\Documents\Repos\adafruit-circuitpython-bundle-210/lib /lib
just noticed the wonky slashes..oops
weird...you're right. Looks like it just created the directory structure but didn't upload the files
got that sorted, but it still throws the "expected a Pin error"
huh???
not sure waht I said
post your code
the language bot is in a bad mood π
lol
import board
np = NeoPixel(board.GPIO2, 1)
np[0] = (255, 255, 255)
np.write() ```
I changed it to that, and that seems to run, but I may need to double check my wiring. Not getting any output on the pixel
that should work
the default is autowrite=True so you don't really neeed the np.write() either.
oh...that's handy. I'm sure I'm overlooking something dead simple. Thanks @solar whale
good luck!
it is working, but it's only writing the first value np[0] = (255, 255, 255) np[0] = (255, 0, 255) np[0] = (255, 255, 0) all give red, for example
np[0] = (0, 255, 0) ``` green
odd - just a minute, I'll hook mine up
ok, maybe I just got some crappy LEDs. at 255 red is all that I see. If Idrop it to 100 or so, green start to show as well
odd - you can try setting the "brightness" to < 1 np=NeoPixel(board.GPIO2,1,brightness=.5)
works OK on my "jewel" 7 pixel board (255,0,0) is red (0,255,0) is green
@solar whale Ok, thanks!
@drowsy geyser I think we need to be patient with 3.0 ... especially on the M4!
right, @solar whale that works fine, but for me (255,255,0) is also (mostly) red
@floral dagger its bright yellow almost white on mine
Yeah, it's probably just down to my LED
lol remember how I saidit was probably something stupid?
GPIO2 has a 10K pullup on it - I am using GPIO15 - may be an issue.
it was....I had a resistor in the wrong spot. It was on the 5v pin instead of the gpio
@solar whale Well, PhilT, Limor, and Scott wanted me to help test things, so I was starting with sensor I thought were done. I'll go back to more basic circuits and make sure they work first....
pullups shouldnt mattter for the control line
5v
@drowsy geyser sorry - I did not mean to discourage testing and reporting problems.
I think I was just dropping the current too much going in, so once it passed over the first color there wasn't much left to power the rest.
I am just using 3.3 for my tests - since the GOIP pin is 3.3 - yo may get beter results using 3.3 for power . If yo want to use 5V tehn oyu may need to level shif the GPIO to 5V as well.
@solar whale Oh, no, I didn't take it that way! I guess I thought it was farther along than it is. Which is no problem. I'll work on more basic programs and work my way up from there. π
I have a NeoPixel ring I'll test with my HUZZAH tomorrow @solar whale @floral dagger
it's working now @formal plover the error appears to have been sitting at the keyboard.
Scott's working on his toaster right now, but when he starts up again, there's no telling how far it'll go in one session @drowsy geyser
I gotcha @floral dagger sounds like working-ish
Nepixel "should" be at 5V but you can get away with 3.3 but I think it best to be consistent if 5V power then shift GPIO to 5V as well.
What was the error @floral dagger
I was π
@solar whale What command are you using to get the j-link started?
I was the error. I placed the resistor on the 5v line instead of on the gpio input
@formal plover I thought he was gaming. But toastering is just as good. π No rush. I know there's plenty to work on!
Oh yeah, I believe you're correct on that @drowsy geyser. Same thing though, lol he'll crank out some crazy progress when he starts on it again.
@drowsy geyser Yeah getting blinky working was a huge deal, lol. One mountain at a time.
@idle owl Mostly, I have been using teh Ozone tool, but I did get it to work with gdb using JLinkGDBServer -if SWD -device ATSAMD51J19
what did you see?
I mean looking at even getting it.
@idle owl I got the GDB server running using the GUI....
I'm on MacOS... I have a Windows machine and I tried the GDB server on that too, and it failed, although I'm not sure I used the right settings
Ozone exists for Mac. I'm going to at least try it
Ahhhhhhh, MacOS. Ok. That's different.
Yep
If you go back to Windows I can give you the settings that worked for me.
Just let me know if you want them.
In the meantime, so I could have a success for the day, I got my OLED featherwing working on my Feather M0 Express with CP 2.1. Used a Feather Doubler. So successful soldering today as well.
@drowsy geyser If Ozone doesn't get me further on Mac, then I'll be asking for the settings.
Ok, any time. I'll probably be up for a while. π
I'm 3 hours ahead of you as well π
Oh that's right. I forgot about that. π
Ok, so Ozone wants Target Interface, Target Interface Speed (MHz)
I'm assuming JTAG is correct, what speed should it be? It defaults to 1MHz
No wait, should it be SWD?
The target interface I mean
@drowsy geyser Does any of this sound like settings you needed to use?
Thank you!
Connection to Jlink: USB
Got that
1000 Khz
Ok keen
As soon as it connected to the JLink it updated firmware and then was ready to go.
Oh hmm. It's asking for a Program File (Choose the program to be debugged) and it opens an explorer window...
Yes, that's where I stopped. It wants the CP .elf file with the debugging symbols included. I didn't proceed because I hadn't compiled CP myself.
Oh. Neither have I, that's for sure. Mine says binary file is an option, hmm...
Oh, try it. I didn't get that option.
Yeah about to!
Nope, the software hangs. It never leaves the new project window and won't let me click on anything in the actual software window. No target connection.
Owait.
waiting
Oh snap! Ok, so I closed the new project window manually, x-ed it from the top corner. Then I was able to click "Load" on the window offering to load the .bin file I chose. Then nothing happened. So I looked and there was a power-icon button on the top left corner, that said something about connecting and loading, so I clicked it. It did some Things!
COOL!!!
Still getting the same error as I did from GDB server though, where it's failing to halt.
But It did a lot more than GDB server did. Looks like it tried some different things?
Do you have a breakpoint set?
It at least thinks it has a target connection, GDB was never able to get that
No idea, so probably not
I'm totally new to this, have no idea what I'm doing
But it sounds like you're making a lot of progress!
That's ok, the last time I really used gdb was 1994 when I was using it to debug a running UNIX (BSD 4.2 Reno) kernel on a dual VAX-11/780.
Nice!
It was, until I wrote 8 bytes into the wrong memory location. It stayed up.... for a few seconds. π
That's a lot of years of rust I'm going to have to knock off.
So there's memory information, there's Disassembly information, Registers, and Console. Console says the same errors I got from GDB at the end, but it tried a bunch more stuff before giving those errors.
I assumed that the j-link could give me some data from the board, and that was my goal today was to get some data.
That's progress!
The dialog for the power-icon button is exactly: "Download and Reset Program"
I ended the debug session to get back to the start state.
And if I power the M4 off and on again, blinky is still happy!
So I didn't also break it in the process, which I was fairly certain was a potential outcome.
Are you blinking the D13 LED, or the NeoPixel?
D13. I can't figure out what pin the NeoPixel is. I tried a few things and it didn't work, so I stuck with D13.
I think the NeoPixel is predefined as board.NEOPIXEL. I could be mis-remembering, though.
It returns PAXX is in use... XX being some number I can't remember from yesterday.
So it might be board.NEOPIXEL but it's not working at the moment
Ok, good to know. I'm going to get blink working tonight, and then try the neopixel.
Ithere is a NEOPIXEL define in pins.c so it may work - I have not trield uploading the libraries yet.
I manged to get it working via gdb, but not without a fair amount of failing around....
What is breakpoint? I just right clicked on a blank part of the app and it offered Set Breakpoint
you can force the code to stop at a specied point in the code so you can examine that state of things.
A breakpoint is an instruction where the debugger will halt the program.
Ah
You can then print variable values, read (or change) registers, etc.
Yu really need a "special" version compiled with DEBUG =1 to be able to use many of the debugger tools.
True that. What @solar whale said.
So goal accomplished!
Thank you guys so much for the help, I was floundering blind with this one.
If yo have it set up right - you can see the source code and step though it line by line - very nice...
Neat!
Interesting. My NeoPixel was on but I disconnected the board to put it in a case. Now the NeoPixel is off.
So I'm powering the M4 off USB, is that part of the issue?
We were going to try to find a 9v adapter around here somewhere tomorrow because I seemed to remember someone mentioning power issues.
Mine did not look like that lol.
That's awesome! I love graphical debuggers!
Tis is Ozone from Jlink - Just getting used to it - lots to learn
@drowsy geyser I specifically meant my Ozone window didn't look like that. Not nearly that much info.
That's the same app I used tonight.
@idle owl I am using the 9V and USB - and sometime I have to disconnect th USB to get JLink to connect - still not sure what is goin on. BTW - I switched over to using my MAC for this and so far so good. I kept hainging up my Linux box. It si not happy with the USB.
Ah, yeah unhappy USB will cause issues
If you have not built the image locally, yo wont see the source code.
one step at at time!
Well I got through this step, so that can be the next one
Btw, it offered to update the firmware when I first plugged it into Windows, and I said no because I wasn't sure if it would cause issues on the Mac. After not being able to get it to work on the Mac (so many reasons earlier, @solar whale you solved a lot of those then), I plugged it into Windows again, but when I opened the app to udpate the firmware, I had to do it manually and it said it was already up to date. It says it was compiled 6 October 2017 at 16:39. Did it get updated?
@idle owl I'm not sure - I have seen it update when I first connect, but have not paid much attention. I don't think it will matter where you update since the firware is in the JLink and it should work with both Windows and MACOS.
Sorry I should have been clearer. Can you check your firmware so I can compare?
And the more I thought about it, the more I realised, obviously it doesn't matter where you update the firmware, it's irrelevant to what you're connecting it to.
segger updates the tools often - oh ok - how do you check it?
When I ran the GDB command line thing, it showed it (even though it didn't finish connecting to the target)
J-Link is connected.
Firmware: J-Link EDU Mini V1 compiled Oct 6 2017 16:39:00
Hardware: V1.00```
Firmware: J-Link EDU Mini V1 compiled Oct 6 2017 16:39:00
@idle owl you are very welcome!
@drowsy geyser thanks for your help too! Looking forward to working with this board.
Earlier I was able to get to the serial connection on the M4 and then get to the REPL. Now, it goes to the serial connection, it works (I can put a print statement in code.py and it prints), but it won't let me get to the REPL. I thought it might be because of the j-link cable so I disconnected it completely but nothing changed. Odd.
Yep tried that
It's not registering any input
Already reset and reconnected it
Also if I save the code.py file, it reloads the serial connection, so that seems to be working fine
did it come back?
Yeah after I reconnected to the serial connection
alls well that ends well π
No I meant it came back up. It's still not accepting input or letting me get to the REPL
Ozone is pretty sweet
oh - I'll admit I have had some odd issued with my serial connections - are you using scree to /dev/tty.usbmodemxxxx
Yeah
I have it connecting to the SAME54 board
I'm wondering if I messed something up with all the j-link attempts.
And need to reflash it.
hard to say, but it won't hurt - still if you are gettin goutput, I suspect it is working OK. I'm still not srue about the whole USB connection and how the host computers deal with it. I had to reboot by linux machine often to get it to work properly.
If it is not too painful try rebooting your Mac to see if that clears of the comm ports
I think I 've had enough fun for tonight - - good night - I hope you get the REPL back @idle owl
@solar whale Thanks for all your help! Have a good one!
Took most of the day to get everything going, but I finally have a convincing neopixel candle running on circuit python woot!
nice!
woo
hey kattni, i'm around if you need any m4 help
i can also get you set it up with it on arduino if you are interested
(there's a ton more you can do w/th eboard using arduino)
Nice! Thanks for letting me know!
im going to work on writing a device driver, this will be the first time i write a driver in python before i write it in arduino
oh keen! I've never written a driver in either
tony wrote a great driver guide
so im going to follow that
also its good practice for me, and will be faster than 'duino
bonus on all counts
I'm currently writing cpx library examples of the code in the Introduction to CPX Guide you and JP wrote
ow
er wow
hopefully not ow
thats awesome, its a good way to check that everything works
π
π
There's no equivalent to analog in/out in the API, but I have examples written up for everything else up to NeoPixel. Your NeoPixel example is entirely more invovled than the CPX NeoPixel API can do. I'm trying to figure out what I want to do with the example for that.
can you expose the neopixels as a member of the cpx object?
No, if I understand the question
huh really, thats odd
I might not understand the question
in c++ you can just make an instance of the NeoPixel object a member of the parent class in a 'public' manner
then its basically identical to the neopixel object
just pre-instantiated
in the express class it's ._pixels which I think means it can't be exposed in the code? Or am I way off here
Hey I got one simple circle to work though!
Will do, thanks!
thank you, you too! π
@meager fog Thank you (and Phil) for the M4. I hope I can do enough with it to justify it! π
@meager fog what @drowsy geyser said
Woohoo! Blink works on D13. (It's the little things in life sometimes.) π
I left it going because it's so satisfying to have it work!
I was planning to do that, too, @idle owl !!!
yay thanks folks - your help will be awesome as we start rolling out updates!
@meager fog I'm just happy to give back to you and the community!
@idle owl It looks like neopixel_write hasn't been ported to 3.0/M4 yet. If I try to import neopixel it throws an error. I guess tomorrow I set up the build toolchain so I can compile CP myself and then start looking at how hard it would be to get the NeoPixel support working.
@drowsy geyser I noticed the same thing. That's what I was trying to do with the REPL when I realised I had lost it
Ahhh, I see.
scampers off to see if his REPL is still working.
Oh yeah, we're good.
@drowsy geyser I think I messed with something when I kept trying with the j-link. I reflashed and it fixed it
That's entirely possible!
yay safemode, here's a code snippet. no i should not be trying to read 0 bytes. but it also should not hardfault :D
Adafruit CircuitPython 2.1.0 on 2017-10-17; Adafruit Metro M0 Express with samd21g18
self.sgp_run_profile(["iaq_init", 0x2003, 0, 0.01])
def sgp_run_profile(self, profile):
name, command, signals, delay = profile
print("running profile: %s, command 0x%x, %d, delay %f" % (name, command, signals, delay))
with self._device:
...
@slender iron made a new sensor driver, not too bad, 2 hours to write a fresh driver from datasheet
@meager fog thats awesome! I saw you were doing python to start!
yah mostly me following tony's guide
perfect!
i think once i get the hang of it, it'll be faster than arduino -
i have to do the bme680 - might try doing that in python first too
awesome! I just demoed it to my friend on windows and it went well too
demo'd what, circuitpython or writing driver?
circuitpython
k rad, im done with pcb rev. nite!
good night @meager fog !
It happens every time you use the GamePad class and do a soft reset. Since that is new, nobody has been using it yet.
Oh hey, that Ozone is a nice debugging tool. I wonder what the "evaluation purposes only" restriction interferes with. Is it worth getting the JLink Base in order to have the full version of Ozone available?
@meager fog You mentioned arduino support for the Metro-M4 - If you are looking for additional testers of the Arduino support, I would be happy to check it out.
@drowsy geyser I was wondering about that statement as well. I got the edu-mini partly to eval it with Linux. The propriatariness of Segger bugs me, but if it works well I will likely upgrade to the full/pro version eventually.
@drowsy geyser I do want to get things running with gdb. Thatβs the next step I guess.
@drowsy geyser this helps with gdb setup https://learn.adafruit.com/debugging-the-samd21-with-gdb/setup?view=all
I'll put a warning in the release notes for now, and say it'll be fixed in the next release.
@drowsy geyser gdb from within emacs to be specific.
@umbral dagger ooh - that brings back memories....
@slender iron One interesting thing I have noticed is that when connected to my MAC, I do not see the UNB errors from the Metro-M4 taht I saw on the linux box and raspberry pi. Not sure why but the Mac ssems to be more tolerant of the connection.
took the better part of a day and a half, but now my neopixel pumpkin can be controlled via adafruit io using circuit python 2.1
@slender iron never-mind - spoke too soon - the errors are just different ```HoRNDIS: init: HoRNDIS tethering driver for Mac OS X, by Joshua Wise (rel8 final)
HoRNDIS: probe: probe: came in with a score of 60000
HoRNDIS: probe: probe: this composite device is not for us
AppleUSBInterface: family specific matching fails
AppleUSBInterface: family specific matching fails
AppleUSBInterface: family specific matching fails
AppleUSBInterface: family specific matching fails
USBMSC Identifier (non-unique): 0x239a 0x8015 0x100
AppleUSBInterface: family specific matching fails
@slender iron another observation - When I try to use the J-Link - it sometimes says it can't halt the processor. What I have found to work involves a few steps that may or may not make sense. ```
Disconnect USB - leaving 9V power connected
doubletap reset to enter bootloader
then retry JLink and it is able to connect and halt the processor
I can then reconnect USB and resume
hey @idle owl, have you done any work on tuple for touch yet?
Morning, everyone....
only for 6 more minutes...
@tidal kiln A little. I ended up scramblng to get play_file in and haven't gotten back to it.
@idle owl ok. was hoping to put in some time today on drivers. was thinking of pr'ing that one.
and again I thank you for that @idle owl :)
@split ocean You're welcome!
I may use both play_file and play_tone for the UFO, hoping to finish it up today.
@tidal kiln You're welcome to it if you'd like. I was going to work on that and getting brightness into neopixel today.
@idle owl NeoPixel on 3.0 or NeoPixel on M4, or both?
@drowsy geyser Neither. I'm working on the CPX API
Oh! Ok. I'll just go back to breakfast. π
@idle owl if you've already started on it, no worries then. i'm going to give priority to getting back to the ads1x15 lib anyway.
@tidal kiln Ok sounds good. I'll probably need your help anyway, heh
@split ocean That's awesome!
sure. bug me whenever. happy to help*.
(*if able to)
When someone has a sec, could you shoot me a link to the correct branch/release for CP 3.0 on the M4? I can't seem to "find" it.... I need to figure out how to build my own images.
Those aren't already built?
oops sorry that is the build - just a sec.
lol ok. I was thinking I totally missed something.
π Standing by. Thank you!
you build it fron the Master branch at https://github.com/adafruit/circuitpython with BOARD=metro_M4_express
AH! Enlightenment! Thank you!
<@&370994983664091136> I forgot to mention that using the JLink while connected to USB is a tricky process and can mess with your USB bus. I power my metro separately and have a usb cable I can turn off and on. Once I hit a breakpoint I tend to turn the cable off to keep my computer happy.
I really should have ordered the 9V plug, heh
I wonder if the same thing is true under Linux
@slender iron What USB cable do you use?
I have not had a problem under Windows, but I haven't worked extensively with it, either.
@umbral dagger I think it is - I have had lots of problems under linux.
@idle owl looking now
Thank you
I didn't expect you all to pick up the jlink stuff. π I thought it'd only be for emergency bootloader repair
I thought it was a strong suggestion. π
Really? If you give a nerd a j-link....
yup, my mistake π
here is a similar cable to mine: https://www.adafruit.com/product/3439
Not a mistake - the JLink is way cool....
I haven't actually tested it with my setup though. The cable I have is something I got while at google
His mistake was assuming we wouldn't try to use it.
yeah, having jlink skills is good π
@slender iron Ok thanks
now you could implement busio @drowsy geyser π
True, @slender iron ! I was going to pick on the low-level neopixel support first, though.
I suppose busio would be more helpful.
Oh wow, we have a special group now
@drowsy geyser check with @timber lion he got neopixel going on the 21 again and was gonna look at the 51 once he got it
Will do! Thanks!
Group within a group. It's a groupception
@formal plover Yeah hidden role so we can tag all the testers if needed.
busio is actually pretty tough too
its next on my list once I have the uf2 bootloader going
(thats why you need the jlink, in case I break the bootloader)
Gotcha. Say, off topic, how's the toaster oven?
still in pieces. didn't actually work on it yesterday
Ah, ok.
got a flu shot, shopped for groceris, played PUBG then dinner with a friend
it was good π
π
Excellent!
Life is important.
yup yup, gonna spend an hour or two looking at the bootloader and then head ot the farmers market
I'm trying to erase the flash from the Arduino IDE on a circuit playground express.
When I run "flash_erase.ino
I get hair message.
I get an error message
Sorryβ¦ Dictation software misunderstands me sometimes π
no worries @brisk cairn ! whats the error message say?
Arduino: 1.8.3 (Windows 10), Board: "Adafruit Circuit Playground Express"
flash_erase:33: error: 'SS1' was not declared in this scope
#define FLASH_SS SS1 // Flash chip SS pin.
^
C:\Users\Chris.cy\Documents\Arduino\libraries\Adafruit_SPIFlash\examples\flash_erase\flash_erase.ino:36:25: note: in expansion of macro 'FLASH_SS'
Adafruit_SPIFlash flash(FLASH_SS, &FLASH_SPI_PORT); // Use hardware SPI
^
flash_erase:34: error: 'SPI1' was not declared in this scope
#define FLASH_SPI_PORT SPI1 // What SPI port is Flash on?
^
C:\Users\Chris.cy\Documents\Arduino\libraries\Adafruit_SPIFlash\examples\flash_erase\flash_erase.ino:36:36: note: in expansion of macro 'FLASH_SPI_PORT'
Adafruit_SPIFlash flash(FLASH_SS, &FLASH_SPI_PORT); // Use hardware SPI
^
exit status 1
'SS1' was not declared in this scope
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
I need to know the pin number for the flash_ss
That sketch apparently is defaulted for feather M0
ah, I'm an arduino newbie
I can't believe you are a newbie at anything Scott π
I am at a lot of things. Thats how I can focus on others. π
the pin is PB22 on the mcu
would thsi work better https://github.com/adafruit/Adafruit_SPIFlash/tree/master/examples/flash_erase_express
My original problem is I tried to put Circuit Python 2.1 on a circuit playground experience that was running 1.0 or perhaps even 0.9 something
Try the one @solar whale posted. If you're trying to put CircuitPython on it, that's what you need.
For some reason a control-C would not stop the previous running Circuit Python program. And loading a new code.py had no effect.
I will give that a try.
@brisk cairn with 2.1?
That's right I loaded "adafruit-circuitpython-circuitplayground_express-2.1.0.uf2". A circuit playground express many continued to run an old IRLibcp that I have looted under Circuit Python 0.9.
It would not load any new code. So I figured I needed to switch back to Arduino mode, erase the flash and reformatted, and then reload the 2.1.uf2.
ah ok. yeah, erasing the flash is good way to get back to a known state
which loading an arduino sketch will do. any sketch.
@tidal kiln not for an express board
π
@solar whale heya you around?
@meager fog yes
ok u wanna get arduino m4 going? are you on mac or win or lin?
linux or mac - both available
just installed 1.8.5 is there a + - do I need latest build?
gr8
- make a folder in your ArduinoSketchFolder called "hardware", then make a folder "hardware/Adafruit"
- in "hardware/Adafruit" git clone https://github.com/adafruit/ArduinoCore-samd, and rename the folder "samd"
- Check you now have "ArduinoSketches/hardware/Adafruit/samd/boards.txt"
- git checkout samd51, and check boards.txt contains "# Adafruit Metro M4 (SAMD51)"
on my MAc, my sketches are jus in Arduino - is that OK?
all set in Arduino/hardware/Adafruit/samd
OK - all set to continue
- Now we need to replace CMSIS! Download https://github.com/adafruit/ArduinoModule-CMSIS-Atmel/archive/master.zip and unzip
- Find your Arduino CMSIS, in Mac its "~/Library/Arduino15/packages/arduino/tools/CMSIS-Atmel/1.1.0/CMSIS" version # may vary, you'll need "Go to folder..." feature in the Finder to get to " ~/Library/Arduino15" as it is hidden. In Windows it is "C:\Users\yourusername\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.1.0\CMSIS" Inside is a folder named Device
- Inside the downloaded CMSIS zip, go into the CMSIS-Atmel/CMSIS folder, you should see a folder named Device. DRAG THE DEVICE FOLDER ONLY from the zip to your arduino Library folder so that Device is merged with Device. It will replace a bunch of file.
- You will also need to replace bossac. Go here https://github.com/adafruit/BOSSA/releases and download either windows exe or mac app of latest bossac. unzip
- Replace the binary at "~/Library/Arduino15/packages/arduino/tools/bossac/1.7.0/bossac" or "~\AppData\Local\Arduino15\packages\arduino\tools\bossac\1.7.0\bossac"
its complex because its a whole new arch and Arduino SAM is not easy to update - hopefully we will be able to make it fully a BSP, might require an "Adafruit SAM" package (which i'd like to avoid but...)
That got over my head rather quickly. I've used Arduino once.
now available at https://github.com/adafruit/ArduinoCore-samd/blob/samd51/README.md#installation-on-arduino-ide
its not hard, just...detailed π
I don't want to replace device - but merge files
ok but if I pit it in CMSIS it says one alredy ther OK to replace. Is that OK to do?
ok
but because arduino uses a version # you have to get to the Device subfolder
otherwise you dont do the merge properly
haha! UF2 works!
I think so but I'll probably do it as a PR
totez
OK - all set bossac updated
good work - that was faster than expected!
@solar whale thats it! try Blink π
@slender iron +4000 points to atmel for mostly-keeping-periphs-the-same
wooohoo - giving it a try
yup yup
@slender iron toss me a .bin when ya like and ill update my m4's
@slender iron Yay!
np
Sketch uses 11416 bytes (2%) of program storage space. Maximum is 507904 bytes.
An error occurred while uploading the sketch
No device found on cu.usbmodem142431
am I missing something
turn on verbose upload
ah - I forced it into bootloader (doubletap) and it worked !!
gr8!
it blinkds
huzzah
Thank you - I'll explore
let me know if there are particular things you want tested.
if you want to use the DACs, they are on A0 and A1 but you have to short the jumper underneath the board
the one ad the d in adafruit?
i think peripherals are most useful to test - I2C, SPI, ADC, DACs...I2S isn't ready yet
yah
grab your favorite shield or sensor, check if it works π
great - lots to try.
it is very very fast
neopixel is ported so i know you can try that
the only annoying thing is the flash is so huge, it takes a while longer to upload sketches
because it has to erase the entire chip
I can live with that π
i cant even comprehend when we get to the 1MB flash chip
@slender iron if you get a chance:
https://github.com/caternuson/CircuitPython_ADS1x15/tree/multi
let me know if you think that's going in the right direction
@tidal kiln I'll take a look tomorrow
@meager fog do I need something special for neopixel - I tried strandtest and got``` Users/jerryneedell/Documents/Arduino/libraries/Adafruit_NeoPixel/Adafruit_NeoPixel.cpp: In member function 'void Adafruit_NeoPixel::show()':
/Users/jerryneedell/Documents/Arduino/libraries/Adafruit_NeoPixel/Adafruit_NeoPixel.cpp:1659:3: error: 'Pio' was not declared in this scope
Pio *port;
^
/Users/jerryneedell/Documents/Arduino/libraries/Adafruit_NeoPixel/Adafruit_NeoPixel.cpp:1659:19: error: 'port' was not declared in this scope
Pio *port;
^
/Users/jerryneedell/Documents/Arduino/libraries/Adafruit_NeoPixel/Adafruit_NeoPixel.cpp:1663:29: error: 'pmc_set_writeprotect' was not declared in this scope
pmc_set_writeprotect(false);
^
/Users/jerryneedell/Documents/Arduino/libraries/Adafruit_NeoPixel/Adafruit_NeoPixel.cpp:1664:43: error: 'pmc_enable_periph_clk' was not declared in this scope
pmc_enable_periph_clk((uint32_t)TC3_IRQn);
^
/Users/jerryneedell/Documents/Arduino/libraries/Adafruit_NeoPixel/Adafruit_NeoPixel.cpp:1666:5: error: 'TC_CMR_WAVE' was not declared in this scope
TC_CMR_WAVE | TC_CMR_WAVSEL_UP | TC_CMR_TCCLKS_TIMER_CLOCK1);
^
/Users/jerryneedell/Documents/Arduino/libraries/Adafruit_NeoPixel/Adafruit_NeoPixel.cpp:1666:19: error: 'TC_CMR_WAVSEL_UP' was not declared in this scope
TC_CMR_WAVE | TC_CMR_WAVSEL_UP | TC_CMR_TCCLKS_TIMER_CLOCK1);
^
oh wait i think i didnt bump the version
can you do a git pul from within the adafruit_neopxiel folder
let me know if that works
if it does ill push
sure - - trying it now
er ill do a release
@meager fog want a bin to load with a debugger. I haven't fixed the self update code yet or actually tested bossac though I think it'll work
@meager fog works great!!
@solar whale thank you! i'll push a release. keep on tryin things - if im not here file an issue
that will be the most helpful thing
uf2 for metro m4
use a debugger to load. I'll do the self updater later if I have time
I'll be happy to - Thanks for the help and providing the test board!
my uf2 code changes are here: https://github.com/tannewt/uf2-samd
Woot woot UF2! Nice job @slender iron
thanks! Its very untested still but worth a shot.
@meager fog cool! mcp9808 temp sesnor works fine!
yay
when converting bin to uf2.
@meager fog How do you use j-link? I don't mean that in a general teach me sense, I mean how do you personally use it... commandline or Ozone or whatever else there is...
from within atmel studio
Ah
ah, I'm fixing up the self updater now
We need shirts. "bruh, do you even jlink?"
im in atmel start - not a good way to have a sunday
@slender iron I the new bootloader something we should try? If so - just load via jlink?
so just downlaod that to the board - and cross fingers? any special setup
yup just load it
and then quit out. jlink doesn't like the double tap
it should actually just run the code afterwards I think
Ozone worked for me. loaded and now at METROBOOT!
Oh snap! It claimed it didn't work but it did!
I used the .bin file
It probably didn't claim it didn't work. I'm sure I didn't understand the results.
@solar whale Did you use the .elf or .bin file?
I'm trying to load CP image, ut it is not working - keep rebooting to NETROBOOT
I used .elf
Mine reboots to the bootloader as well.
info_uf2.txt ```UF2 Bootloader v1.23.0 SFHR
Model: Metro M4
Board-ID: SAMD21G19A-Metro-v0
Same.
able to load image via Ozone
I had to fix the uf2 generation too
so the circuitpython uf2s you build are likely wrong
ah
cool - doubletap brings up METROBOOT!
I can't wait for my board to arrive tomorrow... I feel like I'm missing all the fun!
taht UF2 works!!
@slender iron It worked!
Sure
then travis' builds will work
Do I just say tested and works?
and sanity check the makefile changes
Ok
hmm REPL not working for me - won't take input
I think thats a debug build
weird
I think it works for me
is it: Adafruit CircuitPython 3.0.0-alpha.0-25-ga800a25e8-dirty?
reloading
REPL working for me as well
Adafruit CircuitPython 3.0.0-alpha.0-25-ga800a25e8-dirty on 2017-10-20; Metro M4 Express with samd51j19
hapier now
working now
huh, weird that it didn't work before
@slender iron im sorta in jlink hell. sees the chip, cannot halt it
this is why its good to have earlier testers π
oh no! I've been there recetnly @meager fog
do you know what you did?
We all have!!
to get out of it?
to get it to halt yeah
originally? an EDBG
Reviewed makefile changes. Tested bootloader and loaded .uf2 firmware successfully.
did you try to load the bootloader and now it won't halt?
yeah
did you eventually get the jlink to connect to the chip
or is EDBG the only anwer
I did once I loaded the uf2 on it
weird
I'm not sure the arduino bootloader has good clocks
well, its worth having an EDGB - ill gut a zero
@slender iron Do I need to click "review changes" on the file itself and approve it?
yes please
ok
so I'm official π
Got it!
@meager fog I have been able to get out by doubletapping into bootloader then connecting JLink
i was just about to kil this zero
Great!
@meager fog did you have an arduino sketch or circuitpython flashed after the bootloader?
thanks for the review @idle owl now the next uf2 from travis should actually work
@solar whale are you using jlinkexe or something else
I've been using Ozone
@slender iron As in I would be building that myself?
@idle owl if you update to latest master and build it should work too
I've never built anything. So that's something I have to learn. π
ynow
just type make π
why risk it - ill try ozone
That's what I'm using
make BOARD=metro_m4_express from within circuitpython/atmel-samd
Oh. That's easy.
@slender iron success. ozone was key
π
ill test it w/arduino
π€
hmmm - just made new build - - boots to CIRCUITPY, but RELPL not working....
@idle owl yep. once you got a good makefile. tons of magic in there.
it dies and unmounts after a few minutes
@solar whale sounds like its hanging somewhere
are you loading through the debugger?
using the debugger you should be able to get a backtrace to where its stopped
will try
if you are powering separately you'll want ot unplug usb to save your comp from confusion
It is working with Jlink loaded version!
may be issue with UF2 - possible I missed something in the update - will look
say I'm up to date
@solar whale is the jlink loading it at start address 0x4000?
where can I check?
when using gdb it usually status in the status after load
J-Link: J-Link: Flash download: Bank 0 @ 0x00000000: 2 ranges affected (40960 bytes)
disconected Jlink - still boots OK
rebuiling - will try again @idle owl did it work for you?
I haven't tried building one myself yet
not happy with .uf2 files I build.
@slender iron Metro M4 VID 0x239A PID 0x0020 # bossac only bootloader
PID 0x0021 # UF2 bootloader
PID 0x8020 # arduino
PID 0x8021 # circuitpython
fyi π
kk, updated them @meager fog
thanks - it doesnt matter for lin/mac - but windows can srsly fall over if you mix up PIDs with different descriptors. askhowiknow
hrm, thats good to know. I want to support dynamic descriptors at some point...
@slender iron I have to go - social duties!! Hopefully something wrong on my end. I'll try it again later or tomorrow. Great progress today!
@solar whale thanks for your help! have a good one!
No problem - happy to be part of it all.
@meager fog the boot protection hasn't been set on these has it?
π the uf2 self updater unsets it, flashes and sets it
on the 51 it looks cool because you can disable it temporarily
yeah, that makes sense
at some point we want it on though
@meager fog just treid to go back to arduino - bu not able to load - is this a bproblem with tnew bootloader?
yah ^^^
could be @solar whale I haven't tested it with arduino
@solar whale was the bootloader active? did you double tap before uploading?
yes - now won't got to bootloader
is it a bootloader PID issue?
I reloaded bootloader.elf and got back to METROBOOT. I wait for update before trying arduino again.
Got CP 3.0 running again - gotta run - Thanks for all the fun and help. @meager fog let me know if you learn how to get arduino working again
ok - use taht one for arduino
@slender iron i dont hink its a PID or USB issue
then cooking
Sounds delightful
k, dean's help would be appreciated. I want to redo their javascript scripts too
their = uf2 repo
using node js for basic file manipulation is crazy IMO
@slender iron hurry. before all the eggs are sold out.
@slender iron lol - swapping big endian to little endian requires 290 node packages
thats 'correct' bossa output
@slender iron if you pull your changes to our uf2 repo
π
then dean can make changes
i should fastforward it tho, or you can
no rush
do it later π
@slender iron later!
@slender iron we have lots of relatives in town for a cousin's bat mitzvah. I'll be back in the swing of things Monday.
@tulip sleet no worries! Glad you are taking a break on the weekend. π
@split ocean I meant to tell you, I was able to update the last code snippet the next day. So whatever the issue was it finally cleared up. π
@idle owl which issue was that?
@split ocean It wouldn't let me update anything on one page of the guide.
And I was trying to get all the code linked to github
Oh, yes, that. Glad to hear it! This is often the case with odd behavior on guides, they tend to just go away ; )
Every other time it's gone away in minutes though, not hours. So I was concerned π
Or Justin and the gang fix them in the background
Or days, in the end. π But it's fixed!
Woo, picked up a CPE from Micro Center. Later I'll put CP on the CP
Nice! Our Microcenter never carried the Express, just the Classic.
Is arm gcc and atom what I need for esp8266 development on Windows 7?
That's a solid dev combo in general, but I haven't worked specifically with the ESP8266.
Later this week, I'd like some help getting a Git account set up and whatnot so I can help contribute to the low-hanging fruit of CP
Definitely! We'll be around, just ask!
Circuit Python is compiled from C or C++ ?
C
tu
@tidal kiln Touch iteration complete. That was a tough one π For me anyway. I had a lot of help.
@idle owl cool. what was tough about it?
I'm still pretty new to python.
I thought I had it figured out but I didn't understand everything that needed to happen, so I was trying to get my initial code to do it, and I needed a lot more with it.
Learned a lot though! That's what I'm usually hoping for with doing stuff for this library.
Not yet, I'm still cleaning it up. And it needs docs, but I can drop the express to you and explain it before I do all that.
It'll be in my repo first anyway, I have it forked and do pull requests which likely won't be looked at until tomorrow. But I can get it to you before that.
I was able to paste in your examples as is, and they work. I assume as you expected them to. But it required two functions - one for returning numbers, and one for returning the pad name (A1 etc). So cpx.touched works like the first two, but the third one requires, at the moment, cpx.touched_padnames which I want to shorten up.
i was thinking it would just be one or the other
lol!
I did both π
I didn't realise it was an 'or' request. It meant I learned more though! I'm actually laughing out loud over here.
all good. great way to learn. sorry for confusion.
Don't be sorry! Should we go with only one then? In my mind, you had a specific use-case for having them return numbers, but I really like having them return the pad names since it's labeled on the board. That's why I did both.
seems like it's a design decision - so i'd let scott decide
He'll tell us to decide. He's left it almost entirely up to me, and then gives feedback later if I'm way off, which I've been a little off once and that was it.
I think it's a matter of what we want to use
i kind of like the pad names
ok keen
what you see on the board = what you use in code
Yeah that's what I went with previously, I thought it made the most sense
did you use a dictionary at any point?
I don't think so? I can paste what it looks like. Hold on.
k
This is in init: self._pin = (board.A1, board.A2, board.A3, board.A4, board.A5, board.A6, board.A7)and this is the function: def touched(self): self._touch = tuple(touchio.TouchIn(p) for p in self._pin) return ['A{}'.format(i+1) for (i, v) in enumerate(self._touch) if v.value]
There's another one in express right now for numbers, but they're essentially the same
atom says to first download and install MinGW . is that correct? is there an adafruit learn guide?
@hollow tartan a learn guide for installing atom?
I am trying to get started helping fix Circuit Python on Win 7.
have you seen this guide?
https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/overview
this one is also worth reading:
https://learn.adafruit.com/porting-an-arduino-library-to-circuitpython-vl6180x-distance-sensor
@idle owl looks ok. only works with consecutive numbered pins. (classic wasn't like that)
I found a little something: An Introduction to Collaborating with Version Control https://learn.adafruit.com/an-introduction-to-collaborating-with-version-control/publishing-your-repository?view=all
really? i'd think the list would work too.
I'm probably missing what your point was. Did you mean for me to change it to a tuple instead of a list?
Ah ok yeah, then I was saying I changed the [] to () and it seems to work the same.
Riiight.... yeah we talked about that earlier
oh. yeah. they are very similar.
We changed something else from [] to () for the same reason
Ah
() immutable, [] mutable, right?
Although now I feel like I remember there being some [] that were one or the other. That it wasn't so black and white.
>>> foo=[1,2,3]
>>> foo.append(4)
>>> foo
[1, 2, 3, 4]
>>> foo[2]=5
>>> foo
[1, 2, 5, 4]
but try it with a tuple:
>>> foo=(1,2,3)
>>> foo.append(4)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'tuple' object has no attribute 'append'
>>> foo[2]=5
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'tuple' object does not support item assignment
that my thinking at least
No it makes sense. Like I said we changed something else for the same reason, I think we just got onto this and glossed over that detail
that's how i typically make the call, "is this a fixed chunk of info?"
but i'm sure there's more examples of why one vs. the other
This general rule makes sense to me.
another obvious one is when dealing with color, (r,g,b) vs. [r,g,b]
and i mentioned a dictionary, as that could provide a useful tool to map between ints and strings
or anything and anything, really
ah
I've never used one
that I'm aware of anyway. Could have been built into something I used
here's a good example:
configures gain for the ADC
oohhhh... ok
the ADC regsiter just wants to see a bunch of 1s and 0s
but it's easier to think in terms of the resulting gain 2/3, 8, 16, etc.
right
then you can use it like
config |= ADS1x15_CONFIG_GAIN[gain]
where gain can be set to 8 or 16 and not "what was the bit pattern again for 8 or 16???"
ah yeah
so for you, was thinking you could map ints to strings:
TOUCH_PADS = {
1 : 'A1',
2 : 'A2',
# etc
}
I had thought about doing it that way too, but we came up with the offset in the current code
doesn't look all that useful when the ints map straight to the string
Oh! Right.. because I thought you wanted both. So I couldn't do that, or it would always return the padname as a constant
I need to food, my brain is getting melty. Will you be around later?
I still want to understand the way you're suggesting. Learn something else new today! I'll ping you later, if you're around we can continue. if not, all good either way! Later!
ok. go food. later.
wall-e boot sound?
I guess. I jumped a mile
Keep it that way. We don't want a robot revolution quite yet
been a while since i booted a fresh one
I will say, it's a very nice board. I'm impressed with it. It's like the perfect all-in-one education board exactly like I wanted a few years ago when I was first getting started
My only pet peeve is that it doesn't have 12 dotstars so I can port my neopixel pocket watch project to it
The Circuit Playground has always sounded great, but my desires are always more... direct. If it doesn't have a direct purpose for me, I tend to not buy it.
Yeah, I hear ya
Then again, I do tend to learn backwards. "I want to do this. How do I do this. OK, and what will I need for that..."
I got it so I could contribute to CircuitPython, but I went through that process to actually get where I am now
I'm going to be getting one soon, so I can begin writing up examples for it
And/or adapting existing examples
but there was a period where I really wanted to just... experiment with different modules and sensors and outputs to just see how they fit together
and this is a lot cheaper than the oodles of breadboard crap and Chinesium breakout boards I got and destroyed
Mmm chinesium
Chinesium is fantastic for when you want to push stuff to see how far it'll go
just so you know - contributing to CircuitPython doesn't have to be done with the Circuit Playground Express
I know, but I primarily want to work on examples, too, and the only other board I had on hand was an ESP8266 WeMos D1 mini, and CP isn't mature there
@tidal kiln This is true, but the Circuit Playground has a LOT of things on it which can be useful for contributing
for sure. just wanted to make sure you didn't think that was the only hardware.
There was a Feather M0 BLE there that I almost got, but that's more like an "I have a project" board
Oh, no. I have an Adalogger, two M0 feathers, and an M0 Express feather. Oh, and a bunch of ESP8266 boards.
They didn't have any Trinket M0s which made me sad
Funny story about those - I managed to give myself an error when using those, and looking up the error led me to "Well, you bricked it!" So I bought a few more, then did it again, etc
I love Trinkets. I have like 6 and then another literal dozen DigiSpark boards, all gotten on sale
Turns out, it was just a wire to the wrong GPIO
and the M0 version just makes me weak at the knees for all the cool stuff it does at a similar power draw and more pins available
Myself? I have an inherent desire to want ALL of the pins broken out.
And knowing that a significant portion of the pins on the trinket are "Wasted" annoys that completionist part
Yeah, I picked up a Xadow Duino board that I was really hoping to hack... it's an ATMega 32u4 for some kind of prebuilt modular RGBLED IoT system
but it literally just has i2C broken out, plus one pin for driving Neopixels
Why would you even use a 32u4 for that?
...USB
From what I remember when I was looking at micros, the 32u4 was inexpensive, easy to acquire, and already supported with Arudino, and has native USB support
Is it that much cheaper than the Trinket/Gemma ATTiny gimmick?
Well, no
But ATTinys don't have native USB support.
Native USB means you don't have to put in extra hardware for serial conversion
Trinkets and Gemmas and DigiSparks and whatnot bit-bang USB
Which can be costly and large. Especially important when you're making 10000 of them.
It's doable, at least well enough
Yeah, but that's effort.
They can't do serial over USB but they can do bootloading
But it's already been done! Just fork the Gemma bootloader instead of the Leonardo bootloader...
this really doesn't matter
I picked up a 32u4 clone board for $3 after this Xadow thing disappointed me
but dang if it doesn't make me nerd-rage!
@glacial bronze Not that simple. Looks like you need a Vendor ID/Product ID to use the USB stuff
Which is... $3500-$4000 ish. Not a huge amount of money for a big company, but it's paperwork, and adhering to standards.
You know how well Chinesium likes to adhere to standards.
Ech. I guess that's fair
Who knows, though. Maybe they just got a sweet deal on 32u4s
@glacial bronze the newer Trinket M0 and Gemma M0 have hardware USB (not bit banged)
Yeah I know. I was being imprecise
well, you did say attiny, and that was true in that case.
do I want a) atom , b) pythonic atom, or c) atom ide ?
what did you use when compiling Circuit Python or a python library?
I write in Editra. Sometimes Notepad if I'm doing something quick and dirty
Great thing about Python is it doesn't need compiling
VS Code is cool too
with internal terminal where you can write extensions
if you like notepad editor
Notepad++
I like Editra, but it is old. And doesn't look like it's active. So eventually it will stop working
@hollow tartan where did you see those flavors of atom?
"over-whelming" + " more than 31" + "omg"
@slender iron do I have to use this in my configuration ? my uf2 code changes are here: https://github.com/tannewt/uf2-samd to build uf2 files?
That is did I need to install this somewhere?
Failed to add an "Open with Atom" context menu in the Explorer and make Atom available for association with files using "Open with...".
Say, what's the right command line for building CP for the M4? I'm using "make BOARD=metro_m4_express V=2" but I'm getting an error "cc1: error: -Werror=lto-type-mismatch: no option -Wlto-type-mismatch" I've been looking at this for a while and can't figure out the right option to avoid this error....
(Ubuntu Bash environment natively on Windows 10, btw)
make BOARD=metro_m4_express is what was suggested earlier. maybe try with out V=2?
Yup, tried that. No change. I read the makefile to see if there was an obvious CTAG I had missed, but to no avail. I figured this was a common problem that's already been solved. π
might be. haven't been able to try building yet myself.
No worries. Thanks for the suggestion! I'll keep trying to figure it out. π
@drowsy geyser I just do a make BOARD=x clean then make BOARD=x
Did you do git submodule update βinit βrecursive
Oops. No, I didn't. Let me try that.
Oooh , shiny. Lots of updates. π
it sets V to 2? but that's just a guess...
It jacks up the verbosity so I can see more of the steps it's taking.
I use DEBEG=1 if I want to use JLink for debugging
OH! Yes, I forgot about needing DEBUG=1
BTW, I'm writing down all the steps I take in a OneNote page so I can share the knowledge after it's working....
Experience is recognizing your mistakes when you make them again π
ROTFL!!!!
Do you folks use -O0 (oh-zero) to disable optimization?
You guys have been busy
Not me. Iβve been at a dinner party.
And I haven't gotten any actual programming done. I'm just figuring out how to compile CP to use with JLink debugging. π
@hollow tartan I use Atom with a specific set of packages installed. I have not tried Atom IDE, which if I understand it correctly works almost like a wrapper or package for standard Atom anyway.
@drowsy geyser That's great though!
Huh. Same error. Hmmmmm.
@solar whale Yeah, that sounds reasonable.
<@&356864093652516868> I wrote up an explanation of the colored blinky status RGB LED on the M0 boards with them: https://learn.adafruit.com/adafruit-feather-m0-express-designed-for-circuit-python-circuitpython/m0-boards-faq#faq-8
I've been playing Pathfinder, then having dinner. My M4 doesn't arrive until tomorrow π¦ I've been prepping.
@tulip sleet That's fantastic!
@tulip sleet I read that last night. Very helpful! Thank you for putting it together!
@drowsy geyser have you updated arm gcc tools recently?
Yes, it's a completely new install.
I'm wondering if the Ubuntu environment on Windows is out of date, though.
@tulip sleet Nice. I've been seeing them and thinking "ah.. problem" then screening in and reloading to see the output
@drowsy geyser I just finished it?! Where did you read it last night? Maybe I duplicated something Scott wrote.
Oh! I was reading a link from ReadTheDocs in the CircuitPython documentation. I thought that's what you were referring to.
@drowsy geyser Yes, upgrade your gcc arm stack
@drowsy geyser I was having the same problem when I went from 2.x to master
@tulip sleet thanks for doing that!
I'll go read yours now, @tulip sleet ! π
@drowsy geyser I grabbed gcc-arm-none-eabi-6-2017-q2-update from the arm site.
@tidal kiln I'm back if you're around
I needed to refer to something in forum support.
@umbral dagger oh, that might be it. I'll go see if I can do that.
@drowsy geyser re WSL: it uses the Ubuntu repos, so it should be up-to-date. But the arm-gcc stuff is in a PPA, so you need to install from that to get the latest stuff. Do you need a recipe?
@drowsy geyser https://forums.adafruit.com/viewtopic.php?f=60&t=112975&p=564651 (works on regular Ubuntu too)
@umbral dagger @drowsy geyser you can use the arm site, but using the PPA will keep you up to date automatically.
sudo apt update
sudo apt install gcc-arm-embedded python build-essential```
OH! Nice. I was downloading the arm package, but I like the automatic update. Thank you so much!
@idle owl yes