#circuitpython-dev

1 messages Β· Page 114 of 1

glacial bronze
#

welp I'm doing a flatten-and-reinstall in the next day or two so whatever. I'll just leave my .inos in the backup folder and see what happens with a clean install

pastel panther
#

If you can come by during the day (US time zones), there will be more people with more relevant CP experience than me around

glacial bronze
#

yeah I know, I just have a habit of "One more thing..." cycles before bed

pastel panther
#

same here

formal plover
#

Feeling the CircuitPython love. Fired off a tweet late late night. Checked it today 17 ❀ and 5 re-tweets

lofty topaz
#

@formal plover I did a search on Amazon in my Kindle Books for CircuitPython and got zero results. Looks like a niche to me. Who will be the first? Simon Monk perhaps? Will be waiting impatiently. ><>

formal plover
#

@lofty topaz it'll probably be a good while till there's a book out on it. Maybe a make magazine special for it first.

lofty topaz
#

Hope so. Just renewed my Make mag subscription. Such a cool publication.

formal plover
#

There's a make "getting started with the Trinket". Original trinket of course

#

@lofty topaz agreed. Make magazine is awesome. I snag bulk copies from humble bundle

lofty topaz
#

Yup, by Mike Barela I believe. Good book.

#

In fact, I'm recieving a Trinket M0 today. Came free with my order.

formal plover
#

Woot woot! Love the freebies.

lofty topaz
#

No kiddin' eh?

#

Getting a free Gemma and a CPX also. How cool is that?

formal plover
#

I can't even put in words how cool it is.

lofty topaz
#

I know, just when I needed to replenish my workshop with a rather large order, Adafruit comes along and provides this program for getting all this free stuff. I was very happy indeed.

#

My package arrives today. It's Christmas time in the fall. Gotta love it.

formal plover
#

That's awesome @lofty topaz

#

A lot of us that hang out here have the Trinket M0, so if you have any questions there will be plenty of help available

lofty topaz
#

@formal plover Oh, I know, some of you guys and gals seem to live in here. I would if I could but I can't. Nice to know though that whenever I need help, it's just a click away. Sort of like an online "Hit F1". Remember that?

umbral dagger
#

@lofty topaz There's at least one MicroPython book.

#

@lofty topaz Mostly PyBoard focussed, with a chapter on the ESP8266

lofty topaz
#

@umbral dagger Yup, Got it. Use it. Got the pyBoard, OpenMV M7 uses it as well. Very well done.
Programming with MicroPython Embedded Programming with Microcontrollers and Python Nicholas H. Tollervey

umbral dagger
#

@lofty topaz No.. I was thinkign of (and have) "Python for for Microcontrollers" by Donal Norris (McGraw Hill)

lofty topaz
#

There's also a "Getting Started..."

#

Yup, that's it. got it to

#

Also - OpenMV Development Workshop by Agus Kurniawan. Very well done.

umbral dagger
#

@lofty topaz As for discord, I've been just leaving it open in this channel and check in occasionally.

#

@lofty topaz Then again, I work from home 100% and am pretty much self-directed.

lofty topaz
#

@umbral dagger See, I pop in and pop out from the taskbar icon. Otherwise, the window would be open on one of the three screens and I would be reading things all the time. The place is great, but you can get caught up in it as well. I've learned that lesson long ago.

umbral dagger
#

@lofty topaz Yup... which is one reason I'm limited twitter usage to my tablet.

lofty topaz
#

I'm at home 100% as well. Just that I'm retired.

#

I'll tell ya what tho, I love Arduino. And Adafruit makes it so much fun.

umbral dagger
#

