User forums > Help
WinAVR Project Migration
Keyla:
Hi there!
I tried to test out the new support of AVR-GCC and AVRLibC (both = WinAVR package). For this I migrated some projects that I build using make and an editor to a new empty project. Then I setted the compiler to AVR-GCC and checked the right CPU type.
Next created an #f_cpu declaration for the cpu frequency. No problem if you had some experiences.
But my problem is to get the whole project compiled. I've get allways "allready declared here..." or "undeclared symbol". That might be a problem with the dependencies (I used not every time headers).
I don't know if CB analyses the dependencies differently than pure make/mfile?
If you like I can post my project but I doesn't wonna let you think that I wan't just to shift my responsibility ;)
mandrav:
--- Quote from: Keyla on June 12, 2007, 08:40:26 pm ---If you like I can post my project but I doesn't wonna let you think that I wan't just to shift my responsibility ;)
--- End quote ---
No need for that (not for now at least). Just enable full logging and post the build log here.
Keyla:
o.k. here is the full command line log:
--- Code: ----------------- Build: Debug in GLCD ---------------
avr-gcc.exe -mmcu=atmega64 -IC:\Programme\Entwicklung\WinAVR\include -IC:\Programme\Entwicklung\WinAVR\avr\include -c Source\S1D13700.c -o obj\Debug\Source\S1D13700.o
In file included from Source\S1D13700.c:2:
C:\Programme\Entwicklung\WinAVR\avr\include/util/delay.h:136:3: warning: #warning "F_CPU not defined for <util/delay.h>"
Source\S1D13700.c: In function `glcdInitHW':
Source\S1D13700.c:271: error: `GLCD_DATA_DDR' undeclared (first use in this function)
Source\S1D13700.c:271: error: (Each undeclared identifier is reported only once
Source\S1D13700.c:271: error: for each function it appears in.)
Source\S1D13700.c:272: error: `GLCD_CTRL_DDR' undeclared (first use in this function)
Source\S1D13700.c:272: error: `GLCD_CTRL_A0' undeclared (first use in this function)
Source\S1D13700.c:272: error: `GLCD_CTRL_RW' undeclared (first use in this function)
Source\S1D13700.c:272: error: `GLCD_CTRL_RD' undeclared (first use in this function)
Source\S1D13700.c:272: error: `GLCD_CTRL_RESET' undeclared (first use in this function)
Source\S1D13700.c:274: error: `GLCD_DATA_PORT' undeclared (first use in this function)
Source\S1D13700.c:277: error: `GLCD_CTRL_PORT' undeclared (first use in this function)
Source\S1D13700.c: In function `glcdControlWrite':
Source\S1D13700.c:298: error: `GLCD_DATA_PORT' undeclared (first use in this function)
Source\S1D13700.c:299: error: `GLCD_CTRL_PORT' undeclared (first use in this function)
Source\S1D13700.c:299: error: `GLCD_CTRL_A0' undeclared (first use in this function)
Source\S1D13700.c:300: error: `GLCD_CTRL_RW' undeclared (first use in this function)
Source\S1D13700.c: In function `glcdControlParamWrite':
Source\S1D13700.c:308: error: `GLCD_DATA_PORT' undeclared (first use in this function)
Source\S1D13700.c:309: error: `GLCD_CTRL_PORT' undeclared (first use in this function)
Source\S1D13700.c:309: error: `GLCD_CTRL_A0' undeclared (first use in this function)
Source\S1D13700.c:310: error: `GLCD_CTRL_RW' undeclared (first use in this function)
Source\S1D13700.c: In function `glcdControlParamRead':
Source\S1D13700.c:320: error: `GLCD_DATA_DDR' undeclared (first use in this function)
Source\S1D13700.c:321: error: `GLCD_CTRL_PORT' undeclared (first use in this function)
Source\S1D13700.c:321: error: `GLCD_CTRL_A0' undeclared (first use in this function)
Source\S1D13700.c:322: error: `GLCD_CTRL_RD' undeclared (first use in this function)
Source\S1D13700.c:323: error: `GLCD_DATA_PIN' undeclared (first use in this function)
Source\S1D13700.c: In function `glcdReset':
Source\S1D13700.c:349: error: `GLCD_CTRL_PORT' undeclared (first use in this function)
Source\S1D13700.c:349: error: `GLCD_CTRL_RESET' undeclared (first use in this function)
Source\S1D13700.c: In function `glcdClearLayer':
Source\S1D13700.c:367: error: `SAD1' undeclared (first use in this function)
Source\S1D13700.c:372: error: `SAD2' undeclared (first use in this function)
Source\S1D13700.c:377: error: `SAD3' undeclared (first use in this function)
Source\S1D13700.c:383: error: `GLCD_XPIXELS' undeclared (first use in this function)
Source\S1D13700.c:383: error: `GLCD_YPIXELS' undeclared (first use in this function)
Process terminated with status 1 (0 minutes, 0 seconds)
30 errors, 1 warnings
--- End code ---
There is a realy strange thing! The main() is not in the file which is passed in the first line. Realy strange because in the real mainfile the declaration should be o.k.
--- Code: ---//TestS1D13700.c
int main(void)
{
...
}
--- End code ---
Has anybody an idea?
Keyla:
Well I don't know, is it to simple? I have no clue hoe to fix it :/
stahta01:
If I had the source code, I may be able to help you fix it.
Found what maybe the source at http://hubbard.engr.scu.edu/embedded/avr/avrlib/
You need to determine which header file contains the missing defines.
Then make sure the folder that contains the header is in the search path.
Tim S
Navigation
[0] Message Index
[#] Next page
Go to full version