avr-gcc with avrstudio

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

Hi,
Unable use/configure avr-gcc with avr studio.
Help me out for above problem.
pramod natu

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

You have to be more specific...

- Larry

admin's test signature
 

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

Hi ,
Thanks for your reply.
Latest release of avr-studio3.5 from atmel says that 3rd party compilers can be used with avr-studio.Which also includes avr-gcc.Please have a look at it.
thanks
Pramod Natu

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

I use the makefile setup from Volker Oth's GCCTEST, and I followed the procedure described on:
https://www.avrfreaks.net/AVRGCC/...
And it worked ...

Since all "the real work" is done by the makefiles, I had to manually configure them and interpret the results from the compiler. But I find it quite neat that I can just edit the code while debugging, hit Run, and the code just recompiles automatically. He even remembered my breakpoints.

- Larry

admin's test signature
 

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

To: Larry Kin,
I am going on the same lines.But project out-put gives following errors.

1)System can not find file specified.

2)errors detected during link stage. Stopped.

When I compile on DOS promt with "make" command it workes fine. The HEX file generated by it workes well with simulator.

Still confused about what may be the error.

Can you predict what is wrong.

Pramod

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

Pramod,

> 1)System can not find file specified.
As long as I typed a valid command I did not get this message. So it seems like he can not find your make.exe program. All I wrote was "make". Did you remember to place the dos environment variables in your autoexec.bat file? I am using Win98, what are you using?

> 2)errors detected during link stage. Stopped.
To eliminate this message I removed the text in the dialog box "Run Stage Settings - If output contains the following text". Otherwise you have to modify your makefile to write "Errors: none" when he is finished compiling and the compilation went ok.

- Larry

admin's test signature
 

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

Larry,
Thanks for your repply.
I am using Win98.
Please tell me how should I place dos environment variables in autoexec.bat ! I am not used to such things.

Pramod

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

I found this tip in the download section:
https://www.avrfreaks.net/AVRGCC/...
(...)
TIP: Manually placing the dos environment variable settings in your c:\autoexec.bat file enables you to use avrgcc from any dos prompt. Remember to remove these settings if you are reinstalling/upgrading. Or else the recompiling of the library files will fail.
The dos environment settings can be found in the file: (...)\avrgcc\run.bat.
And could look like this: (Replace C:\ with the path where you installed avrgcc.)
set AVR=C:\AVRGCC
set CC=avr-gcc
set PATH=C:\AVRGCC\bin;%path%
(...)

I.e. open the file c:\autoexec.bat in e.g. notepad and add the SET parameters at the end of the file. If you don't have a c:\autoexec.bat file, create one.
Then save, and reboot your PC.

- Larry

admin's test signature
 

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

Larry,

That was to the point and precise feed-back.

Thanks a lot.

It works.

Pramod

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

Hi,

I have a similar problem, my problem specificly is when i try to build the project, shows the error message:

C:\AVRGCC\BIN\..\lib\gcc-lib\avr\3.1\..\..\..\..\avr\bin\ld.exe: cannot open crts8515.o: No such file or directory
make: ***[gcctest1.elf] Error 1

I folowed all instructions regarding autoexec.bat, but the problem stils; do you have any idea?

Thanks
Roberto B.

admin's test signature
 

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

Hi,
Recently I downloded version 3.1of avr-gcc.Your version seems to be the same.I get similar problem with latest version.This problem is not with 2.95. I have both the version on my PC.
Though I can not give you a solution some body reading my feed back may find some clue.

best of luck.

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

G'day. Is it possible to do source code debugging with GCC in AVR studio or are you limited to debugging the HEX file ? If so how do you get a symbol map out of GCC so you can insert breakpoints etc and watch the right places for the variables ?

TIA
Peter

admin's test signature
 

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

Hi Peter & Pramod,

Every time i run a .bat file with the next line i receive the same error, the same error that apears in AVR studio; it seems that the rar source file containing the avr-gcc does not explode all the files, it make sense with the Pramod's message, may be the files extraction does not generate all the files, specificly in this case: crts8515.o.

Does some body knows if crts8515.o is part of the avr-gcc or is generated during the make process?

My .bat file contains:
avr-gcc gcctest1.o -WI,-Map=gcctest1.map,--cref -mmcu=at90s8515 -o gcctest.elf

Error shown in avr studio and in console usage:
C:\AVRGCC\BIN\..\lib\gcc-lib\avr\3.1\..\..\..\..\avr\bin\ld.exe: cannot open crts8515.o: No such file or directory
make: ***[gcctest1.elf] Error 1

any idea?
Regards
Roberto B

admin's test signature
 

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

This is the startup file. I imagine it has little more in it than the initialisation of the stack to suit the specific processor (plus the clearing of static/global variables).

I find it in \avrgcc\avr\lib. If you don't have a copy there something wen wrong during installation if it's there check for the environment variables etc (these get setup if you use the "run.bat" that you'll find in \avrgcc).

admin's test signature
 

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

Hi all,

Finaly i found the problem: system variables are ok, but for some reason, the instalation file does not extracted all the files, one of them is crts8515.o, all the folder and several others.

Solution:

I extracted all the package in other computer, and it did ok, burned a CD with all complete avrgcc tree, an copied in the original computer i was trying to use it. Now it runs fine.

It would be fine to fix the problem in the self extracting file.

Regards
Roberto Bolaños

admin's test signature
 

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

I have made a .HEX file under command line of win2000, and when I use avrStudio to open this file it shows "Unknow format", doesn't studio 3.5 support .hex file? Later I tried .obj file generated by avr-objcopy, it still cannot work. Does anyone give me some suggestion?

admin's test signature