platform-atmelavr icon indicating copy to clipboard operation
platform-atmelavr copied to clipboard

How about support for the ATtiny x14/x17/x18 series?

Open toddzebert opened this issue 7 years ago • 39 comments

toddzebert avatar Jan 29 '18 07:01 toddzebert

I'm keen to see support added for these very capable chips, particularly the attiny1617 and attiny817

Is there any chance of integrating the excellent megaTinyCore from @SpenceKonde?https://github.com/SpenceKonde/megaTinyCore

JonSilver avatar Jul 27 '19 10:07 JonSilver

I would love to see my cores (megaTibyCore and ATTinyCore) supported by PlatformIO, however I'm not familiar with it (I just use the arduino IDE). What can I do to help this happen?


Spence Konde Azzy’S Electronics

New products! Check them out at tindie.com/stores/DrAzzy GitHub: github.com/SpenceKonde ATTinyCore: Arduino support for almost every ATTiny microcontroller Contact: [email protected]

On Sat, Jul 27, 2019, 06:44 Jon Silver [email protected] wrote:

I'm keen to seen support added for these very capable chips, particularly the attiny1617 and attiny817

Is there any chance of integrating the excellent megaTinyCore from @SpenceKonde https://github.com/SpenceKonde? https://github.com/SpenceKonde/megaTinyCore

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/platformio/platform-atmelavr/issues/83?email_source=notifications&email_token=ABTXEW2OCZDVFGT5UKBXNDDQBQRKVA5CNFSM4EOAWRBKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD26I2OI#issuecomment-515673401, or mute the thread https://github.com/notifications/unsubscribe-auth/ABTXEW6ZMZCJC7ZAXIAE3RTQBQRKVANCNFSM4EOAWRBA .

SpenceKonde avatar Jul 27 '19 16:07 SpenceKonde

@SpenceKonde ATTinyCore is already included in PlatformIO, it seems, though it looks like it the somewhat old 1.2.2 version.

As I understand it, adding megaTinyCore would require it to be included in framework-arduinoavr, which lives here: https://github.com/platformio/platformio-pkg-framework-arduinoavr. ATTinyCore is already there under the core[tiny|tinymodern] cores. I believe it would also require making some changes adding a new boards_megatinycore.txt with board definitions that can be exposed to developers. Did I miss anything, @ivankravets?

stonehippo avatar Sep 05 '19 00:09 stonehippo

Oh god, 1.2.2? Yeah, we should try to get ATTinyCore bumped up to 1.3.2 - I've changed and improved a lot since then....

Quite frankly, I know very little about PlatformIO, other than that people keep complaining that my core isn't supported there, or that bugs I fixed eons ago in ATTinyCore are still present there. I don't remember who set up ATTinyCore 1.2.2 on PlatformIO, but I know it wasn't me.

SpenceKonde avatar Sep 05 '19 00:09 SpenceKonde

@SpenceKonde looking at the commit, @ivankravets was the last one to update the ATTinyCore in PIO. I can take a look at making that update over in the framework repo and submit a PR to get it moved up to 1.3.2.

stonehippo avatar Sep 05 '19 00:09 stonehippo

Ok, I’ve made the pull request, following the pattern of the last update and using ATTinyCore 1.3.2 as the basis. @ivankravets can you point me to the best way to advise folks to test the PR with those updates?

stonehippo avatar Sep 05 '19 01:09 stonehippo

Wow! Thank you! <3

So now its just megaTinyCore

SpenceKonde avatar Sep 05 '19 04:09 SpenceKonde

Thanks for your PR! Everything is merged and deployed. Please re-test with upstream version of dev/platform http://docs.platformio.org/en/latest/platforms/atmelavr.html#upstream

As for the megaTinyCore, @stonehippo you can do similar PR. I would like to ask to use a new board ID notation. We plan to add soon support for starting a project from bare MCU/Device and from Development Kits. Dev/kits can have own name but device ID should have official IF provided by the vendor. Mostly, they are uppercased. For example, instead of attiny817.json we should use ATtiny817.json => https://www.microchip.com/wwwproducts/en/ATTINY817

ivankravets avatar Sep 05 '19 08:09 ivankravets

Thanks for merging the PR, @ivankravets. I’ll do another for #160 as soon as I get a chance. Will also look at the new board ID notation, too.

stonehippo avatar Sep 05 '19 14:09 stonehippo

@SpenceKonde @ivankravets I’m looking at bringing megaTinyCore over, but I noticed a couple of things that lead to some questions that might need to be addressed before the BSP will work on PlatformIO:

  1. @SpenceKonde I noticed in your release notes that prior to release 1.0.1, the official Arduino megaAVR BSP needed to be installed to get compiler support, but that changed with 1.0.2+. Can you give me a hint on why that is (e.g. do you now get the compiler installed alongside megeTinyCore automatically?)
  2. Also, it looks like upload/flashing gets done via UDPI rather than ISP?
  3. @ivankravets if I needed to get the megaAVR compiler installed as a dependency for these MCUs/megaTinyCore, I assume we’d need a new toolchain deployed (e.g. toolchain-atmelmegaavr) up on sourceware?

Based on all of this, I’m wondering if it doesn’t make more sense to create a new platformio-atmelmegaavr repo if the tools architecture are that different.

stonehippo avatar Sep 07 '19 16:09 stonehippo

