FreeRTOS for Atmel ATMega32A anyone

I’m thinking of upgrading my ATMega32A project to use FreeRTOS. I’ve looked at the ATMega323 and the ATmega port but neither seem to compile on Microchip Studio 7 using the ATmega32A device definitions. The register (and I assume the hardware) are close but not quite.

I’m familiar with programming the ATmega, but new to FreeRTOS. Before I go in for a dive, I was wondering is anyone had a port that would work (or might be closer)? Or is there a reason no one has used FreeRTOS on this device?

The 323 port should work on the ATMega32, but not sure about the 32A. What is the difference between the 32 and 32A? What is the build error you see?

As I remember the only difference between the 32 and 32A is the electrical characteristics.

I’ll have to revert back to the 323 and recreate it. Just a bunch of compile errors as I remember. After playing with the ATMega port for a while, I’m understanding the infrastructure a bit more so I’ll try it again in the morning.


May be able to help more after seeing the compiler warnings/errors. That was one of the very first ports nearly 20 years ago, with a makefile as I recall :grinning:

I went back to the 323 variant and was able to get it to compile (but not tested yet). I think most of my problem there is the way I was integrating it into my project. I had watched a YouTube video that had stripped out all the unessential stuff and apparently I had stripped out some of the runtime.

In addition, I had watched the DigiKey videos and they use Arduino as a base, so I didn’t have a main().

My solution so far is to have a separate static library project with the FreeRTOS source for ATmega323 compiled into a .a file. I then included that into my project using the toolchain include path (-I), link path (-Wl,L), and libraries (-Wl,l)

That look right?

More images:

Should work, although sometimes it take me a bit of fiddling to get the syntax right.