avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] hi...some help for a newbie...


From: Anton Erasmus
Subject: Re: [avr-gcc-list] hi...some help for a newbie...
Date: Sat, 24 Jun 2006 12:47:17 +0200

On 23 Jun 2006 at 20:10, Srinath Sinha wrote:

> 
> Hi ! I've just started avr programming in C. Unfortunately I'm not being able 
> to get off the ground. 
> I'm using the WinAVR bundle. I write a simple piece of C code in Programmer's 
> Notepad, save it 
> as a .c file, make a corresponding makefile using Mfile, and then try to 
> build the .c file and the 
> makefile under a project....the error i get everytime irrespective of the 
> code i write is (and the 
> code's simple enough, so it cant be wrong i think !!! ) : 
> make.exe: *** No rule to make target `obj/main.o', needed by `test.elf'. Stop.
> 
> where test.c is my c file...
> where am i making a mistake ? or is there something i should be doing ? 

Looks like a makefile problem.

[C code snipped]

> 
> 2. My makefile is : 
> 
> 
> # MCU name
> MCU = atmega8
> 
> 
> # Processor frequency. 
> # This will define a symbol, F_CPU, in all source code files equal to the 
> # processor frequency. You can then use this symbol in your source code to 
> # calculate timings. Do NOT tack on a 'UL' at the end, this will be done 
> # automatically to create a 32-bit value in your source code.
> # Typical values are:
> # F_CPU = 1000000
> # F_CPU = 1843200
> # F_CPU = 2000000
> # F_CPU = 3686400
> # F_CPU = 4000000
> # F_CPU = 7372800
> # F_CPU = 8000000
> # F_CPU = 11059200
> # F_CPU = 14745600
> # F_CPU = 16000000
> # F_CPU = 18432000
> # F_CPU = 20000000 
> F_CPU = 8000000
> 
> 
> # Output format. (can be srec, ihex, binary)
> FORMAT = ihex
> 
> 
> # Target file name (without extension).
> TARGET = test
> 
> 
> # Object files directory
> OBJDIR = obj
> 
> 
> # List C source files here. (C dependencies are automatically generated.)
> SRC =

Add source files here. Yours look like it should be 
SRC = $(TARGET).c


> 
> # List C++ source files here. (C dependencies are automatically generated.)
> CPPSRC = main.cpp

Remove this unless you have a C++ source file.
CPPSRC =

[Rest of makefile snipped]

Regards
  Anton Erasmus

> 
> 

-- 
A J Erasmus





reply via email to

[Prev in Thread] Current Thread [Next in Thread]