FreeRTOS atmega8 – problems with compilation


I tried to compile and run FreeRTOS for atmega8 yesterday. I’m going to implement RT operating system in my linefollower robot.

I tried to change, build amd run an axample for atmega323. I changed MCU in makefile to atmega8, next edited FreeRTOSConfig.h:

    #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 80 )
    #define configTOTAL_HEAP_SIZE ( (size_t ) ( 800 ) )

And tried to rebuild it but i finally get following error:

c:/winavr-20090313/bin/../lib/gcc/avr/4.3.2/../../../../avr/bin/ld.exe: rtosdemo.elf section .text will not fit in region text

c:/winavr-20090313/bin/../lib/gcc/avr/4.3.2/../../../../avr/bin/ld.exe: region text overflowed by 1148 bytes

When for example I took into a comment all main in example, region text is overflowed by 648 bytes for example.

What I’m doing wrong, what should be changed to build project for atmega8? I dont need many tasks, 2-3 so atmega8 will be enough?

Maybe somebody have it prepared and ready for compilation on atmega8? Could u send me it on mail or upload to some free service  if you have?

I’m not nevbie in programming, I have my robot fully working now with single C code based hex, but need to implement FreeRTOS in it. I spent few days on it and couldnt to get it working – also searched much in web, but noone told directly what to do and all tips didn’t have much effect.

Please help me and thanks you very much in advance.

FreeRTOS atmega8 – problems with compilation

Sounds like you have simply run our of flash space.

FreeRTOS atmega8 – problems with compilation

Ok, it seemd like it for me, but what should I do so? How can i make FreeRTOS smaller than that? It was only example compiled.

FreeRTOS atmega8 – problems with compilation

I know that helping this way is hard. My email if sb could send compiled and fully working example I would be very grateful.


FreeRTOS atmega8 – problems with compilation

I would be happy to email you a working project, if you first provide:

1) The required hardware.
2) The required compiler.
3) A small fee.

but I would much rather problems were sorted out on this forum so it provides a valuable resource for other open source users.  Moving things to private email helps nobody but yourself.

Somebody emailing you a binary is not going to help you increase the amount of flash your microcontroller has available.


FreeRTOS atmega8 – problems with compilation

Yes, but its hard to post all code here, maybe could write me what to do. I use atmega8 with 8k flash and compile it with AVR-gcc. I tried to compile provided example, but it tooks too much space in my microcontroler.

Now code to ensure good working of my linefollower takes 4% of total flash, but I didnt tried to implement it to FreeRTOS yet – first tried to compile an example.

How much of flash takes the OS after compiling? I need only 3 simple tasks – 1 to get ADC reads, 2 to show sth on LCD and 3 to realise PID algorithm and stearing engines.