avr-chat
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Support for ATTINY827, 1627 and 3227


From: Konrad Rosenbaum
Subject: Re: Support for ATTINY827, 1627 and 3227
Date: Wed, 22 Feb 2023 10:23:21 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.2

Hi,

On 22/02/2023 05:48, dvalin@internode.on.net wrote:
Yes, as stated. The UPDI programmer design I found needed an ATmega for
USB to serial conversion and whatever. Seeing the simplicity of your
approach, I'll skip that greater labour.

Matt's solution seems similar, also on a custom PCB.

Considering how simple UPDI as a protocol is, it is surprising how expensive and complex most of the progger designs are.



> The good news is: you can install arduino from its official download
> on Linux without contaminating other environments, it just sits in a
> separate directory and is quite happy there without installing stuff
> elsewhere. So cleaning it up is just deleting this arduino directory
> (and perhaps the "sketch" directory) from your home directory.

Hmmm ... dodged for the moment, but will doubtless crop up in the
future. After over 30 years of using the gnu toolchain on AVRs, PowerPC,
NEC V850, etc., I'm not amenable to mucking up an established workflow
by cluttering my mind with a dinky IDE. (And if it has a GUI, forget it. ;-)
AIUI, arduino source is gcc/g++ compatible, so it's probably just a
case of dropping it onto a concrete floor so the cruft falls off.

Arduino is mainly a convenience library and some black magic to add #include statements that are missing from the sketches. The flow is approximately this: user writes a sketch, which is syntactically C++ (but you never use its full power, because nobody tells you). The sketch omits all #includes, it just uses the objects (like "Uart1"). The IDE then guesses which libraries you meant to use and wraps the sketch with the (hopefully) correct #includes. Then the sketch and all necessary library files get compiled and linked. Finally it uses avrdude to upload the binary into the chip.

So to compile an Arduino sketch you definitely need Arduino installed, because it uses its own libraries. You may be able to compile on the command line once you observed what the "magic" calls are. I never tried to compile sketches on the command line, I copied some of the more mundane calls into my own Makefiles and then abandoned the Arduino libraries - it seemed like a saner approach to me.

If you just have a sketch from an outside source, it is definitely easier to just start the GUI and compile the sketch from in there. Don't worry, the GUI is so terrible that it is almost reminiscent of the old SunOS days... ;-)

It's a good way to get people started on microcontrollers, but almost everybody eventually emancipates from it.


    Konrad


Attachment: OpenPGP_signature
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]