Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supporting the ATtiny1614 #34

Open
supakeen opened this issue May 8, 2021 · 5 comments
Open

Supporting the ATtiny1614 #34

supakeen opened this issue May 8, 2021 · 5 comments

Comments

@supakeen
Copy link

supakeen commented May 8, 2021

Hey there, after suffering from a severe case of NIH I've decided to write some assembly for the ATtiny1614: https://www.microchip.com/wwwproducts/en/ATTINY1614

It's not directly listed in avra's devices list, if I wanted to make a PR to support it is this a case of matching https://github.com/Ro5bert/avra/blob/master/src/device.c#L51 to the specification sheet and submitting it or is there some deeper knowledge I must have?

@bwack
Copy link

bwack commented May 8, 2021

If I'm not mistaken, "tinyAVR® 1-series" are not implemented. I wonder how different this core is compared to AVR and how much work it would be to implement them into AVRA.
I ran into a similar problem as you last year. I programmed an attiny85 with AVRA, and I figured that it drew too much power in sleep mode and I went for an attiny412. I just went with C code and avrgcc instead.

@Ro5bert
Copy link
Owner

Ro5bert commented May 8, 2021

@bwack is right: the tiny1614 has what the AVR Instruction Set Manual calls the AVRxt core, and no devices with this core are currently supported in AVRA. However, all the cores are machine code-compatible (except for AVRrc), so I don't think it would be much work to support the tiny1614 (and similar devices). Apparently, the main difference between AVRe+ (the core of many devices that AVRA supports) and AVRxt is instruction timing (e.g., stores are only a single cycle), but an assembler doesn't care about this. The 1-series also seems to have different peripherals and memory map, but that also shouldn't matter. The AVRxt core generally supports the SPM Z+ instruction, which doesn't seem to be supported in mnemonic.c, but the specific device you mention doesn't support SPM Z+ anyway.

Hence, I think you should be able to get it to work simply by adding a line to the device array, but I'm not sure. If you wanted to give it a try and post your results, that be great. For determining the proper flags of a new device, appendix A of that instruction set manual I linked is a good resource. You should find the needed tiny1614-specifc memory information on pages 19 and 20 of the datasheet you linked.

@supakeen
Copy link
Author

supakeen commented May 8, 2021

I'll give it a try, I've got a bunch of them lying around and a programmer. Thanks for the pointers!

@ColonelPhantom
Copy link

Did you manage to get it working? I am also looking into maybe working with AVRxt devices (but then the ATMega's), and I would like to know if it can work with avra.

@Ro5bert
Copy link
Owner

Ro5bert commented Jul 30, 2021

@ColonelPhantom It looks like someone got the ATmega4809 (an AVRxt device) working over at #40.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants