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.

Project Help and Ideas » First Project - Make command does not work

January 22, 2010
by vashval2001
vashval2001's Avatar

I'm doing the first project and in step 10c I keep getting the following when I type in "make":

make -C ../libnerdkits

make: *** ../libnerdkits: No such file or directory. Stop.

make: *** [initialload.hex] Error 2

How do I fix it? Also of the topic where can I get the set up for "make music with microcontroller" project?

January 23, 2010
by pbfy0
pbfy0's Avatar

for the first problem, you need to copy the whole "Code" folder from the nerdkits CD to your computer.

for the second, here's a post about the music project for the ATmega168. View the tutorial first. The pins for the ATmega168 version are these:

PB5 -> buzzer -> ground
ground -> switch -> PC5

-Paul

January 23, 2010
by pbfy0
pbfy0's Avatar

Correction: you should copy the whole CD on to your hard drive

January 23, 2010
by vashval2001
vashval2001's Avatar

It didn't work. I downloaded the folder "Code" from nerdkits site. I put the folder on disk C. Then I go to command prompt: c: code initialload> and type in "make" but it doesn't work.

It seems that it can not find "libnerdkits" , I have that folder (libnerdkits) in the "code" folder. Maybe it should be some where else?

January 23, 2010
by Rick_S
Rick_S's Avatar

What folder are you in when you type make? Can you do a DIR command and see all your project files as well as the makefile? The directory structure in the code folder should not need to be changed to compile the projects in there. In your programs, you will have includes that look like this:

#include "../libnerdkits/delay.h"
#include "../libnerdkits/lcd.h"

When make sees these, it will look one folder up (../) for the libnerdkits folder, then specifically the files delay.h and lcd.h in that folder.

If you were to type THIS at the DOS prompt from the root directory of C:

c:\code\initialload\make

Then make would try to look one folder above C:\ which would give an error.

You have to first change to the initialload folder by typing:

cd c:\code\initialload

This is with the assumption that your code folder is in the root folder of C:.

Then when you type make, it should work as long as the delay.h, delay.c, lcd.h, and lcd.c files are in the libnerdkits folder one folder above your initialload folder like this:

C:\ --+
       |
       + - code --+
                  |
                  + - libnerdkits 
                  |         +
                  |         |
                  |         + - delay.h, delay.c, lcd.h, lcd.c
                  |
                  + - initialload
                  |       +
                  |       |
                  |       + - program files and makefile

Hope that helps,

Rick

January 23, 2010
by vashval2001
vashval2001's Avatar

Thanks Rick and Paul,

It just worked. My folders were in wrong places.

January 23, 2010
by Rick_S
Rick_S's Avatar

No problem, good to hear you are up and running...

Rick

Post a Reply

Please log in to post a reply.

Did you know that our kits have shipped to hobbyists in 40 countries? Learn more...