News for hackers. Stuff that matters.
Re:DigiSpark (ATTiny85) – Arduino, C, Rust, build systems by nhatcher on Monday October 30, 2023 @09:44AM (#38069381)
That's exactly what I do. I like programming for the ATTiny85 a lot. I basically have my usbtiny programmer always connected to the computer and in a different breadboard the project I am actually working with. Then a simple Makefile takes care of the rest. It's a bit tedious to have to mount and unmount the chip every time, but it's ok. FWIW, this is my Makefile:

    CC=avr-gcc
    FLAGS=-w -Os -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=attiny85
    OBJCOPY=avr-objcopy


    compile:
        $(CC) $(FLAGS) main.c -o main.elf

    main.hex: compile
        $(OBJCOPY) -j .text -j .data -O ihex main.elf main.hex

    upload: main.hex
        avrdude -v -pattiny85 -cusbtiny -Uflash:w:main.hex

    clean:
        rm -r main.elf
        rm -r main.hex
Re:DigiSpark (ATTiny85) – Arduino, C, Rust, build systems by jareklupinski on Monday October 30, 2023 @11:28AM (#38070664)
> It's a bit tedious to have to mount and unmount the chip every time

after ZFS sockets started getting expensive, i started designing my programmable boards to include a header for https://www.tag-connect.com/ and have by now saved the cost of all those bent pins ;)