Page 1 of 1

Getting error in avr cam(F:\ProgramFiles\winavr\bin\..\lib\g

PostPosted: Sat Apr 01, 2006 1:26 am
by chaps555
Hello evry one,
I tried to convertatmeags 8 code to 128 i have done all register changes , but at the end i am getting this error
********************************************************************
F:\ProgramFiles\winavr\bin\..\lib\gcc\avr\3.4.5\..\..\..\..\avr\bin\ld.exe: section .bss [00800110 -> 00800383] overlaps section .noinit [00800300 -> 0080032f]
make.exe: *** [AVRcam.elf] Error 1
***********************************************************************

I dont know wht the error is all about and how to remove this.

hope some body helps.
waiting for reply eagerly.

Regards

chaps

PostPosted: Sat Apr 01, 2006 12:42 pm
by johno
This error has to do with the fact that the colorMap needs to be aligned on an address that ends in 0x00. In other words, on the mega8, the colorMap is specifically setup to live at address 0x300 (see CamInterface.c and the makefile to understand what is going on here...read the comments in both, and in the makefile look for the line that has the --section-start=.noinit=0x800300). This is needed because the assembly code that indexes into the colorMap to extract a particular color needs to be as fast as possible, and there was a cycle or two that could be saved by forcing the colorMap to live at an address ending in 0x00.

To port this to the mega128, all you would need to do is to find a section of RAM that ends in 0x00 for your use, and move the noinit section in the makefile to point to that address. I'm guessing from the looks of your error, you could set your makefile to point to 0x800400 and it would work just fine. The code itself shouldn't have to change.