SparkFun Forums 

Where electronics enthusiasts find answers.

Your source for all things Atmel.
By rahuljin
i download the code for atmega8 from this link which can be used for atmega16/32 ---
Code: Select all
i tried to generate hex file in winavr20100110 but found error ----
Code: Select all
>> "make.exe" all

-------- begin --------
avr-gcc (WinAVR 20100110) 4.3.3
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO

Compiling C: main.c
avr-gcc -c -mmcu=atmega16 -I. -gdwarf-2 -DF_CPU=8000000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=./main.lst  -std=gnu99 -MMD -MP -MF .dep/main.o.d main.c -o main.o 
In file included from main.c:4:
lcd_driver.h:12: error: expected declaration specifiers or '...' before 'PGM_P'
main.c: In function 'main':
main.c:35: warning: passing argument 3 of 'putstr_pgm' makes integer from pointer without a cast
main.c:35: error: too many arguments to function 'putstr_pgm'
make.exe: *** [main.o] Error 1

> Process Exit Code: 2
> Time Taken: 00:06

the error is for this line in lcd_driver.h ----
Code: Select all
uint8_t putstr_pgm(uint8_t x, uint8_t y, PGM_P p, uint8_t fg, uint8_t bg);
the second error is for this line ----
Code: Select all
putstr_pgm(10, 7, &(hello_world[0]), 0x00, 0x1C);
please help :?
By tommseva7
Liencouer wrote:
lcd_driver.h:12: error: expected declaration specifiers or '...' before 'PGM_P'
lcd_driver.h doesnt know what a PGM_P is, you're missing a #include <avr/pgmspace.h>, I think. ... space.html

ya it works..!! thanks
long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]