NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Microcontroller Programming » error: unknown type name 'int16_t'

January 15, 2013
by keith712
keith712's Avatar

i have started fresh on my projects and duplicated my clean copy of the libnerdkits folder and dropped into my projects folder... i removed the lcd.o, uart.o, delay.o files to force a recompile of the source code but now i either get an error saying

fatal error: lcd.h: No such file or directory

or when i put the lcd.h folder back into the library i get

  ../libnerdkits/lcd.h:[line number}:[another number]: error: unknown type name 'int16_t'

and

  ../libnerdkits/lcd.h:[line number}:[another number]: error: unknown type name 'uint8_t'

on three lines in lcd.h

does anybody know what i've done to myself this time?

January 16, 2013
by Rick_S
Rick_S's Avatar

Did you maintain the directory structure of the code folder?

code +
     |
     + libnerdkits
     |
     + Yourproject_folder
January 19, 2013
by keith712
keith712's Avatar

hi Rick... i maintained the structure that i had before this problem developed... i'm not familiar with your notation above but here's my tree:

Desktop

    avrProjects folder

        libnerkits folder

        project folder

            code file

            makefile

and my makefile contains the line:

LINKOBJECTS=../libnerdkits/delay.o ../libnerdkits/lcd.o ../libnerdkits/uart.o

i think the double dot (..) tells the compiler to go to the parent folder of the project folder to find the libnerdkits folder

i'm going to do a couple of hours of trouble-shooting this evening... thanks as always... k

January 19, 2013
by Noter
Noter's Avatar

LINKOBJECTS aren't used until you get a good compile. It looks like your source code is missing

#include <avr/io.h>

or it isn't placed before the include for lcd.h.

January 19, 2013
by keith712
keith712's Avatar

thank you guys... the problem was that i forgot i had switched from my atmega168 kit to my 328p kit...

if i can pick your brains further... when i change from the 168 to the 328p processor i need to

update project code:

add #include "../libnerdkits/io_328p.h"

update project makefile:

line 1: change atmega168 to atmega328p
line 3: change m168 to m328p
line 4: add ../libnerdkits/io_328p.h to end of line

update libnerdkits makefile:

line 1: change atmega168 to atmega328p

am i missing anything important and also any explanations would be appreciated...

later, k

Post a Reply

Please log in to post a reply.

Did you know that you need to think about wires differently when you're transmitting signals more than a few inches? Learn more...