Also, it looks like upload/flashing gets done via UDPI rather than ISP?

Yes this series of AVRs requires UPDI and has no support for ISP.

JonSilver avatar Sep 07 '19 16:09 JonSilver

Thanks, @JonSilver. Looks like I can build a UPDI programmer from one of the Pro Mini’s I have laying around.

I’m going to have to get a couple of these new MCUs so I can test anything I do. ~~Have you got the breakouts for this up on Tindie, @SpenceKonde?~~ I’m also going to get an Arduino Nano Every or Uno WiFi rev2, since they also use the newer megaAVR arch.

stonehippo avatar Sep 07 '19 17:09 stonehippo

Ok, got a couple of boards from @SpenceKonde. I’ll pick this up again when they arrive, I guess.

stonehippo avatar Sep 07 '19 17:09 stonehippo

@ivankravets FYI I tested the upstream update for ATTinyCore with an ATtiny85 and things are looking good with 4.2.0.

stonehippo avatar Sep 07 '19 17:09 stonehippo

megaTinyCore (and the other megaavr parts) requires 7.3.0 of the compiler; the recent versions of ATTinyCore handle this when installed via board manager (but not when installed manually - I'm not quite sure how to do that in a graceful way). I'm not sure how such custom tools are handled in platform IO - you can see the packages that get installed in the board manager json https://github.com/SpenceKonde/ReleaseScripts/blob/master/package_drazzy.com_index.json

SpenceKonde avatar Sep 07 '19 22:09 SpenceKonde

Got the boards today (thanks, @SpenceKonde!). This next week is nuts, so I’ll most likely start to work on the megaTinyCore support next week.

stonehippo avatar Sep 16 '19 17:09 stonehippo

Hi Guys, any news on this? I am also interested in the new ATTinys but would love to keep on working with platformIO! Cheers, Stif

stif avatar Feb 04 '20 22:02 stif

Hi @stif, I've been wrapped in some other work, but have been planning to get back to adding megaTinyCore. I'll take a whack at it this weekend.

stonehippo avatar Feb 04 '20 22:02 stonehippo

Ditto from me. I guess I'll be in the ArduinoIDE for the moment... (and wrecking my nice folder structure).

ethereal-engineer avatar Feb 05 '20 06:02 ethereal-engineer

Ha! Workaround (for the yuck folder structure thing): added a folder in my repo for the Arduino IDE and symbolic-linked the main.cpp to the folder name .ino, as well as linking the "include" files. Doesn't work for all, but it's a simple project.

ethereal-engineer avatar Feb 05 '20 06:02 ethereal-engineer

Thanks @stonehippo ! Much appreciated

jamesmyatt avatar Feb 05 '20 12:02 jamesmyatt

Quick update: I’m working through adding the board definitions, and will need to make sure the right versions of AVRDUDE and the compiler are available. Will also need to confirm UPDI with pio run -t upload. Probably won’t have it all ready for a PR this weekend, but within the next few days.🤞🏾

stonehippo avatar Feb 08 '20 17:02 stonehippo

Hey that’s awesome. Thanks for the effort!

Thanks, Adam On 9 Feb 2020, 4:20 AM +1100, George White [email protected], wrote:

Quick update: I’m working through adding the board definitions, and will need to make sure the right versions of AVRDUDE and the compiler are available. Will also need to confirm UPDI with pio run -t upload. Probably won’t have it all ready for a PR this weekend, but within the next few days.🤞🏾 — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

ethereal-engineer avatar Feb 09 '20 08:02 ethereal-engineer

I'm also interested in seeing ATtiny1617 support.

ghoeffner avatar Apr 16 '20 20:04 ghoeffner

Just as an FYI (which may be unwelcome), 2.0.1 is basically out (it's in the github now) and like, there are a bunch of things different in it that might be relevant to this effort - basically it's a release to fix all the bad architecture decisions I made before, before things got any more widely deployed than they already were

SpenceKonde avatar Apr 16 '20 20:04 SpenceKonde

Thanks @SpenceKonde. I’ve been following 2.x and will bring it in.

stonehippo avatar Apr 16 '20 22:04 stonehippo

@stonehippo thanks for all your work on this. I'm transitioning to pio from Arduino IDE now and asked @SpenceKonde if he had any appetite to support pio. He pointed me here and after reading back through the issue, googling around pio community and looking at issues related to @MCUdude's MiniCore, MegaCore and MightyCore + documentation on setting fuses, I'm none-the-wiser about a) has support for megaTinyCore been added and b) is there an efficient way of importing necessary files without having to handwrite the platformio.ini for every combination of IC and fuse setting? Thanks for anyone who can enlighten me.

SimonMerrett avatar May 17 '20 11:05 SimonMerrett

@SimonMerrett short answer is that I got pulled into a bunch of other stuff and haven't had time to finish integrating MegaTinyCore into PIO yet. Good news is I'm taking a few days off, so I hope to get to it this week.

stonehippo avatar May 17 '20 14:05 stonehippo

Thanks @stonehippo , hopefully I'll have worked out how to use pio a bit better by then.

SimonMerrett avatar May 17 '20 17:05 SimonMerrett

@stonehippo is there any community contribution that could help with the megaTinyCore integration?

SimonMerrett avatar May 21 '20 15:05 SimonMerrett