@lofty topaz What is it that you love about Arduino? (don't worry, I do too)

lofty topaz
#

Can you imagine having Adafruit back in 1977 when I was build Z80 micros for work?

#

@umbral dagger What I love about Arduino is the same thing I love about Circuit Playground, no OS.

umbral dagger
#

@lofty topaz Yeah, seriously. I did alot of business with Jameco back then. And there was a place about an hour from where I lived. No online ordering or next day delivery. How did we manage?

lofty topaz
#

@umbral dagger Purchasing agents.

umbral dagger
#

@lofty topaz That does streamline many things. Though, I am looking at some sort of RTOS for my next gen (ARM Cortes-M4 based) smarthome sensor node. FreeRTOS looks capable yet fairly minimal and unobtrusive.

#

@lofty topaz I didn't have the luxery of a purchasing agent. My work was either hobby or solo contracts.

#

@lofty topaz We've wander off topic I fear.

lofty topaz
#

@umbral dagger Zenith gave me $25,000/year for parts and test equipment. I was 20 years old.

umbral dagger
#

@lofty topaz Sweet deal.

lofty topaz
#

@umbral dagger My Z80 controlled machines produced products that saved them 40 million a year. They liked me a lot.

umbral dagger
#

@lofty topaz But re: no OS. I feel CP gives you just enough (REPL + flash drive). I'd argue that is a basic OS. You have a flash file system. Between that ease of use and the Python language it's very approachable.

lofty topaz
#

It was so sweet, I turned down Bill Gates when he offered me a job with his new startup in Seattle.

umbral dagger
#

@lofty topaz Good on you... you got to keep your soul.

lofty topaz
#

I know, but......

umbral dagger
#

@lofty topaz Investing would have been smart πŸ˜ƒ

lofty topaz
#

A house wife, 3 kids, 2 cars, mortage, bills, food, clothing, education, yeah, I should have invested.

#

But 10 cents don't buy much stock.

#

πŸ˜ƒ

#

However, I did invent a way to squeeze blood out of a turnip.

umbral dagger
#

@lofty topaz You should have worked for the Red Cross.

lofty topaz
#

@umbral dagger It was more of a process I call "Don't Ask for Permission, just Beg for Forgiveness".
Works every time. πŸ˜ƒ

umbral dagger
#

@lofty topaz Yes, and if you're good/lucky you end up not having to beg very often.

lofty topaz
#

BINGO!

#

Now I just need to intercept that delivery truck so she doesn't see it.

#

I got a boat load of parts from Adafruit coming today.

#

Hey @umbral dagger , you ever use those wireless chargers? I'm getting that Qi stuff and going to play with it.

umbral dagger
#

@lofty topaz I have not.

lofty topaz
#

Just wondering. New to me. Good learning oppurtunity. Wanna see how they do it and how good they are. Where's the technology at and so forth. Gotta love hacking.

umbral dagger
#

@lofty topaz I expect it's basically a transformer: incoming in the base, outgoing in the device.

lofty topaz
#

@umbral dagger Right, but what is the frequency. What levels are they using. My curiosity needs to know. That's all.

umbral dagger
#

@lofty topaz Sounds like your findings woudl make for an interesting read. Especially if there were information on how to abuse it πŸ˜ƒ

lofty topaz
#

@umbral dagger Well, that's true, but I was thinking more along the lines of shaping the coils for maximum energy transfer. They look like they're just flat wound. Wonder what the tesla levels are?

slender iron
#

@lofty topaz ZThe Nicholas Tollervey book talks about CircuitPython on the CircuitPlayground Express

lofty topaz
#

@slender iron Your absolutely correct. Just looked. Nice piece of work to. Thanks eh... ><>

slender iron
#

no problem! @plucky flint would be happy to hear you are reading it

#

@timber lion thanks for adding the high side/low side thermistor support

tidal kiln
#

@slender iron sry, was afk 2nd half of yesterday

slender iron
#

no problem @tidal kiln

#

ah ok

#

will look now

tidal kiln
#

uses one of your earlier suggestions and breaks into multiple files

#

to deal with the various modes: single, differential, etc.

slender iron
#

πŸ‘

tidal kiln
#

only the ADS1115 is implemented, ADS1015 is empty but would be same

slender iron
#

api looks good to me

#

the differential and single ended read code should be pushed down so itys only loaded when needed

tidal kiln
#

refactor out of the ADS1x15 class?

slender iron
#

another way to say it is to split it

#

yeah

tidal kiln
#

'loaded' = when an import is done? to conserve limited space?

slender iron
#

yup

#

you can have a shared parent for each mode

tidal kiln
#

that's what the ADS1x15 is currently

slender iron
#

right, so keep that to store the _read code thats completely shared

formal plover
#

My M4 arrived btw everyone!

slender iron
#

yay @formal plover

tidal kiln
#

so same setup, just need to refactor some stuff out of the current ADS1x15?

formal plover
#

Totally going to post it with #leeks on Instagram later Lolololol

slender iron
#

yeah, think so @tidal kiln

#

in ADC_Channel you don't need _value and _volts, you can just return them directly

tidal kiln
#

thanks. yeah. figured that. a detail i was still learning / uncertain about with the whole @ property thing.

slender iron
#

πŸ˜ƒ

#

another thing that migh tbe nice is to make the getitem for differential take a tuple instead of index

#

so (0, 1) instead of 0

tidal kiln
#

meaning dif of chan 0 and chan 1?

slender iron
#

exactly

tidal kiln
#

it doesn't work that way, there are only preset channels, so it's more like a mode than an arbitrary setup

#
0 = Channel 0 minus channel 1
1 = Channel 0 minus channel 3
2 = Channel 1 minus channel 3
3 = Channel 2 minus channel 3
#

and that's what you're passing in

slender iron
#

right, thats what you give the hardware but should the user have to do that?

#

you can throw an error for an invalid combination

tidal kiln
#

yeah, could do that. so only valid options would be (0,1), (0,3), (1,3), (2,3)

slender iron
#

right

#

I think thats clearer for the user. what do you think?

tidal kiln
#

people wouldn't read manual, think it would allow for any combination, but most combos they try would throw an error

#

could be frustrating

#

esp. since the modes it does support are kind of weird

#

0 and 3 make sense

tidal kiln
#
dif_chan = adc[(0,1)]
reading = dif_chan.value
#

like that?

tulip sleet
#

He works on the mu Python editor as well.

lofty topaz
#

@tulip sleet Yes, It's on my Kindle, along with all the others. I'm reading about 4 books right now. This is one of them.

manic glacierBOT
umbral dagger
#

@slender iron @tulip sleet @lofty topaz Just bought it. Looks good.

lofty topaz
#

I am looking for the Exclusive "CPX" book to come out. They will come. Look at how fast Micro:bit sprang up books and pdf's, it was great. MicroPython and CircuitPython put Python in the hands of the embedded developer. aka Hacker/Maker.

#

And I will defend my opinion that there is no OS. It's more of an Operating Environment. I know it has file access and who knows, some day a shield will have a hard-drive. 'em, Lot's of SD's.

#

But Arduino and CPX are perfect embedded platforms for ages 1 - adult. And I use that term adult loosely. πŸ˜ƒ

#

Sorry Raspberry Pi, but it's time to move over, just a little anyways.

manic glacierBOT
lofty topaz
#

Put it this way, my snake doesn't have a charmer name Linux to deal with, it's free to do as it pleases.

slender iron
#

@tidal kiln yup, thats what I'm thinking

#

@tulip sleet I'm gonna start working on the nrf52 merge today so ktown can start hacking on it in master

tulip sleet
#

@slender iron sounds good; i have some leads on the USB MSC problem. When things are bad system logs are filled with

Oct 23 21:22:04 salmonx kernel: [28976.968206] sd 6:0:0:1: [sdd] Sense Key : Illegal Request [current] 
Oct 23 21:22:04 salmonx kernel: [28976.968207] sd 6:0:0:1: [sdd] Add. Sense: Invalid command operation code```

so it's something in the way the MSC device is responding to certain requests, it appears
formal plover
#

@lofty topaz I use my Raspberry Pi to work on my CircuitPython boards.

#

Best of both worlds.

#

And Chromebook depending on what I'm doing.

lofty topaz
#

@formal plover πŸ˜ƒ Gotta love it...

formal plover
#

@lofty topaz yup!

slender iron
#

@tulip sleet ok cool. I think my brain just figured out the cdc corruption issue so I'm gonna take a peek now

tulip sleet
slender iron
#

πŸ‘

tidal kiln
#

@slender iron ok. ill work on it and ping you when i got next rev.

slender iron
#

thanks @tidal kiln

umbral dagger
#

@lofty topaz No OS the way the original Smalltalk and Lisp systems had no OS. They were the OS.

#

OS = something that lets you load code and execute it. And provide I/O capabilities.

lofty topaz
#

@umbral dagger Well, sort of. Do you remember the old "Monitor" programs? Once the bootloader set itself up, the Monitor would take over allowing you to do just what you said. Load code from somewhere or display memory or set I/O bits etc.

#

All controlled from a teletype over RS 232

tulip sleet
#

@slender iron lock3 test travis failure - rerunnning

umbral dagger
#

@lofty topaz I remember them well.

lofty topaz
#

@umbral dagger Nice.

umbral dagger
#

@lofty topaz Still an OS. Not a Disk OS.

#

Although with the USB drive thingy...

#

@lofty topaz β€œJust Enough OS” πŸ˜‰

#

@lofty topaz I’m using a very liberal definition of β€œOS”

lofty topaz
#

@umbral dagger Oh, well, I suppose so, but normally an OS will wait for you to tell it what to run, not Load-n-Go like Arduino and CPX. But I understand your point and it's well taken. I just think there should be a distinction between these type systems before we go much further into the future. πŸ˜ƒ

umbral dagger
#

@lofty topaz A β€œruntime”?

lofty topaz
#

Ah ah ah ah ... wow, haven't used that term in soooooo long. But, yup, a runtime.... ><>

umbral dagger
#

@lofty topaz Loader, executer, I/O libraries, REPL.

lofty topaz
#

@umbral dagger That's right, a very understandable way to interact with an interpretive environment. I keep getting asked by young people what the difference is between Arduino and Raspberry Pi. I say no OS and they look at me with a confused face. That worries me.

pastel panther
#

Why would that worry you?

lofty topaz
#

Or I say "headless".

#

@pastel panther What's the difference between a bicycle and a car? They need to know the difference when it's major.

#

Just my opinion.

pastel panther
#

@lofty topaz I suppose it depends on your definition of "needs to". Expectations should vary depending on the person and the position. Also ignorance shouldn't be a problem unless it's willful

lofty topaz
#

@pastel panther OH, absolutely, my concern is for those interested in the fields of our realm. Not everybody.

pastel panther
#

My bias is that statements that sound like "kids these days..." send me into anaphylactic shock

lofty topaz
#

I say it all the time. Kids these days are so smart. Kids these days work so hard. Kids these days know so much.

pastel panther
#

Gak!

lofty topaz
#

πŸ˜ƒ

pastel panther
#

;P

#

as they say in french: too-shay

#

;P

lofty topaz
#

My oldest is an Aerospace Engineer and my 2nd is a Mechanical Engineer and the 3rd is a teacher.

idle owl
#

You must be so disappointed in them! πŸ˜‰

lofty topaz
#

@idle owl It's what it's all about. ><>

#

And my wife became a Nurse.

idle owl
#

My mum's a psych NP

lofty topaz
#

Once all the kids where in school that is.

#

Otherwise, when they came through the door and hollored MOM, mom was there.

marble talon
#

Oh yeah, well my daughter aspires to be a Youtuber

#

πŸ˜„

idle owl
#

There's money to be made there! Apparently....

lofty topaz
#

@marble talon That is great. I know many who have had lots of success on YT

umbral dagger
#

My daughter is a welder.

#

My son is a chef.

lofty topaz
#

YT is the greatest Marketing Tool since the Bikini.

umbral dagger
#

Both eschewed technology 😦

idle owl
#

@umbral dagger Yeah but food.........

lofty topaz
#

@umbral dagger I wish I could weld, I wish I could cook. But I can't and thank Gawd there are those who can.

idle owl
#

So to do another build of 3.0: 1. Do I need to clear out the current one, 2. Can I have more than one build in that folder at a time or does it overrwrite it

umbral dagger
#

@idle owl I was about to say that they picked their field and excelled.

lofty topaz
#

@umbral dagger I wish I could weld, I wish I could cook. But I can't and thank Gawd there are those who can.

idle owl
#

@umbral dagger I already knew you thought the world of them. I was saying food is delicious.

slender iron
#

ugh

idle owl
#

Welding would be handy.

#

@slender iron what's up?

slender iron
#

I think the asf4 usb code is only caching our output when its not aligned

umbral dagger
#

@idle owl Culinary would have been my second choice.

lofty topaz
#

Looks like my shipment from Adafruit will come tomorrow instead. Oh Well.

idle owl
#

@slender iron hmm

slender iron
#

so every fourth character is random when printing from dynamin memory

idle owl
#

oi

solar whale
#

@idle owl jsut do the make clen then mak and it will selete tthe old one and build a new on e

umbral dagger
#

@slender iron That kinda jives with what I was seeing.

lofty topaz
#

Wanted to hookup that trinket M0

idle owl
#

@solar whale Right but is that how it works regardless? Or can I have simultaneous debug and non debug builds?

slender iron
#

the m0 must be slow enough that its less likely that we change the memory befor eit gets output on usb

#

#Illcachemyselftyvm

idle owl
#

So the M0 would have done the same thing but it's too slow to have the issue?

slender iron
#

thats my guess

solar whale
#

@idle owl As far as I know - only if you create a whole new syste, That is a new clone of the repo.

idle owl
#

Hah!

#

@solar whale Ok thanks. I want to understand it, I don't necessarily need 2 builds

solar whale
#

Or kust build it twice and save the .uf2 files as different names

sick creek
#

for the python aka Circuit one

idle owl
#

@solar whale That's what I was going to do if I decided to do it

drowsy geyser
#

@katni Uh, newbie question. How do I sync the current source directory with the Git repo? Is there anything besides git submodule update --init --recursive?

sick creek
#

@slender iron you have learned a lot with wireshark when doing debug with M0 and M4?

solar whale
#

@slender iron increased speed has hidden impacts πŸ˜‰

slender iron
#

yup yup

#

and its confusing when you turn on a cache and its only sometimes used

umbral dagger
#

@drowsy geyser git pull if you did a straight clone

drowsy geyser
#

Thank you, @umbral dagger !

umbral dagger
#

@drowsy geyser assuming you want to freshen your copy.

pastel panther
#

if you switch branches you may have to pull the submodules as well

drowsy geyser
#

Ok. Still learning git.

umbral dagger
#

If you have your own fork you’ll have to set an upstream remote and fetch/pull that.

pastel panther
#

I think there is a way to clone and pull submodules but I don't remember it offhand, and I don't know if it works when switching branches

umbral dagger
#

@drowsy geyser One never finishes learning git πŸ˜ƒ

drowsy geyser
#

@umbral dagger I don't have my own fork. I just did a straight clone.

umbral dagger
#

@drowsy geyser just git pull then

pastel panther
#

Ah, here it is: git clone --recursive -j8 git://github.com/adafruit/circuitpython.git

drowsy geyser
#

And a friend of mine (Jon Lolinger) wrote an O'Reilley book on Git. I need to go dust it off. πŸ˜ƒ

umbral dagger
#

refreshing the submodules is a good idea as well

pastel panther
#

Though you'll need git 1.9+ for that

drowsy geyser
#

Ok. I'm running the latest git...

pastel panther
#

Honestly stackoverflow tends to be more useful than a book for most "how do I" questions

drowsy geyser
#

Oh nice. It tells you the diff summary. Lots of analogio changes.

#

@pastel panther True! I figure I should do my homework first and get a better understanding of the repo system.

pastel panther
#

@drowsy geyser Sure, just make sure you're reading something fairly current

idle owl
#

@drowsy geyser Sorry, I stepped away! Did you get it sorted?

umbral dagger
#

If you prefer a gui for git at times (I love me some visual diffs) I’m using GitKraken these days Windows/MacOS/Linux

#

Free for OSS use

pastel panther
#

Does anyone know if there is a good visual diff tool for Atom?

umbral dagger
#

It will nag if you use it with a private repo, but doesn’t enforce anything.

pastel panther
umbral dagger
#

@pastel panther We all say that. Often πŸ˜ƒ

pastel panther
#

@umbral dagger I'm pretty sure internalizing that concept is a large part of moving from Jr. to Sr. engineer

slender iron
#

ok, I have a patch for you folks to test

pastel panther
#

Weeee

umbral dagger
#

Once my internet comes back .... (on my phone)

idle owl
#

@slender iron Excellent

solar whale
#

@slender iron Nice! - be a few hours befor I can try, but I will as soonas possible.

manic glacierBOT
slender iron
#

⬆

#

gonna go run

idle owl
#

Ok.. Not sure how to test it

slender iron
#

be back in ~30

idle owl
#

Ok

slender iron
#

travis should build it

#

thats one way πŸ˜ƒ

idle owl
#

That would mean having travis πŸ˜ƒ

sick creek
#

Travis is your friend so is Rosie

idle owl
#

Well it mounted CIRCUITPY the first time on flash this time. That's an improvement.

#

Hey! It works! >>> dir(board) ['A0', 'A1', 'A2', 'A3', 'A4', 'A5', 'D0', 'D1', 'D2', 'D3', 'D4', 'D5', 'D6', 'D7', 'D8', 'D9', 'D10', 'D11', 'D12', 'D13', 'SDA', 'SCL', 'NEOPIXEL', 'SCK', 'MOSI', 'MISO', 'LED_RX', 'LED_TX']

#

@slender iron Well done πŸ˜ƒ

formal plover
#

Great success!

umbral dagger
#

@idle owl multiple up-arrows?

idle owl
#

@umbral dagger Ooh yeah hold on

#

Also works!

umbral dagger
#

Cool!

solar whale
#

@idle owl - how di you get the udated code?

idle owl
#

I copied it from the raw github file and pasted it into /circuitpython/atmel-samd/usb.c

solar whale
#

ah - sneaky....

idle owl
#

So kludgey, but.... I have no idea how to get travis going, and no idea how to get the info from a PR that isn't already merged

#

Then I did a visual comparison of a few lines of code, and then a git diff to verify that it had the changes.

#

@umbral dagger Any other stuff to test that I missed?

drowsy geyser
#

@pastel panther Thanks for that link! I'll go look at it.

#

@idle owl Yep, thank you!

idle owl
#

I had forgotten about the up arrow, that's why I ask

umbral dagger
#

@idle owl hmm... boot & circuitpy drive showing up consistantly, repl access consistantly, line editing in the repl (up down, back forth, editing), consistant/correct repeated dir of a module.

#

I was having trouble with all that last night.

idle owl
#

Once I renamed my code.py again, it went immediately to the REPL. Still doesn't play nice with a code.py running though. Otherwise, yeah, this nailed all of it. I'll try flashing it a few more times to see if it consistently comes up

umbral dagger
#

The fact that the M4 is fast enough for timing problems like this to show up is awesome, though! Zoom, zoom!

manic glacierBOT
umbral dagger
#

@idle owl I tend to use main.py... which helps if I have split things into multiple files.

idle owl
#

Ah. Second flash, it didn't show up as CIRCUITPY following. So that's still inconsistent. But I don't think this was meant to fix that anyway.

drowsy geyser
solar whale
idle owl
#

@solar whale If the last modified is correct, it doesn't include the patch Scott wanted us to test.

#

Now it won't mount CIRCUITPY at all. Blergh. This is why you test repeatedly πŸ˜ƒ

solar whale
#

@idle owl I may be wrong, but I think that site is where travis posts the builds form each pull request. Can somaone confirm/deny.

idle owl
#

@solar whale That would explain what Scott said before he left, so you may be right

solar whale
#

@idle owl yeah - but the time for the last post is too old - never-mind....

idle owl
#

Hey there it is, lol.

#

Flashed it a few more times then decided to rebuild the uf2, and while it was building, CIRCUITPY shows up.

solar whale
#

but dan released it!

drowsy geyser
#

@solar whale I see that! I'll have to do a pull this evening and re-test the use cases....

stuck elbow
#

folks, I have a firend in here with a CPX which he has programmed previously with Arduino and and make code, and now we can't get circuitpython on it

solar whale
#

better late than never πŸ˜‰

idle owl
#

@stuck elbow Can you get to the bootloader?

stuck elbow
#

the uf2 bootloader comes up normally when we press reset twice, but then when I copy the uf2 on it, it restarts and the old program he programmed on it runs

idle owl
#

Run that first and see if it clears up the issue

stuck elbow
#

thanks

manic glacierBOT
solar whale
#

oops - premature - the new commit is not released yet - sorry for the confusion.

stuck elbow
#

it works \o/

idle owl
#

@stuck elbow Great!

stuck elbow
#

@idle owl you rule! πŸ˜ƒ

idle owl
#

@stuck elbow Thank you! I'm glad it worked!

slender iron
#

@idle owl @solar whale I forgot. PR builds aren't on S3

idle owl
#

@slender iron I figured out a way to do it.

pastel panther
#

Did anyone else see the issue I saw with master/3.0 making /dev/tty.usbmodem1411 disappear on a m0?

idle owl
#

@slender iron This patch was about output issues right? It's unrelated to mounting the device after flashing?

slender iron
#

yeah believe so

#

@tulip sleet is looking at the mass storage issues

idle owl
#

Ok. I wanted to know what to put in my review comment, making sure I was right about the mounting issue being irrelevant to this PR

pastel panther
#

Stupid question but is mass storage related to usbmodem stuff?

tulip sleet
#

3.0 is presenting two mass storage devices at once (may be a mistake), and the second one does not behave well. That could cause various issues with stuff like the terminal. On Linux, it makes the daemon process running the USB stuff act up.

#

Still looking at this.

slender iron
#

@tulip sleet did you try turning the second one off?

tulip sleet
#

@slender iron I was just about to do that. Looking for where they were both turned on.

slender iron
#

there are a number of lun checks I believe I hard coded 😬

manic glacierBOT
tulip sleet
#

waitin' for travis before the actual commit

slender iron
#

yeah, I can watch it and squash once its going

tulip sleet
#

sure

formal plover
#

#leeks

stuck elbow
#

purple

idle owl
#

I think that's just his image

formal plover
#

I filtered it to death, here's the original photo

stuck elbow
#

awww

formal plover
#

Haha sorry

idle owl
#

There was a video of them being made posted to the blog a couple of days ago. It was really neat.

formal plover
#

It's been raining here in Michigan for like a year, so the lighting was terrible, hence the filtering

#

@idle owl Yeah I saw that!

#

@Regrann from @adafruit - Get ready for the Metro M4! The Adafruit Prototyping League is at it again, this time manufacturing our first test batch of Metro M4’s. We hand stencil each PCB using a laser cut jig and send the boards through the pick β€˜n place one by one. After visual inspection they head into the reflow oven where the solder paste transforms into solid metal joints. Stay tuned for more! #adafruit #manufacturing #manufacturingmonday #metro #metrom4 #circuitpython-dev #diyelectronics #madeinnyc #prototyping - https://www.instagram.com/p/Bal3rSrjQX2/

manic glacierBOT
#

This code was designed in response to this issue. It wasn't a good fit for that library.

It is a start for another library that could be for the Circuit Playground Express, or usable across multiple boards. I'm posting the code here so anyone who wants to pick this up has a place to start. The idea is to allow for iteration across all capacitive touch inputs (in the current case, the touch pads on the CPX), ...

idle owl
#

@tidal kiln I closed the touch tuple issue after posting and cross referencing it in the CP repo issue.

hollow tartan
#

Hello. I did install a version of Windows Powershell and Vagrant up did try to create the target.

#

However, --debug states:
ERROR vagrant: #<VagrantPlugins::HyperV::Errors::PowerShellFeaturesDisabled: The Hyper-V cmdlets for PowerShell are not available! Vagrant requires these to control Hyper-V. Please enable them in the "Windows Features" control panel and try again.>

#

This is all new to me so I will try some more.

idle owl
#

If you surround your comment with three backticks, it'll put it in a code block. Single backticks around it will make it inline

hollow tartan
#

hello

idle owl
#

The backtick on the upper left of your keyboard above the ~

#

Yeah!

#

It helps with terminal output, which you will probalby be dealing with a lot πŸ˜ƒ

hollow tartan
#

very useful. thanks, @idle owl

idle owl
#

@hollow tartan No problem πŸ˜ƒ

tulip sleet
idle owl
#

How do I clear the stash after doing git stash if I have no need for it. Is it git stash drop or git stash clear... I made a change to the repo for testing, the repo was updated, I stashed my local changes and did git pull. Now I have a stash I don't need.

tulip sleet
#

git stash drop will pop it off the stash stack and discard it.

idle owl
#

@tulip sleet Thank you

hollow tartan
#

my win7 is 64 bit, it is unclear if vagrant and VirtualBox are 32 bit apps.

tulip sleet
#

that's not really the problem - it's that VirtualBox + Vagrant need all kinds of setup.

#

have you upgraded to the Fall Windows Creators Update yet?

#

(you don't have to)

hollow tartan
#

@brave cipher no .. FWCU . who provides that?

idle owl
#

DId that update include Win7 or was it only Windows 10?

tulip sleet
#

oh, you have Win7 , oh oh, sorry.

#

For Win7 I'd suggest instead download VMWare Workstation Player (or use plain Virtual Box), and just install an Ubuntu image on it (16.04) is fine as a regular VM.

hollow tartan
#

The Power Shell update I got for win 7 64 bit. "Pro"

tulip sleet
#

Or, do you have an external USB3 disk enclosure you could use (USB2 is OK but will be slower)?

#

I am going to suggest installing Ubuntu on an external drive and booting off that.

hollow tartan
#

@tulip sleet I do have an external Harddrive but rarely use it.

tulip sleet
#

are you willing to wipe it and install Ubuntu on it? What's the base machine you have? have you ever booted from another drive via the BIOS?

hollow tartan
#

some years ago, yes.

tulip sleet
#

what's your goal, to build circuitpython?

hollow tartan
#

first micro python and then circuitpython, yes.

tulip sleet
#

Is the machine a desktop that you could add another internal drive to? Do you have a spare drive?

solar whale
#

tried latest CP 3.0 master on M4 - works OK on MacOS as usual, but on Linux box ```[126126.982437] sd 8:0:0:1: [sdd] Unit Not Ready
[126126.982442] sd 8:0:0:1: [sdd] Sense Key : Illegal Request [current]
[126126.982446] sd 8:0:0:1: [sdd] Add. Sense: Invalid command operation code
[126126.983287] sd 8:0:0:1: [sdd] 0 512-byte logical blocks: (0 B/0 B)
[126126.983290] sd 8:0:0:1: [sdd] 0-byte physical blocks
[126126.983989] sd 8:0:0:1: [sdd] Test WP failed, assume Write Enabled
[126126.987182] sd 8:0:0:1: [sdd] Asking for cache data failed
[126126.987190] sd 8:0:0:1: [sdd] Assuming drive cache: write through

hollow tartan
#

@tulip sleet yes

tulip sleet
#

@solar whale I'm working on that - it's presenting two drives but there's really only one.
Make this patch (one line change):

diff --git a/atmel-samd/usb.c b/atmel-samd/usb.c
index 4f7080dc8..fb7d77ec0 100644
--- a/atmel-samd/usb.c
+++ b/atmel-samd/usb.c
@@ -205,7 +205,8 @@ void init_usb(void) {
     cdcdf_acm_init();
     pending_read = false;
 
-    mscdf_init(1);
+    //    mscdf_init(1);
+    mscdf_init(0);
     // hiddf_mouse_init();
     // hiddf_keyboard_init();
#

just make mscdf_init(1) be mscdf_init(0). That will get rid of the bad drive. It still isn't working right (CIRCUITPY disappears after 30 seconds sometimes), but it gets rid of the voluminous errors.

solar whale
#

I'll give it a try

hollow tartan
#

my gut feeling about dual drives in one desktop case, is that harmonics are going to byte you.

#

@tulip sleet thanks for the inputs, I will work on Vagrant for another day or two to see for myself.

tulip sleet
#

alternatively just install plain VirtualBox or VMWare Workstation Player (free) and then install Ubuntu as a regular VM.

tidal kiln
#

@idle owl cool. thanks for documenting the discussion.

solar whale
#

@tulip sleet with that change - I just keep going back to METROM4BOOT

idle owl
#

@tidal kiln Sure! I had written some of it down and it made sense to include it since if it gets picked up again, all the same ideas and opinions will still be there for it.

tulip sleet
#

@solar whale I am testing on M0 Metro, not M4. You just changed the 1 to a 0, right?

umbral dagger
#

@tulip sleet That lets me bring up METROM4BOOT, flash the new build onto it, then it comes up with CIRCUITPY. Hoever screen just gives nothing. Exiting out takes a while (C-a k y... wait)

tidal kiln
#

@idle owl yes. good. also because there's a good chance i'll re-think of this idea and ask for it again in a few months.

solar whale
#

@tulip sleet yes - but now it boot on my MAc, bit does not mount CIRCUITPY

idle owl
#

@tidal kiln lol. Understood. I do the same thing πŸ˜ƒ

solar whale
#

and it dies after a few minutes... 😦

tulip sleet
#

@solar whale you included this afternoon's CDC fixes from Scott, right?

solar whale
#

yes - did git pull

umbral dagger
#

@tulip sleet Also, I can edit main.py on CIRCUITPY. Saving updates it and stops the running code, but doesn't reload. Resetting starts it running (and CUIRCUITPY once again is there).

#

@tulip sleet This is after pulling in the latest changes in master, along with applying you 1->0 patch locally.

solar whale
#

@tulip sleet it is working now on Linux ! but Mac is not happy....

umbral dagger
#

@solar whale @tulip sleet I'm on Linux as well Ubuntu 17.04

solar whale
#

@tulip sleet but on;ly once πŸ˜‰ after disconnect it hangs

tulip sleet
#

@solar whale yes, this is just fixing one problem (maybe). There were two raw devices presented (sg3 and sg4), but one was always reporting "not ready", which seemed to make the driver ask again and again, "ready yet? ready yet? ready yet?" It was in there to eventually allow access to CIRCUITPY and an SD card, but we can take out the latter for now.

#

it's still pretty unhappy

#

If you plug it into Linux you'll see it appear, and fail to answer some questions (is write enabled?, etc.). Then every 30 seconds the driver resets it and goes through the initial dialog again. I'm comparing the USB traffic with 2.1.

#

I mean if you tail kern.log or syslog

solar whale
#

sigh - reverted back to master for now - at least it is somewhot well behaved on the MAc.

#

or it was - not not working at all....

idle owl
#

@solar whale I had to reset it a bunch to get it to show up.

#

@solar whale And I had to rename main.py/code.py to anything else to get the REPL to work. It'll make the serial connection, but I can't get to the REPL without renaming that.

solar whale
#

got it back - unplugged USB and replugged

umbral dagger
#

@tulip sleet Hmm... I didn't notice this before. When I edit/save main.py on CIRCUITPY not only does the previous version stop running, but if I have CIRCUITPY open in a file browser it sits spinning "loading" trying to refresh it.

tulip sleet
#

@umbral dagger this is 3.0, right?

umbral dagger
#

@tulip sleet And this shows up in syslog: Oct 24 17:41:55 rohan kernel: [91758.577779] usb 3-1.4.4: reset full-speed USB device number 41 using xhci_hcd Oct 24 17:41:55 rohan kernel: [91758.733080] cdc_acm 3-1.4.4:1.0: ttyACM0: USB ACM device Oct 24 17:41:55 rohan kernel: [91758.733485] sd 6:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_TIME_OUT driverbyte=DRIVER_OK Oct 24 17:41:55 rohan kernel: [91758.733490] sd 6:0:0:0: [sda] tag#0 CDB: Read(10) 28 00 00 00 00 03 00 00 01 00 Oct 24 17:41:55 rohan kernel: [91758.733493] blk_update_request: I/O error, dev sda, sector 3 Oct 24 17:42:28 rohan kernel: [91791.353575] usb 3-1.4.4: reset full-speed USB device number 41 using xhci_hcd Oct 24 17:42:28 rohan kernel: [91791.509351] cdc_acm 3-1.4.4:1.0: ttyACM0: USB ACM device Oct 24 17:42:58 rohan kernel: [91822.053238] usb 3-1.4.4: reset full-speed USB device number 41 using xhci_hcd Oct 24 17:42:58 rohan kernel: [91822.208564] cdc_acm 3-1.4.4:1.0: ttyACM0: USB ACM device

solar whale
#

but lost it again....

umbral dagger
#

@tulip sleet Yes, latest master (plus your patch to only open one device)

#

(yes, my linux box is rohan.. open grassy plains, majestic snow capped mountains... my Mac is morder....)

tulip sleet
#

@umbral dagger I see that too. Don't know why. I'm reading the ASF4 driver code now. Scott's code seems to be doing the right thing with respect to it, but the low-level code may be buggy.

formal plover
#

Do we have like a step 123 for getting the M4 up to testing level?

idle owl
#

Kind of?

#

Install the J-Link software first.

umbral dagger
#

@tulip sleet And a bit later this shows up: ```Oct 24 17:43:29 rohan kernel: [91852.788957] usb 3-1.4.4: reset full-speed USB device number 41 using xhci_hcd
Oct 24 17:43:29 rohan kernel: [91852.944158] cdc_acm 3-1.4.4:1.0: ttyACM0: USB ACM device
Oct 24 17:44:02 rohan kernel: [91885.540724] usb 3-1.4.4: reset full-speed USB device number 41 using xhci_hcd
Oct 24 17:44:02 rohan kernel: [91885.695843] cdc_acm 3-1.4.4:1.0: ttyACM0: USB ACM device
Oct 24 17:44:35 rohan kernel: [91918.320272] usb 3-1.4.4: reset full-speed USB device number 41 using xhci_hcd
Oct 24 17:44:35 rohan kernel: [91918.475796] cdc_acm 3-1.4.4:1.0: ttyACM0: USB ACM device
Oct 24 17:45:05 rohan kernel: [91949.028043] usb 3-1.4.4: reset full-speed USB device number 41 using xhci_hcd
Oct 24 17:45:05 rohan kernel: [91949.179491] cdc_acm 3-1.4.4:1.0: ttyACM0: USB ACM device
Oct 24 17:45:05 rohan kernel: [91949.180056] sd 6:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_ABORT driverbyte=DRIVER_OK
Oct 24 17:45:05 rohan kernel: [91949.180058] sd 6:0:0:0: [sda] tag#0 CDB: Read(10) 28 00 00 00 00 03 00 00 01 00
Oct 24 17:45:05 rohan kernel: [91949.180059] blk_update_request: I/O error, dev sda, sector 3
Oct 24 17:45:05 rohan kernel: [91949.180097] FAT-fs (sda1): FAT read failed (blocknr 2)
Oct 24 17:45:36 rohan kernel: [91979.759821] usb 3-1.4.4: reset full-speed USB device number 41 using xhci_hcd
Oct 24 17:45:36 rohan kernel: [91979.911388] cdc_acm 3-1.4.4:1.0: ttyACM0: USB ACM device
Oct 24 17:46:09 rohan kernel: [92012.515535] usb 3-1.4.4: reset full-speed USB device number 41 using xhci_hcd
Oct 24 17:46:09 rohan kernel: [92012.666858] cdc_acm 3-1.4.4:1.0: ttyACM0: USB ACM device

tulip sleet
#

@umbral dagger yeah same here

idle owl
#

@slender iron @tulip sleet Do you have an updated version of the uf2 installer or is the one from 22 October stil valid

solar whale
#

OK - Mac is happy again with 3.0 Master build - blinky is running CIRCUITPY is mounted - life is good.... nobody move.

#

@idle owl I think the changes since then only impact the arduino boot.

idle owl
#

Ah I think you're right. I remember that now

tulip sleet
idle owl
#

Did that need to be built?

solar whale
#

I am using that now and it works well.

tulip sleet
#

@solar whale are you using the UF2 functionality?

#

or just bossac

solar whale
#

Yes

idle owl
#

I want to get a bootloader.bin or .elf file to Kurt so he can get it on his M4

slender iron
#

I'm working on the self updater for uf2 now

#

I think it finially flashed but hosed the bootloader...

solar whale
#

I have been using it with no problems - on my MAC anyway

#

@slender iron are you referring to reloading the bootloader itself via UF2 - I loaded it with JLink, but I can load CP with it just fine.

slender iron
#

I know

#

I think the bootloader is ok

#

but the self updater isn't

idle owl
#

Ok, @formal plover is downloading the jlink software now. He's got a fresh M4 so he needs to start from scratch where we were this weekend. I have to go in a few minutes here. @solar whale I gave him my bootloader.bin and bootloader.elf but they're older than the one you're using, so if you could upload yours that would be helpful.

pastel panther
#

You can put me in the same cart as Kurt however I won't have my jlink until probably next week

solar whale
#

@slender iron any objection to my sharing the current build?

drowsy geyser
#

@slender iron Coming in late from a meeting. I was able to flash my M4 using my compiled image and bossac, but the UF2 load doesn't work (as you know).

pastel panther
#

Is there any documentation/open issues/bug tracker for the current status of the M4 build?

#

I know @tulip sleet and @slender iron are fixing USB issues, but @idle owl was referencing progress being made from the weekend so I wasn't sure if there was more to the story

formal plover
#

Downloaded the special version of jlink for the pi

#

trying to move the 99 rules

solar whale
#

Ooh! I have not tried it on a pi yet. Good luck!

pastel panther
#

@formal plover If you're up for it, you should document your methods so others can share in the joy

formal plover
#

For sure @pastel panther! This is on a Pi, but I'm sure I'm not the only one doing this

pastel panther
#

@formal plover that's what I was hoping for. Now that I think of it, a Pi might be a decent alternative dev environment for people in windows land

formal plover
#

It's a cheap way of having a Linux box for those "You need Linux" moments. It works great for what I've been doing

drowsy geyser
#

@pastel panther ... I actually just ordered a new desktop on which to install Ubuntu for just this purpose. πŸ˜ƒ

formal plover
#

Running and testing CircuitPython boards and Arduino boards isn't extremely resource heavy

drowsy geyser
#

Though I've had good luck compiling in the Bash shell (Ubuntu) on Windows 10.

pastel panther
#

I've heard from a coworker that it's actually pretty decent

#

I still have flashbacks from when I had to develop for a linux environment on a windows machine...

formal plover
#

I can do without the GUI, but you know I'm a millennial, so if I can use the GUI, prob going to use it

#

lololol

pastel panther
#

I would always use a GUI if it worked as well as command line. Heck, my IDE is a GUI

#

To each their own

sick creek
#

@drowsy geyser well there is other bash shells in windows 10 like suse

drowsy geyser
#

True, but the Ubuntu shell is supported. πŸ˜ƒ

sick creek
#

in circuitpython right?

pastel panther
#

What do you mean by in circuitpython? CP being supported in Ubuntu?

#

AFAIK CP is fairly platform agnostic

#

for development at least

drowsy geyser
#

@sick creek I'm confused. The standard Ubuntu shell is working, so why should I change?

pastel panther
#

building from source may be easier or harder on different plaforms but using a CP should be doable on anything with a usb port and a text editor

solar whale
#

@tulip sleet interesting observation - I rebuilt 3.0 with you mod to usb.c - on the Link Box, twice now it seems to mount CIRCUITPY when I open screen to acces the REPL -coincendence?

drowsy geyser
#

@pastel panther I can confirm your assertion.

sick creek
#

@drowsy geyser well adding option as you can use ubuntu, openSuse like a app

solar whale
#

@tulip sleet definite correlation....

formal plover
#

jlink hooked up... Nothing blew up, that's good

drowsy geyser
#

@formal plover What's your operating environment? Like, which OS, and which debugger are you going to use?

tulip sleet
#

@solar whale hah - so that's why I only saw CIRCUITPY once! Thanks for that! It's another clue.

solar whale
#

@tulip sleet but the box is much happier! moving my dev environment back to it!

formal plover
#

@drowsy geyser Raspberry Pi "Stretch"

drowsy geyser
#

Cool! Thank you!

formal plover
#

jlink commander

#

What do I pick for "Device"

#

Did connect and now it wants my device. You're welcome @drowsy geyser !

solar whale
#

ATSAMD51J19

#

use SWD

formal plover
#

mind reader @solar whale

solar whale
#

been there

formal plover
#

speed

drowsy geyser
#

Yup. 1000 KHz

solar whale
#

1Mhz

formal plover
#

fail

solar whale
#

??

drowsy geyser
#

Oh? I was using 1000 and it worked on Win 10....

pastel panther
#

1000Khz=1Mhz?

drowsy geyser
#

Yup yup,

solar whale
#

I don;t think it was the spped that failed

formal plover
#

It did not like 1000 khz

#

now it's stuck on 1khz

drowsy geyser
#

Ok.

solar whale
#

try 1Mhz

#

or 1000000

formal plover
#

J-Link>speed 1Mhz Selecting 1 kHz as target interface speed

#

`*** J-Link V6.20g API Error ***
JLINKARM_SetSpeed(1000000 kHz): Maximum JTAG speed exceeded. Did you specify speed in Hz instead of kHz ?
*** J-Link V6.20g API Error ***

****** Error: JLINKARM_SetSpeed(1000000kHz): Maximum JTAG speed exceeded. Did you specify speed in Hz instead of kHz ?

Connecting to target via SWD
Cannot connect to target.`

solar whale
#

sorry - so with 1000 it fails?

formal plover
#

`Connecting to target via SWD
Cannot connect to target.
J-Link>speed 1000
Selecting 1000 kHz as target interface speed
J-Link>connect
Device "ATSAMD51J19" selected.

Connecting to target via SWD
Cannot connect to target.`

solar whale
#

looks better -

#

how is your cable connected?

drowsy geyser
#

+1 @solar whale - was just going to ask that

formal plover
#

jlink to the port on the metro, knotch lined up

#

I got the smaller cable btw, there are no left over pins

solar whale
#

but on the Jlink is the tab out or in. shoul point away from USB

formal plover
#

is there a way to update the jlink firmware?

slender iron
#

@idle owl @solar whale I think I found the reason you need a double flash sometimes

drowsy geyser
#

Dumb question, but you have the USB Micro connected to, yes? And the red wire on the cable is aligned with the "1" printed on the JLink?

solar whale
#

you have a Jlink Mini?

formal plover
#

Yes I have the mini

solar whale
#

red wire by 1 -- tab out

formal plover
#

notch is pointing towards the usb

#

womp womp

solar whale
#

@slender iron do tell!

slender iron
#

my logic for savign data about to be erased was wrong

solar whale
#

@pastel panther quit teasing the bot πŸ˜‰

formal plover
#

so red should be on the right?

solar whale
#

by the 1 on the Jlink bord

pastel panther
#

What does it have against the instrument Louis Armstrong plays?!

slender iron
#

maybe president related?

pastel panther
#

haha

umbral dagger
#

@formal plover

solar whale
#

interestin - mine is reverse - - depend which end is used

drowsy geyser
#

Mine's reversed, too.

formal plover
#

`Selected interface (1) is not supported by connected debug probe.
J-Link>speed 1000
Selecting 1000 kHz as target interface speed
J-Link>connect
Device "ATSAMD51J19" selected.

Selected interface (1) is not supported by connected debug probe.
J-Link>`

#

sets jlink on fire

tidal kiln
#

yes. ends are diff. but red is 1.

drowsy geyser
#

Yep

#

Hang in there, @formal plover , it'll work.

formal plover
#

Haha I'm just being snarky @drowsy geyser

tulip sleet
#

@slender iron I removed the unused second MSC device, as you may have seen above. It still is not responding to queries properly from the host - for instance, the host asks if write-protect is on, and it doesn't answer properly. Your calls to the MSC library appear OK, but I have to dig deeper into the library impl. I downloaded the latest ASF4 zips from Atmel START (hoping against hope), but there's no change since last time.

slender iron
#

kk, thats kinda what I figured

formal plover
#

So yeahhh device is wrong?

slender iron
#

ktown, limor and I were talking about switching to a shared tinyusb for ports in 4.x

solar whale
#

@kurt - looks correct

formal plover
#

@solar whale ok

tulip sleet
#

@slender iron is tinyusb the impl in UF2?

slender iron
#

nah, its a different open source one done by thach

tulip sleet
#

oh, yeah, now I remember thach's website name!

#

we still have to get something working on 3.x. Hopefully it can be debugged.

slender iron
#

I'm sure we can figure it out

formal plover
#

We use the jlink to flash the bootloader, correct?

#

I mean, I wouldn't see any other way of doing it.

umbral dagger
#

@formal plover That's how I did it

solar whale
#

@formal plover yes - BTW I just end-for ended my caple so it looks like @umbral dagger and it still works!

formal plover
#

Hmmmm

#

So the red doesn't go to 1 then

solar whale
#

yes it does - on both ends

umbral dagger
#

my arrangement

solar whale
#

key will force it on Metro - the otehr end has to go with red at 1 - regardless of direction

#

looks good

formal plover
#

We have different cables then

solar whale
#

no

umbral dagger
formal plover
#

Well when my red is on the same side as "1" the ribbon cable goes over the top

#

of the jlink

umbral dagger
#

Which just seems backwards to me

formal plover
#

Well that's how I have it

#

lol so which is it

solar whale
#

depends on which end is in the metro

umbral dagger
#

Both are the same

#

particles AND waves

formal plover
#

lordy

pastel panther
#

🍿 πŸ˜…

formal plover
#

killing me

#

Red is by the triangle on the metro and red is by the 1 on the jlink

pastel panther
#

Stupid question: does the board need power?

umbral dagger
#

@pastel panther I just a 9v wallwart

formal plover
pastel panther
#

Kurt, is your power switch on and board plugged in?

formal plover
#

@pastel panther Yes, powering it via usb (the metro)

umbral dagger
#

@formal plover That might be a problem.

formal plover
#

metro powered via usb, that's no good?

umbral dagger
#

@formal plover I believe people were saying that on the weekend

formal plover
#

They were mentioning that on Macs

umbral dagger
#

@formal plover @pastel panther The jLink won'y power the baord adequately ... power led is not lit

formal plover
#

mine was lit

#

I'm not trying to power the board via jlink

#

jlink and metro are both plugged in

solar whale
#

@formal plover It is helpful to use a 9V supply to the barrel connector - do you have one?

umbral dagger
#

I use the barrel connector to power with the klink

formal plover
#

I MIGHT have one from my Arduino Uno

#

That's 9v correct?

umbral dagger
#

Yes

solar whale
#

better check

umbral dagger
#

A range is fine... 7-12 maybe.. 9 is typical.

pastel panther
#

Just as long as the polarity is correct

solar whale
#

Metro_m0 says 7-9

umbral dagger
#

Makes sense since it's just getting 3v3 from it, and not 5 like the Uno

#

I'm still getting used to the 3v3 thing... I grew up with 5v. Everythign could take 5v.

solar whale
#

@kurt with respect to the cable - at leas on mine if you unplug and swap ends then it will lie the other way to keep red on pin 1 - yours mey be different buts it works both was for me.

tidal kiln
formal plover
#

I don't have the barrel power supply

pastel panther
#

In the picture theyre actually the same though it looks reversed. If you look, both connectors are oriented to the cable the same way

tidal kiln
#

notch w.r.t. cable is different
notch w.r.t. pin1 is same
yes. it is confusing.

solar whale
#

the "tab" always point away from the USB connector on the Jlink - one way the cable is on the tab side - the other way it is reversed.

formal plover
#

I switched the cables, same deal

tidal kiln
#

red is 1, trust that unless the notch/tab forces you to something different, at which point you need to stop and investigate

solar whale
#

@formal plover in the long run a 9V supply will be helpful. I often have to disconnect the USB and power it form the 9V to get Jlink to connect.

#

not sure that is your problem now.

formal plover
#

So the tab always has to face away from usb @solar whale?

#

That's what you said right?

tidal kiln
#

1 has to be 1

pastel panther
#

If you have a friend that plays guitar, you can raid their pedal box for a 9v adaptor. Stabbings may occour.

formal plover
#

okay, well there's only a 1 on the jlink

solar whale
#

@formal plover is tehre a conflict between @tidal kiln instructions and tab location? should eb the same red wire at pin1

#

the Metro is keyed - cant do it wrong

#

but the red wire shou be by teh arrow - outer edge of the board.

formal plover
#

lol I think everyone has suggested a different way so far

#

red is on the 1 jlink

#

tabs are lined up on the metro

#

tab to slot

solar whale
#

and on the metro red is at outer edge - there is a small arrow

formal plover
#

yes

solar whale
#

good to go

tidal kiln
#

that sounds correct then

formal plover
#

which means the notch lines up with the slot

solar whale
#

I don't undestand

formal plover
#

The notch/key on the cable, there's a hole for that on the metro

solar whale
#

yes - only one way to plug it in.

formal plover
#

Yaassss

#

lol that's what I mean

solar whale
#

red wire will alway be oon outer edge - no matter which end of the cple you use

tidal kiln
#

hopefully

formal plover
#

ahhhhhhh

solar whale
#

then on Jlink - just nake sure red wire is on pin 1.

formal plover
#

`SEGGER J-Link Commander V6.20g (Compiled Oct 20 2017 17:11:04)
DLL version V6.20g, compiled Oct 20 2017 17:10:55

Connecting to J-Link via USB...O.K.
Firmware: J-Link EDU Mini V1 compiled Oct 6 2017 16:39:00
Hardware version: V1.00
S/N: 801001548
License(s): GDB
VTref = 3.274V

Type "connect" to establish a target connection, '?' for help
J-Link>connect
Please specify device / core. <Default>: ATSAMD51J19
Type '?' for selection dialog
Device>
Please specify target interface:
J) JTAG (Default)
S) SWD
TIF>SWD
Specify target interface speed [kHz]. <Default>: 4000 kHz
Speed>1000
Device "ATSAMD51J19" selected.

Connecting to target via SWD
Found SW-DP with ID 0x2BA01477
Scanning AP map to find all available APs
AP[2]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0x24770011)
AP[1]: AHB-AP (IDR: 0x74770001)
Iterating through AP map to find AHB-AP to use
AP[0]: Core found
AP[0]: AHB-AP ROM base: 0x41003000
CPUID register: 0x410FC241. Implementer code: 0x41 (ARM)
Found Cortex-M4 r0p1, Little endian.
FPUnit: 6 code (BP) slots and 2 literal slots
CoreSight components:
ROMTbl[0] @ 41003000
ROMTbl[0][0]: E00FF000, CID: B105100D, PID: 000BB4C4 ROM Table
ROMTbl[1] @ E00FF000
ROMTbl[1][0]: E000E000, CID: B105E00D, PID: 000BB00C SCS
ROMTbl[1][1]: E0001000, CID: B105E00D, PID: 003BB002 DWT
ROMTbl[1][2]: E0002000, CID: B105E00D, PID: 002BB003 FPB
ROMTbl[1][3]: E0000000, CID: B105E00D, PID: 003BB001 ITM
ROMTbl[1][4]: E0040000, CID: B105900D, PID: 000BB9A1 TPIU
ROMTbl[1][5]: E0041000, CID: B105900D, PID: 000BB925 ETM
ROMTbl[1][6]: E0042000, CID: B105900D, PID: 003BB907 ETB
Cortex-M4 identified.`

solar whale
#

woohooo!

formal plover
#

I seriously just picked a different USB port

#

jlink cable was the same after everyone said red to 1.

solar whale
#

we wer consistent

formal plover
#

Yeah.

#

It was just the usb port of choice the whole time

#

1 port the neopixel wouldn't light, but the smaller lights by the port did

#

switched ports and the neopixel lit up and the connection worked

pastel panther
#

yaay!

umbral dagger
#

Wait... my neopixel doesn't light up. The blink code is running fine, though.. and CIRCUITPY shows up. Odd

#

Ya?

solar whale
#

ther is no Neopixel driver in 3.0 yet.

umbral dagger
#

ok.. whew

#

πŸ˜ƒ

formal plover
#

Remember, I haven't flashed the board yet lol.

#

It lights up as is right now.

#

Not sure what's on it now

solar whale
#

I think it started with a bootlater that will work with an updated bossac - you can go taht route or use the jlink to load an image to it. You can also use the jlink to load a new bootloader taht supports UF2

slender iron
#

so the uf2 bootloader I sent you all definitely has bugs

solar whale
#

@slender iron so do you recomment sticking with bossac or using it as is for now?

slender iron
#

I'll have an update for you shortly

#

just adding one more thing

solar whale
#

take your time!

formal plover
#

I'll wait for that one to flash then @slender iron

solar whale
#

@formal plover I have not use JLink Commander for loading - Do you have the JLinkGDBServer

formal plover
#

@solar whale all the things! Lol. It's a software pack

#

Commander is what I pasted the output from though

#

It's a special ARM version for the Raspberry Pi

solar whale
#

Is Ozone available for the Pi?

#

IT has worked well for me on the Mac and Linux.

#

in commander you may just need to use loadbin but I ahve not tried it.

formal plover
#

No Ozone

solar whale
#

it wasa separate down load from Segger

slender iron
#

@solar whale what file format do you need?

solar whale
#

I see it for "Linux" - not an arm version

slender iron
#

elf?

solar whale
#

elf or bin

formal plover
#

Yeah, don't think it's available

solar whale
#

gdb will work fine

formal plover
#

ok

slender iron
solar whale
#
Model: Metro M4
Board-ID: SAMD51G19A-Metro-v0``` is this correct - not sure if it worked
slender iron
#

yeah, its the same version

#

the led will fade in and out quickly when off usb

solar whale
#

cool

formal plover
#

gdb server opens in terminal, has text then closes

slender iron
#

looks up where it gets the version number

solar whale
#

ddi you do this? JLinkGDBServer -if SWD -device ATSAMD51J19

formal plover
#

do that in commander?

#

or in terminal?

solar whale
#

no at terminal session - exit commander

formal plover
#

k

#

command not found

solar whale
#

hmm

#

@slender iron have you used JlinkExe to do an upload - do you just use loadbin?

slender iron
#

I usually do it through gdb

solar whale
#

does the bootloader load to address 0?

slender iron
#

yeah thats where the bootloader goes

solar whale
#

tried new bootloader, but 2 issues - drag/drop does not work - copied .uf2 via command lin and it went but I cant get to REPL or mount CIRCUITPY yet....

slender iron
#

hrm ok

solar whale
#

tryin on MAC

formal plover
#

I can't get gdbserver to stay open long enough to read what it's saying lol

solar whale
#

taht is JLinkGDBServer

#

@slender iron drag/drop OK on mac - so thsi may still be the linux fussiness

#

need to rebuild mac-compatible CP 3.0 just a sec

#

@kurt - you can try Jlink commander but may want to wait untyl bootloader works better

formal plover
#

Ok @solar whale

solar whale
#

@slender iron still unable to boot CP after load

slender iron
#

k, I'm trying now

#

yup, just went back to the bootloader for me

umbral dagger
#

Everything except screening in for the repl seems to be working for me.

#

(linux)

solar whale
#

@silent radish do you have Dans mod in place?

slender iron
#

ah I think I see my problem

#

pointer math is a trap

solar whale
#

off by a factor of 4?

slender iron
#

yeah, first dst was uinr32_t* and I was shifting it by too much, then I realized it was wrong so I replaced it with block_address, a uint8_t* but didn't change the math

umbral dagger
#

@solar whale I do

#

@solar whale At least I think so.. rebuilding to be sure

#

@solar whale Yes, confirmed

#

Everything looks good except no screen/repl

#

Interesting thing: screen connect and does nothing. Existing takes forever... but if I reset the m4, screeen exists immediatly

solar whale
#

did you load the new bootloader tonight?

umbral dagger
#

Well, and saving the code onto CIRCUITPY halts execution but does not restart it. But CIRCUITPy is still there and the file has been updated.

tidal kiln
#

@umbral dagger it'll do that, the os removed the device screen was connected to when you reset

umbral dagger
#

@solar whale I believe so.. Ozone, the new bootloader bin that @slender iron posted

