avrStudio 4 and Chinese sample code

Status
Not open for further replies.

ArixII

New Member
Hi,
I've got an LCD module from China which came with sample code. I tried to compile the code, there were errors which I could find and solve them, but one is remain that I have no idea where from it is coming.

Compiler speaks of redefinition of some functions, but after accurate looking in files, I could not find any redifinition, so may be this is an issue that I just don't know how to approach to? (being a newbie, I got this module to start from something working, and study, rather than from my nonworking experiences!).

First problem is addressed this way:
Code:
int.o: In function `delay_us':
C:\AVR_programmer\main\default/../delay.C:8: multiple definition of `delay_us'
delay.o:C:\AVR_programmer\main\default/../delay.c:8: first defined here

In init.c and init.h I have no definition of delay_us! So unknown why it complains! I've attached the source code, hex file and original Makefile, please if anyone have time and kindness to look at it, point me to the problem please. I'm now turning around me for days

Also interesting: the source code was supplied with the compilation result as a hex file that when I burn to the module (on atmega32L) works ok! May be I should not use avrStudio 4?



whole build report:
Code:
Build started 8.2.2011 at 23:32:09
avr-gcc  -mmcu=atmega32 -Wall -gdwarf-2 -Os -std=gnu99 -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT delay.o -MF dep/delay.o.d  -c  ../delay.c
avr-gcc  -mmcu=atmega32 -Wall -gdwarf-2 -Os -std=gnu99 -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT ILI9331.o -MF dep/ILI9331.o.d  -c  ../ILI9331.C
cc1plus.exe: warning: command line option "-std=gnu99" is valid for C/ObjC but not for C++
avr-gcc  -mmcu=atmega32 -Wall -gdwarf-2 -Os -std=gnu99 -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT int.o -MF dep/int.o.d  -c  ../int.c
avr-gcc  -mmcu=atmega32 -Wall -gdwarf-2 -Os -std=gnu99 -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT main.o -MF dep/main.o.d  -c  ../main.c
../main.c: In function 'main':
../main.c:26: warning: pointer targets in passing argument 3 of 'LCD_write_english_string' differ in signedness
../main.c:27: warning: pointer targets in passing argument 3 of 'LCD_write_english_string' differ in signedness
../main.c:29: warning: pointer targets in passing argument 3 of 'LCD_write_english_string' differ in signedness
../main.c:33: warning: pointer targets in passing argument 3 of 'LCD_write_english_string' differ in signedness
avr-gcc  -mmcu=atmega32 -Wall -gdwarf-2 -Os -std=gnu99 -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT ov7660.o -MF dep/ov7660.o.d  -c  ../ov7660.c
avr-gcc  -mmcu=atmega32 -Wall -gdwarf-2 -Os -std=gnu99 -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT ov7660config.o -MF dep/ov7660config.o.d  -c  ../ov7660config.c
avr-gcc  -mmcu=atmega32 -Wall -gdwarf-2 -Os -std=gnu99 -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT SCCB.o -MF dep/SCCB.o.d  -c  ../SCCB.c
avr-gcc -mmcu=atmega32 -Wl,-Map=main.map delay.o ILI9331.o int.o main.o ov7660.o ov7660config.o SCCB.o     -o main.elf
int.o: In function `delay_us':
C:\AVR_programmer\main\default/../delay.C:8: multiple definition of `delay_us'
delay.o:C:\AVR_programmer\main\default/../delay.c:8: first defined here
int.o: In function `delay_ms':
C:\AVR_programmer\main\default/../delay.C:14: multiple definition of `delay_ms'
delay.o:C:\AVR_programmer\main\default/../delay.c:14: first defined here
ov7660config.o:(.progmem.data+0x0): multiple definition of `change_reg'
ov7660.o:(.progmem.data+0x0): first defined here
make: *** [main.elf] Error 1
Build failed with 1 errors and 5 warnings...
 

Attachments

  • main.zip
    314 KB · Views: 2,719
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…