2

I've been given a digispark and am looking to write straight assembly code for it. Anyone know how to get started with this? I've been successful in getting the Arduino IDE set-up but would really like to avoid writing assembly in-line...

3
  • If you want to write assembly, ditch the arduino IDE and just use the avr toolchain straight. – BrettAM Jan 6 '16 at 0:44
  • @BrettAM I've really been trying to figure it out. Know of any good tutorials that might help? Appreciate the response. – Jester Jeffrey Jan 6 '16 at 6:24
  • Why do you want to? Seriously. – Nick Gammon Feb 5 '16 at 10:11
1

There seems to be some specific attiny flag required but by the gcc in order to make the genereated hex file work with digispark. Take a look here https://github.com/pda/digispark-asm.

1
  • A specific flag? You mean -mmcu=attiny85? – Edgar Bonet Feb 6 '16 at 11:48
1

I've been given a digispark and am looking to write straight assembly code for it. Anyone know how to get started with this? I've been successful in getting the Arduino IDE set-up but would really like to avoid writing assembly in-line...

The Arduino IDE build support assembly files (.S). Nerd Ralph has written a blog on the subject. There you will find all the details and how to write both inline and pure assembly files. He is really god at digging out all the details and sharing his findings.

1

In 2021, I use VSC + Platformio.

I create a main.asm file in which I put the code from https://github.com/pda/digispark-asm.

In the "platformio.ini" file I define the digispark as :

[platformio]

default_envs = digispark-tiny

[env:digispark-tiny]

platform = atmelavr

board = digispark-tiny

I run the code, upload it to a digispark and this works amazingly well.

New contributor
P Visit is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.