128x64 Graphic displays problems / advice

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi guys,

I am currently trying to get a 128x64 display going (KS0108 chipset).

I am using an example that I found on http://www.scienceprog.com/controlling-graphical-128x64-lcd-based-on-ks0108/

It uses Fabian Maximilian Thiele library to work http://www.scienceprog.com/wp-content/uploads/2007/07/glcd_ks0108.zip

The first problem that I am having with it is that I get the following error when I try to compile the code:

../ks0108Test.c:24: error: 'for' loop initial declaration used outside C99 mode

From what I have managed to read so far it is due to variables being declared within the for loops:

	for(volatile uint16_t i=0; i<15000; i++);

I tried to fix the code by pulling the declaration outside the for loops but this runs me into a 2nd problem, the compiler not being able to locate my .elf file. A manual look at the folder confirms that the .elf file does not exist.

I realize that the 2 problems are most likely unrelated BUT I would still love a bit of advice to point me in the right direction.

I'm not a cartoon character but I play one in real life.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You do not say which compiler you are using.
avr-gcc permits your local variable declaration, but it is not legal C.

Creating an .elf file looks like avr-gcc.
If it has not been created then the compile or link has failed. If you have an avr-gcc problem you are better to ask in the GCC forum.

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm using GCC with AVR Studios 4.

I'm not a cartoon character but I play one in real life.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Try:
make clean
make

Copy and Paste the error messages.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Have a look at your project options. Do they look like this: (in particular the -std setting):

Attachment(s):