solar whale
#

OK - for me - CIRCUITPY does not appear

umbral dagger
#

Ozone does complain that the mcu can't be halted

solar whale
#

I get taht all the time - disconnect USB then force to bootloader and it is happy.

umbral dagger
#

OK.. did it a bit differently.. Ozone behaved like I expected. Confirmed that the new bootloader was flashed.

#

Still same behaviour: things other than screen/repl seem good

slender iron
solar whale
#

cool!

slender iron
#

I do seem to have flaky mass storage here as well

solar whale
#

yay - it boots!

#

and REPLs!

#

and blinky runs!

slender iron
#

something is still weird

solar whale
#

ans I verivied that I can go back to bootloader and then reboot to CP - What is wrong?

slender iron
#

I tried turning on neopixel and using the self updater to do so but it has a crc problem

#

which I think means the bootloader flashed it wrong

#

ah, nope I think its a crash in the neopixel code πŸ˜ƒ

umbral dagger
#

On Mac it's... um... different

#

I get stuff from screen.. but can't get a repl prompt

solar whale
#

@silent radish I cant get it run on Mac with Dans mod in place.

#

wait...

umbral dagger
#

hmmmm

#

If I stick a print in my binky code I DO see youtput to screen

solar whale
#

CIRCUTPY does mount on MAC but REPL does not work'

umbral dagger
#

@solar whale Saw the same on Mac, seeing the same on Linux

solar whale
#

My screen session connects, but no response.

umbral dagger
#

Huh

solar whale
#

trying without dans mod

slender iron
#

@umbral dagger what version are you running?

umbral dagger
drowsy geyser
#

BTW, 3.0current does not work on a Feather M0 Express. Local build, flashed with bossac, no D:\CPYTHON and no REPL working. Tried various permutations.

umbral dagger
#

@slender iron latest master

#

as off a few hours ago anyway

#

interesting

solar whale
#

without DAns mod - REPL works on the Mac

umbral dagger
#

in repl. copy main.py onto CIRCUITPY. C-d, code starts... AND I can get back into the repl.

solar whale
#

on mac or linux

#

@drowsy geyser I had same issues on Metro_M0

umbral dagger
#

linux... assume I'm on linux unless I mention otherwise.

tidal kiln
#

alias dastels linux

#

done

umbral dagger
#

Ubuntu 17.04 to be exact

solar whale
#

@formal plover sorry to leave you hanging.....

umbral dagger
#

@slender iron CP currently: Adafruit CircuitPython 3.0.0-alpha.0-38-g0933bf8fb-dirty on 2017-10-24; Metro M4 Express with samd51j19

formal plover
#

It's okay @solar whale

slender iron
#

I can't help at the moment. deep in uf2 bootloader land

solar whale
#

NP - keep at it.

umbral dagger
#

@slender iron Just confirming version now that I can get in the repl to actually see it

drowsy geyser
#

@solar whale Ok, thanks. I was just checking someone else's work (who now appears to have changed his handle. πŸ˜ƒ )

#

Going back to "production" code works fine.

formal plover
#

The more deep into something you are @slender iron, the more progress is being made. Haha so no love lost here. Keep up the good work!

slender iron
#

πŸ‘

idle owl
#

New bootloader, nice!

solar whale
#

@formal plover if you want to try this bootlaoder, it does work

formal plover
#

@solar whale well gdb server doesn't appear to work so u dunno how I would go about flashing it

solar whale
#

I think you can use jlink commander -- loadbin command

idle owl
#

Let's see if it worked. Since I have no idea how to read what the jlink is telling me and it's still full of halt errors - but it did the same thing last time and it still loaded the bootloader.

solar whale
#

unplug you USB - and reenter bootlader - if it pulses fast, it is the new one!

idle owl
#

Pulses fast for just a second?

#

Or continues to

solar whale
#

continues as long as USB is out

formal plover
#

@solar whale okay. What's that command?

slender iron
#

I believe the latest one will also have a different version string

solar whale
#

thats no fun πŸ˜‰

idle owl
#

How do I find the version string?

solar whale
#

enter bootloader - in METROM4BOOT open INFO_UF2.TXT

#
Model: Metro M4
Board-ID: SAMD51G19A-Metro-v0```
idle owl
#

Nice!

slender iron
#

thats the older one

#

i think

idle owl
#

Not so nice!

#

lol

solar whale
#

hmmm

slender iron
#

that might be the last I sent

#

its a WIP

#

trying to get the neopixel going

solar whale
#

it works

idle owl
#

I grabbed the one you uploaded last.

solar whale
#

@formal plover once you get JLink connected at JLink> prompt try loadbin bootloader.bin (assuming you have bootlaoder.bin in currend directory)

#

@umbral dagger I forgot - On linux now I don;t get CIRCUITPY mounted until I connect screen and enter REPL

formal plover
#

@solar whale uh, no. What? Lol

solar whale
#

let me try it first

idle owl
#

I tried doing it through JLinkExe and it's still 1.23.0

solar whale
#

I think taht is correct

#

so loadbin command worked for you @idle owl

idle owl
#

Either that or it had already worked with Ozone and loadbin did nothing......

#

If I put the output in, can you decipher it?

formal plover
#

Where do I have to have the bootloader stashed to load it?

solar whale
#

try it

#

in your current directory - or jsut specfy the path to it.

idle owl
#
Target connection not established yet but required for command.
Please specify device / core. <Default>: ATSAMD51J19
Type '?' for selection dialog
Device>ATSAMD51J19
Please specify target interface:
  J) JTAG (Default)
  S) SWD
TIF>S
Specify target interface speed [kHz]. <Default>: 4000 kHz
Speed>1000
Device "ATSAMD51J19" selected.


Connecting to target via SWD
Found SW-DP with ID 0x2BA01477
Scanning AP map to find all available APs
AP[2]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0x24770011)
AP[1]: AHB-AP (IDR: 0x74770001)
Iterating through AP map to find AHB-AP to use
AP[0]: Core found
AP[0]: AHB-AP ROM base: 0x41003000
CPUID register: 0x410FC241. Implementer code: 0x41 (ARM)
Found Cortex-M4 r0p1, Little endian.
FPUnit: 6 code (BP) slots and 2 literal slots
CoreSight components:
ROMTbl[0] @ 41003000
ROMTbl[0][0]: E00FF000, CID: B105100D, PID: 000BB4C4 ROM Table
ROMTbl[1] @ E00FF000
ROMTbl[1][0]: E000E000, CID: B105E00D, PID: 000BB00C SCS
ROMTbl[1][1]: E0001000, CID: B105E00D, PID: 003BB002 DWT
ROMTbl[1][2]: E0002000, CID: B105E00D, PID: 002BB003 FPB
ROMTbl[1][3]: E0000000, CID: B105E00D, PID: 003BB001 ITM
ROMTbl[1][4]: E0040000, CID: B105900D, PID: 000BB9A1 TPIU
ROMTbl[1][5]: E0041000, CID: B105900D, PID: 000BB925 ETM
ROMTbl[1][6]: E0042000, CID: B105900D, PID: 003BB907 ETB
Cortex-M4 identified.
Syntax: loadbin <filename>, <addr>
J-Link>```
#

@formal plover I specified the path to where it downloaded

solar whale
#

@idle owl I dont think you actully ran it - need to do it after connectin=on established.

idle owl
#

Oh.

#

I ran connect, similar output.

#

Now I do loadbin is what you're saying?

solar whale
#

yes - just a sec

idle owl
#

Holding

solar whale
#

ok - do loadbin /path/to/bootloader.bin,0

#

it will prably give - cannot halt error

umbral dagger
#

This is what I have for bootloader: UF2 Bootloader v1.23.0-12-ga89e9fb SFHR Model: Metro M4 Board-ID: SAMD21G19A-Metro-v0

idle owl
#

@solar whale Yeah it failed to halt

formal plover
#

J-Link>loadbin bootloader.bin Syntax: loadbin <filename>, <addr>

idle owl
#

Add the ,0 with no space after.bin

solar whale
#

is that the one scott uploaded or did you build it yourself?

idle owl
#

Scott uploaded.

formal plover
#

We need to start name tagging agin

#

lol

#

@idle owl are you telling me to add the ,0?

slender iron
#

I have another coming in a sec

solar whale
#

@idle owl yes add ,0

idle owl
#

@formal plover Yep

#

@formal plover Or wait for Scott anyway πŸ˜ƒ

solar whale
#

good - hopfull with a new verifiable version! πŸ˜‰

pulsar bloom
#

Hi everyone

idle owl
#

Hello @pulsar bloom

formal plover
#

unknown command

#

@idle owl

solar whale
#

@formal plover waht did you type?

formal plover
#

loadbin bootloader.bin,0

slender iron
idle owl
#

@formal plover You're at the JLink> prompt after running JLinkExe ?

solar whale
#

need to be in JLink - connected and at Jlink> prompt

formal plover
#

connectedv@idle owl @solar whale

slender iron
#

UF2 Bootloader v1.23.0-14-g3db9182 SFHR

pulsar bloom
#

Have CP express with main .py corrupt. Can get to REPL, will go into bootloader, bossac can not find it , or can Arduino .

idle owl
#

I tried reconnecting, still can't halt, so still not getting anywhere with loading.

#

@pulsar bloom Can you get to the bootloader?

solar whale
#

ooh - neopixel!

slender iron
#

πŸ˜„

pulsar bloom
#

@idle owl yes will go into bootloader

solar whale
#

@idle owl you need to force it into bootloader - I do it by disconnectiin USB then doubletap - then restart and connect JLINK

slender iron
#

I realized it be pretty easy because we're only at 48 mhz in the bootloader just like the SAMD21

idle owl
#

@pulsar bloom Should clear it up.

pulsar bloom
#

Thanks

solar whale
#
Model: Metro M4
Board-ID: SAMD51G19A-Metro-v0```  but neopixelis on??
slender iron
#

huh, weird

#

how'd you get that?

solar whale
#

I read INFO_UF2.TXT

slender iron
#

hrm

solar whale
#

how else can I get version?

slender iron
#

none that I know of

#

if the neopixel is going then you definitely have the latest

#

are you looking at a cached version?

tidal kiln
#

soooo....i'm probably going to be the last one to come online with my M4, busy with something else right now. has someone documented all the noob startup steps?

solar whale
#

apparently ```UF2 Bootloader v1.23.0-14-g3db9182 SFHR
Model: Metro M4
Board-ID: SAMD21G19A-Metro-v0

