How to learn application and libraries design skills for Arduino and AVR


I've been working with small Arduino projects so I understand basics of C and C++.

I'm actually now in India, Bengaluru to study embedded systems. The course prerequisites are introduction to Linux, Adv C and data structure.

I studies little in Linux and now in Adv C which is most important course, this course is about basics of C.

I learned little about pointers, structs, enums, unions and arrays.

The rest of the course is about linux device drivers and microcontrollers.

I can't take the whole course, so I'm finishing with C.

What I really want to learn is the advanced skills in Arduino and AVR.

I see libraries and code which are very difficult for me to grasp the picture of designing the project code, which includes different files and connect them together.

Also definitions and preprocessors are more difficult than functions and pointers.

My question is how to get to this level?


The field of embedded systems which you have outlined is very broad.
You are looking at things at many different levels. There is the design of the application, how it is modeled in C/C++ classes, the data structures, program flow, how this is all structured into libraries, files etc.
You are also looking at a very specific platform, AVR and the features which are found in an system on a chip, ( and the Arduino Development environment which is a simplified interface to the basic AVR tools) and you are also looking at the compilation/linking process with preprocessor directives etc. for generating the machine code for the specific target architecture from the source C/C++ code.

I guess if you want to get your hands 'dirty' at a very low level with the AVR architecture, you could look for the data sheet for the chip used in, say, the Uno (ATMEGA328P) and use the basic AVR supplied tools (look up AVR tool chain) and not the Arduino development environment to develop sample applications.

It seems to me that you firstly need to learn more about general C/C++ programming. Many of your questions seem to be about that and really have nothing specific to do with embedded systems.

Perhaps get a C/C++ text book.

IMHO developing projects on an Arduino is good way to get to grips with the different approach needed for a micorprocessor system compared to a PC with an operating system. I would be surprised if there are Atmega 328 projects which require the AVR programming system and cannot be implemented using the Arduino system.

Of course the AVR system will be able to deal with Atmel chips that the Arduino system does not use and it may also be more appropriate for collaborative development in a professional work environment. But it will just be another way of implementing the same general approach.

Whatever direction you choose it is important not to try to eat your elephant all at one meal. Take things in small steps. Your Original Post has the flavour of someone trying to consume a whole elephant.

By the way (and just as a humourous aside) ...

The phrase
"I learned little about pointers"
has almost the opposite meaning to the phrase
"I learned a little about pointers"

The first means you learned more or less nothing.