AVR-GCC ABC [1]

This time I decided to lay down some information on using the AVR-GCC compiler. I will not rewrite what’s in documentation is already written, but write down some issues that can help you start using this amazing tool. Introduction Most AVR programmers probably had a question in their mind about what compiler to use for their designs. The choice is huge. You can use commercial ones like IAR, CodeVision, ImageCraft. These compilers come with convenient GUI’s, code generators. But you have to buy a license to use them. So if you are going to do a low-budget project, the best choice is to use the open-source compiler GCC. This is the most successful open-source compiler in the world. The AVR platform is called AVR-GCC. The compiler itself has no graphical interface. Everything can be done in the MSDOS command line or the Linux command line. To make it easier to compile a project, there are makefiles used. GNU compilers usually are using UNIX style make files. This file can be run with the make.exe program. In reality, you don’t have to write makefiles – there are ready templates to use.Everyone may agree that using a compiler in the command lineā€¦

Continue reading

Microcontroller C programming

There is no doubt that everyone faces C language when programming microcontrollers. This is the most popular language among hardware programmers. There are plenty of books about this language – you have to open and read. This article is not about language basics, but c language’s effectiveness in embedded systems touched. Quite often, you can find good examples of effective algorithms: faster code performance and code size. To write a good optimal algorithm, you have to know the structure of the compiler. Of course, we will not analyze compilers, but we can look through a few rules and tricks and achieve an optimal algorithm.

Continue reading