makefile w avr gcc + atmega8535

To forum jest dla wszystkich pasjonatów mikrokontrolerów AVR Atmela. Wymiana doświadczeń i pomoc dla początkujących w pisaniu programów zarówno w C, Asemblerze jak i BASCOM. Zapraszam znawców tematu, aby pomogli wszystkim początkującym!
ODPOWIEDZ
lux
-
Posty: 3
Rejestracja: 28 lip 2006, 22:02
Lokalizacja: Lodz

makefile w avr gcc + atmega8535

Post autor: lux » 28 lip 2006, 22:13

Zaczynam próby z C, korzystam w tej chwili z zalecen kursu w EdW avr-gcc.

Mimo takich samych ustawien i kompilowania sie programu, po zaladaowaniu hexa, nic sie nie dzieje

Zwrocilem uwage na plik makefile, dolaczany do katalogu projektu. Okazuje sie ze jak w pole MCU name wpisze sobie np. kwiatek :grin: to wszystko i tak przechodzi. Podejrzewam wlasnie, ze kompilator to nie korzysta z tego mojego makefile, i ma jakis inny domyslny z innym prockiem i nic sobie nie robi z mojego atmega8535

co innego jak zmienie np. target na inna nazwe niz powinienem, wtedy sie wykrzacza, wiec na pewno go czyta, tylko czemu wisi mu mcu name??

Prosze o pomoc w poprawnym/lepszym skonfigurowaniu IDE

to jeszcze podam poczatek mojego makefile:

# Hey Emacs, this is a -*- makefile -*-
#----------------------------------------------------------------------------
# WinAVR Makefile Template written by Eric B. Weddington, Jörg Wunsch, et al.
#
# Released to the Public Domain
#
# Additional material for this makefile was written by:
# Peter Fleury
# Tim Henigan
# Colin O'Flynn
# Reiner Patommel
# Markus Pfaff
# Sander Pool
# Frederik Rouleau
# Carlos Lamas
#
#----------------------------------------------------------------------------
# On command line:
#
# make all = Make software.
#
# make clean = Clean out built project files.
#
# make coff = Convert ELF to AVR COFF.
#
# make extcoff = Convert ELF to AVR Extended COFF.
#
# make program = Download the hex file to the device, using avrdude.
# Please customize the avrdude settings below first!
#
# make debug = Start either simulavr or avarice as specified for debugging,
# with avr-gdb or avr-insight as the front end for debugging.
#
# make filename.s = Just compile filename.c into the assembler code only.
#
# make filename.i = Create a preprocessed source file for use in submitting
# bug reports to the GCC project.
#
# To rebuild project do "make clean" then "make all".
#----------------------------------------------------------------------------


# MCU name
MCU = kwiatek


# 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 = modul_LCD


# List C source files here. (C dependencies are automatically generated.)
SRC = $(TARGET).c


# List Assembler source files here.
# Make them always end in a capital .S. Files ending in a lowercase .s
# will not be considered source files but generated files (assembler
# output from the compiler), and will be deleted upon "make clean"!
# Even though the DOS/Win* filesystem matches both .s and .S the same,
# it will preserve the spelling of the filenames, and gcc itself does
# care about how the name is spelled on its command-line.
ASRC =


# Optimization level, can be [0, 1, 2, 3, s].
# 0 = turn off optimization. s = optimize for size.
# (Note: 3 is not always the best optimization level. See avr-libc FAQ.)
OPT = s


# Debugging format.
# Native formats for AVR-GCC's -g are dwarf-2 [default] or stabs.
# AVR Studio 4.10 requires dwarf-2.
# AVR [Extended] COFF format requires stabs, plus an avr-objcopy run.
DEBUG = dwarf-2


[ Dodano: 2006-07-31, 12:24 ]
zainstalowałem winAVR-a z ustawieniem sciezek PATH w systemie, a nie jak opisywano w EdW, plik Makefile stworzylem w programie Mfile WinAVR. Teraz kompilator reaguje na niego prawidłowo

ODPOWIEDZ