AVRTOOLS: Problem with building test project

Go To Last Post
8 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have downloaded and install AVRTOOLBOX from SmileysMicros and open tester code project "serial_a_tester_atmega328".
Building return error:

Quote:
c:/program files/atmel/avr tools/avr toolchain/bin/../lib/gcc/avr/4.4.3/../../../../avr/bin/ld.exe: cannot find -lavr_atmega328_002

I have found that file "avr_atmega328_002.a" is in list as additional objects. But I can't find this file in avrtools folder.
Other test project's also require this file.
How to resolve this problem (or better ask: where to find this file)

Regards!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

"avr_atmega328_002.a"

The -l command suggests the file will actually be called:

libavr_atmega328_002.a

If you locate it then pass a -L to the linker to identify which directory it is located within.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There is no such file in whole disk...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I had removed this declaration from library list. I decided to build project with out.
After I include ALL source (.c and .h) files into project, build stuck with several's errors. I focused on one of them:

Quote:
Error 8 'UART_ENABLE_TRANSMITTER' undeclared (first use in this function) C:\avrtoolbox\libavr\source\driver\usart\usart0.c 355 1 usart_c_328

I found that this defininition is depend on on this
Quote:
#elif defined(__AVR_ATmega128__) \
|| defined(__AVR_ATmega1281__) \
|| defined(__AVR_ATmega2561__) \
|| defined(__AVR_ATmega328P__)
// ATMega with two uarts - uart 0
// or with one uart but using 0 in register/bit names (like ATmega328)
#define UART_BAUD_RATE_HIGH UBRR0H
#define UART_BAUD_RATE_LOW UBRR0L
#define UART_CONTROL_STATUS_REG_A UCSR0A
#define UART_CONTROL_STATUS_REG_B UCSR0B
#define UART_CONTROL_STATUS_REG_C UCSR0C
in usart0.c file.
Since my CPU is ATmega328P in project configuration, I can't figure out why compiler wan't compile

#define UART_CONTROL_STATUS_REG_A	UCSR0A

regulary ?
My C knowledge is very limited, I just transfering from bascom to C, so this problem is quite hard for me.
I hope SmileysMicro would resolve this for me. (and rest of us).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

First off I'd like to thank Cliff for PMing me since I missed the post.

The reason I missed it is that I monitor avrtoolbox which is what I'm working on and not AVRTOOLS which is something I don't know about.

The library: libavr_atmega328_002.a was not in the trunk under the librarian like it should have been - sorry about that - but it is up there now:http://code.google.com/p/avrtoolbox/source/browse/#svn%2Ftrunk%2Flibavr%2Flibrarian%2Fatmega328
I've been having trouble with my TortoiseSVN and I think I must have removed some stuff accidentally.

The introduction to this stuff is at: http://smileymicros.com/blog/?MMN_position=139:139But I do not yet have a simple quick start guide to this project and I now see that as a weakness that I'll have to address as soon as I get around to it.

You need to be much more careful about the way you use names since you got neither the project nor the library name correct and without Cliff's intervention, I might not have seen this post.

Smiley

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You completely right. I realy can't figure out how I make mistake AVRTOOLS<>AVRTOOLBOX
But about library name from error line: It's copy paste.
Ok.. it's resolved. It seam I'm the only one tried test code, since no one complain about this file before :)
Smiley, could you be so kind and answer to my second question, please ? I'd like to figure out how to compile project without libavr_atmega328_002.a.
Thank you!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It's OK now ! I can compile now.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Good to hear.

This project only gets what leftover time that I can spare to feed it which isn't much so any suggestions you might have to make it more easily usable are welcome. Also note any bugs - and there are bound to be some. But use 'avrtoolbox' in the title :)

Smiley