EmbDev.net

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


Author: Thierry Renaux (tyr)
Posted on:
Attached files:

Rate this post
0 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/tre... 
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
Author: Rolf Magnus (Guest)
Posted on:

Rate this post
0 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.

Author: Thierry Renaux (tyr)
Posted on:

Rate this post
0 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 ?

Author: Rolf Magnus (Guest)
Posted on:

Rate this post
1 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
make
[/C]
you generate the program. When you want to burn it onto a device, you write:
[Code]
make upload

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

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

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

Author: Thierry Renaux (tyr)
Posted on:

Rate this post
0 useful
not useful
Hello Rolf,

Got it ! Thank you for these clear explanations.

Best regards

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig