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 Answers
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.
- 146
- 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.
- 7,989
- 2
- 16
- 21
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.
- 11
- 2