EmbDev.net

Forum: µC & Digital Electronics Makefile does not complete (Linux)


von Thierry R. (tyr)


Attached files:

Rate this post
useful
not useful
Hi all,

I have purchased and assembled this well known component tester designed 
by Markus Reschke, Markus Frejek and Karl-Heinz Kuebbeler based on an 
AVR ATmega328. It is working fine, but did not came with the latest 
firmware version and I would like to take advantages of the nice 
improvements recently made by Markus.
I am working on Linux, have downloaded the latest firmware version from 
https://github.com/svn2github/transistortester/tree/master/Software/Markus 
and would like to install it on the tester.
I have configured the files to my needs but I don't why I cannot program 
the ATmega328 !
The Makefile works, generates all .o .eep .hex .lss and .map files but 
stops at this point, it does not generate any error, but also does not 
process 'avrdude' nor the rest of the Makefile.


Here are the last lines produced by 'make -f Makefile' :
###
avr-gcc -mmcu=atmega328 -Wall -mcall-prologues -I. -Ibitmaps -DF_CPU= 
...
avr-gcc -mmcu=atmega328 -Wl,-Map=ComponentTester.map main.o user.o 
pau...
avr-objcopy -O ihex -R .eeprom -R .fuse -R .lock -R .signature 
Compone...
avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" 
--chan...
avr-objdump -h -S ComponentTester > ComponentTester.lss

AVR Memory Usage
----------------
Device: atmega328

Program:   20554 bytes (62.7% Full)
(.text + .data + .bootloader)

Data:        207 bytes (10.1% Full)
(.data + .bss + .noinit)

EEPROM:      608 bytes (59.4% Full)
(.eeprom)
###



I am new to Linux, AVR, makefiles and can't find a clue to go on.
Any help will be welcome !

Thank you
Best regards

: Edited by User
von Rolf Magnus (Guest)


Rate this post
useful
not useful
Seems to me like it works as intended. Makefiles are based on rules. If 
you don't explicitly specify a rule, it will apply the first one in the 
Makefile, which is 'all'. Then it recursively applys all rules that are 
specified as dependancies of 'all'. This doesn't include the rules 
'upload', 'dist' or 'clean', so those are not applied.

von Thierry R. (tyr)


Rate this post
useful
not useful
Alright, but how to specify that all rules must be applied ?
I found no info in 'man make' !
Do I have to modify the Makefile itself, and how ?

von Rolf Magnus (Guest)


Rate this post
useful
not useful
Thierry R. wrote:
> Alright, but how to specify that all rules must be applied ?

Why would you want to?

> I found no info in 'man make' !
> Do I have to modify the Makefile itself, and how ?

No. You just specify what you want to do. With a simple
1
make
2
[/C]
3
you generate the program. When you want to burn it onto a device, you write:
4
[Code]
5
make upload

If you want to put everything that's relevant for providing the sources 
to someone into an archive, you do
1
make dist

And for removing anything that was generated, you do
1
make clean

Why would you want to do all of that every time?

von Thierry R. (tyr)


Rate this post
useful
not useful
Hello Rolf,

Got it ! Thank you for these clear explanations.

Best regards

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.