idle owl
#

Oh man. It halted and now it's saying it failed to open file...

solar whale
#

linux still struggling with file manager

formal plover
#

loadbin bootloader.bin, 0 works after I moved the file to the same folder as jlink

#

J-Link>loadbin bootloader.bin, 0 Downloading file [bootloader.bin]... Comparing flash [100%] Done. Erasing flash [100%] Done. Programming flash [100%] Done. Verifying flash [100%] Done. J-Link: Flash download: Bank 0 @ 0x00000000: 1 range affected (16384 bytes) J-Link: Flash download: Total time needed: 0.434s (Prepare: 0.056s, Compare: 0.019s, Erase: 0.093s, Program: 0.236s, Verify: 0.016s, Restore: 0.012s)

idle owl
#

Noted!

formal plover
#

assuming that all looks right

solar whale
#

@idle owl you can use Ozone if that is cleaner.

idle owl
#

It's not working in Ozone either

#

@formal plover !!

solar whale
#

@formal plover looks great! - If you doubletap you should get a METROM4BOOT File system

idle owl
#

@formal plover That did it!

slender iron
#

I'm off to eat something

solar whale
#

@idle owl can you get into bootloader

slender iron
#

thanks all for your help!

solar whale
#

@slender iron Thank you!!

idle owl
#

@slender iron Great job, thank you!

formal plover
#

Yayyyy! Hugs all around!

solar whale
#

@idle owl - if you disconnetc USB and just have 9v connected can you enter bootloader?

idle owl
#

@solar whale I don't have a 9v adapter. This is all via USB

#

I entered the bootloader connected to USB

solar whale
#

oh - sorry - I thought you had one -hmmm - how have you gotten around the "unable to halt" in the past?

idle owl
#

I keep connecting it to a USB power adapter when I'm doing the jlink stuff.

#

I didn't. It was never corrected.

#

This time I reset it a few times, tried to force it into the bootloader, and reconnected it.

solar whale
#

OK - you are in bootloader now - try connecting JLINK

idle owl
#

Ok

#

First of all it resets when I plug the cable back into the M4, but the bootloader came back up.

#

@solar whale Now what do you want me to do to test it? It didn't give me the halt error until I tried to flash the bootloader. Should I try to do that again?

#

Or is it not clear that the process was successful...

solar whale
#

I should have give report like @formal plover showeed above.

#

are you in Ozone or JLinkExe

idle owl
#
Comparing flash   [100%] Done.
Erasing flash     [100%] Done.
Programming flash [100%] Done.
Verifying flash   [100%] Done.
J-Link: Flash download: Bank 0 @ 0x00000000: 1 range affected (16384 bytes)
J-Link: Flash download: Total time needed: 0.410s (Prepare: 0.049s, Compare: 0.018s, Erase: 0.094s, Program: 0.220s, Verify: 0.017s, Restore: 0.009s)```
solar whale
#

looks good

idle owl
#

I checked the version string, it's updated

solar whale
#

yay!! -- is the neopixel on?

idle owl
#

Yep!

solar whale
#

You did it!

#

Whew!

idle owl
#

Yeah I had to do what Kurt said, and put the bootloader.bin in the same directory as JLinkExe. No idea why it started halting.

#

And firmware flash worked the first time!

solar whale
#

@formal plover you can try flashing CP3.0

hollow tartan
#
$ vagrant ssh
Welcome to Ubuntu 14.04.5 LTS (GNU/Linux 3.13.0-133-generic x86_64)

 * Documentation:  https://help.ubuntu.com/

  System information as of Wed Oct 25 01:52:02 UTC 2017

  System load:  0.7               Processes:           86
  Usage of /:   3.6% of 39.34GB   Users logged in:     0
  Memory usage: 13%               IP address for eth0: 10.0.2.15
  Swap usage:   0%

  Graph this data and manage this system at:
    https://landscape.canonical.com/

  Get cloud support with Ubuntu Advantage Cloud Guest:
    http://www.ubuntu.com/business/services/cloud

0 packages can be updated.
0 updates are security updates.

New release '16.04.3 LTS' available.
Run 'do-release-upgrade' to upgrade to it.


vagrant@vagrant-ubuntu-trusty-64:~$
formal plover
#

Yeah, @idle owl gave it to me @solar whale

solar whale
#

@formal plover t - great - have you tried it yet?

formal plover
#

Trying to connect to serial

idle owl
#

I had to remove it manually and reconnect it before it would let me do anything with it.

formal plover
#

What port for linux?

solar whale
#

@formal plover take a look at dmesg and see if you are getting flooded with USB errors?

#

/dev/ttyACM0

#

thats a zero

hollow tartan
#

cross compiling micro python and circuit python for esp8266

formal plover
#

`>>> t
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 't' is not defined

r
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'r' is not defined
ot
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'ot' is not defined
(
...
...
...
... e
... oott o(-
... l
... t
`

solar whale
#

@formal plover that looks messy - you did screen /dev/ttyACM0 115200

idle owl
#

I can rename main.py back to main.py while I'm in the REPL and then it lets me flow back and forth between the live serial connection and the REPL no problem. screen connect with main.py in /, and it won't accept input. Interesting. Wouldn't even let me do it from already being in the REPL before, so this is an improvement.

solar whale
#

you can try this verison - may be better for RPi

#

@idle owl the vrsion you gave Kurt was from your Mac and ddi not hav Dans mod to usb.c in it, correct?

idle owl
#

@solar whale Ah that is correct. Yes.

#

@formal plover Use the one @solar whale posted.

solar whale
#

@formal plover - try the version I kust posted

idle owl
#

Might explain my first flash issue too. I'm going to try yours.

formal plover
#

@solar whale k

solar whale
#

@idle owl don't - it won't work on Mac.

idle owl
#

Oh. Noted.

solar whale
#

REPL will not work

idle owl
#

I didn't realise compiling it affected how it worked on the device... I thought it was what it was.

#

I thought it might be different but I thought I was wrong.

solar whale
#

the modification to usb.c is the issue

umbral dagger
#

@hollow tartan FYI Ubuntu 17 released this past spring.

solar whale
#

it works on Linux but not on Mac.

idle owl
#

Ah. So it's not a general thing, it's specifically this.

solar whale
#

yes

idle owl
#

Ok. So I wasn't off there. Good to know.

tulip sleet
#

I didn't check that in anywhere, just something to try.

solar whale
#

I hope Raspberry Pi responds the same.

#

@formal plover once you flash it, you will not see CIRCUITPY until you connect via screen and start REPL

#

At least taht is how it works for me....

umbral dagger
#

So it's "working" pretty much. Sort of. I can get it into a state where I can update code on CIRCUITPY, and it reloads. I can get into the repl consistantly. It takes a littel finessing to get there, though.

solar whale
#

@formal plover for first try - don't use a main.py or code.py - just got to REPL

idle owl
#

I'm having issues. Trying to diagnose.

solar whale
#

ruh roh..

umbral dagger
#

I have to force removal of main.py. moving to trash doesn't "stick". I have to move it to trash, disconnect, reconnect, get into repl, put main.py back. Then I seem good.

formal plover
#

Welp can't get it to enter bootloader anymore

solar whale
#

do you still have JLink connected - if so remove it.

formal plover
#

No @solar whale

umbral dagger
#

Removing from command line just works, though. Once I have main.py removed, CIRCUITPY does NOT show up until I screen in (getting dropped into the repl).

formal plover
#

after I loaded the 3.0 @idle owl gave me it won't work

solar whale
#

@formal plover ah - you may have to reboot your RPi --

idle owl
#

Jlink again?... πŸ˜•

solar whale
#

the USB issues can make it very unhappy.

formal plover
#

@idle owl is fired

idle owl
#

shows herself out

solar whale
#

or try this: sudo systemctl restart systemd-udevd

formal plover
#

lol just rebooting

solar whale
#

okay - tuck that away for next time.

formal plover
#

I need to spin up another pi

#

This is my pihole server

#

constant reboots are no fun

#

lol

umbral dagger
#

I love Pis.. they're so cute.

#

I need more of them.

idle owl
#

@formal plover Hey I know the guy who wrote PiHole! He just did a preso at the group I had a board meeting for tonight. He'll be presenting again in December.

formal plover
#

@idle owl say whattttt???

#

That's awesome

solar whale
#

@formal plover does the board enter bootlaoder - taht is neopixel on even if you dont see METROM4BOOT?

idle owl
#

Ok, @umbral dagger thank you for mentioning the force removal of main.py. Mine is now acting like the rest do, where when I connect it, it doesn't show up until I connect to the REPL.

formal plover
#

Oh man it's really borked now

solar whale
#

@idle owl Wow - I had not gotten to that stae on the Mac, but there is something still funky with USB

#

@formal plover is taht a technical term?

manic glacierBOT
#

Output below. I am using Ubuntu 16.04. I have compiled the UF2-SAMD21 without errors and flashed the bootloader.bin so my toolchain worked for that. (The bootdrive shows up on a double click but nothing else) I just cloned circuitpython today and tried a few boards but all the same. Typical output below. I do not understand the error at all.

Output:
/circuitpython/atmel-samd$ make V=1
GEN build-metro_m0_express/genhdr/qstr.i.last
cc1: error: -Werror=lto-type-mismatch: no option -Wl...

umbral dagger
#

@solar whale "borked" oh ya. I've heard that used for... like... ever

formal plover
#

@solar whale lol sure is

umbral dagger
#

@idle owl main.py running, can screen in but not get into the repl. Remove main.py on commnad line (none of that GUI second change nonsense... GONE.) and it drops me into the repl.

idle owl
#

It took some nonsense to even let me do it via commandline.

solar whale
#

@formal plover waht is happening?

umbral dagger
#

@idle owl Then if I copy it back onto CIRCUITPY and C-d it starts up and I can get back to the repl as expected. C-c <return>

#

Maybe some weird threading issue keeping the repl from starting? If so it could be that main.py loads and starts execution so much faster on the m4. I'll have a peek at the startup code.