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 » Basic programming help

July 29, 2012
by BankerMoor
BankerMoor's Avatar

I can't seem to navigate to the intialload folder in order to start compiling. I am terribly confused. I found the serial port and changed that to the correct number. I also understand where the code is and how it works, I am just having a really hard time getting it on the chip.

July 29, 2012
by sask55
sask55's Avatar

BankerMoor

I am not certain that I understand your question.

From the NerdKits Guide

“ 1. Now that you have seen the code, we need to use the command line to program the chip.

  1. Open up the command line and navigate to the folder with the code in it.

  2. List the files in the directory and make sure there is a file called Makefile.

  3. Type “make” and press enter to run the “make” command. This command will look for the Makefile and use it to compile all the code, and will then program the chip using the binary files. (If you want to learn more about Makefiles, go to http://www.eng.hawaii.edu/Tutor/Make/ .)

  4. You should see an output on the command line telling you what the program is doing.”

Are you saying you are having a problem with step 2?

Is it opening the command line that you are having trouble with?

Is it navigating to the correct folder with the command that you are having trouble with?

Or is it running the make file in that folder that is not working for you?

Darryl

July 29, 2012
by sask55
sask55's Avatar

somehow the step numbers got changed in my post what I meant by step 2 is listed as the second step 1.

July 29, 2012
by BankerMoor
BankerMoor's Avatar

I type "make" and I get make: *** No targets specified and no makefile found. Stop.

July 29, 2012
by BankerMoor
BankerMoor's Avatar

I am having a problem with both navigating/running the program and running the file. Im pretty good with the terminal and I know where it is I can find the files.

July 29, 2012
by BankerMoor
BankerMoor's Avatar

Also, I am in avr-gcc-select 4, when ls I only see where the usb port. I don't see the makefile.

July 29, 2012
by sask55
sask55's Avatar

I don’t know what you mean by “in avc=gcc=select 4

You should have copied the two files, initialload.c and Makefile into a folder on your computer.

To be clear I will use an example file structure that will not match up with your file structure.

Lets say that you have the two files initialload.c and Makefile copied into a file location C:nerdkitcodeinitialload.

You then open the command line and navigate to this same folder in the command line window. So now the bottom line in the command window will be. C:nerdkitcodeinitialload>

If you type dir you will see what is in this folder. You should see the two files listed.

If this is the case then type make and press enter. This should compile the code and send it to the MCU.

comand window

July 29, 2012
by sask55
sask55's Avatar

This text editor does some strange things. The file location I am using is.

 C:\nerdkit\code\initialload>
July 30, 2012
by BankerMoor
BankerMoor's Avatar

Thanks, ill try using that file path. So when you compile, does that mean its wrting the code onto the chip? Or does it flashed to the chip in the next process?

July 30, 2012
by BankerMoor
BankerMoor's Avatar

Also, the mac part of the guide tells you to switch to the gcc 4 compiler.

July 30, 2012
by sask55
sask55's Avatar

I should have asked what OS you are using. I have no experience using a Mac with the Nerdkit. I have used several different versions of windows OS that all seam to work well for me. I am certain someone with experience using the Mac will be able to help you out much better then I will.

Post a Reply

Please log in to post a reply.

Did you know that a square wave sounds different than a sine wave? Learn more...