Forum Menu




 


Log in Problems?
New User? Sign Up!
AVR Freaks Forum Index

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
Scott Pitcher
PostPosted: Mar 26, 2001 - 04:06 PM






Hi,

We are shifting our development work to the avr-gcc compiler, and as part of that effort I have ported a medium size assembler application to the avr-as assembler (from the Atmel assembler). The main reason for this is that we have new libraries written in C which we have to integrate with the existing code. We are also under pressure to meet deadlines so rather than re-write the application from scratch, we are persisting with the port.

So far it looks good. We spent several days with the code and it now compiles clean under avr-as/gcc, plus I did the first test integrating C code and it works nicely. Note, 'main' function is written in assembler and the C functions are called from the assembler code. Our problem now is that I have not been able at any stage to get AVR-Studio to "see" our assembler or C source files when I try to simulate the code. In fact, when I load our object file, the only source file that AVR-Studio sees is the gcrt1.S run time startup file. I can simulate this, but as soon as I run off the end (step over the "jmp main") at the end, AVR-Studio does not step any more code, until the first timer0 interrupt brings it back to gcrt1.S. If I press the break button, and change to disassemly listing, I can step through the assembler code as normal. I still can't see any souce.

I have tried various fixes, including specifiying full paths in the makefile and source files (.includes ....). This did stop AVR-Studio from complaining that "some source files could not be found" and "Error in Nordic object file", but that it - still no source.

Any advice would be appreciated. The programming team here are pulling their hair out having to simulate at the disassebly level!

Cheers

Scott
 
   
Reply with quote Back to top
bengtr
PostPosted: Mar 27, 2001 - 08:04 AM
Hangaround


Joined: Apr 17, 2001
Posts: 203
Location: Linkoping, Sweden

Are you aware of that the AVR studio is not capable of having the source in different paths? Also try to remove all AVR-studio related files and start over from scratch if you haven't done that ten times already :-)

/Bengt

_________________
My favorites:
1. My oscilloscope, Yokogawa DLM2024.
2. My soldering iron, Weller WD2M, WMRP+WMRT.
3. JTAGICE mkII emulator and debugWire.
4. ImageCraft ICCAVR C compiler.
5. ATmega168
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
liamh
PostPosted: Feb 19, 2009 - 01:59 PM
Newbie


Joined: Feb 12, 2009
Posts: 8


Does anybody know about the Atmel ATA2270-EK1?
im using it for a college project but i have no idea what output is coming from it- is it analog or digital or how many bits??! also how do i connect the main board to an 8051 microprocessor?
SOMEBODY PLEASE HELP ME!!!
 
 View user's profile Send private message  
Reply with quote Back to top
Koshchi
PostPosted: Feb 19, 2009 - 03:54 PM
10k+ Postman


Joined: Nov 17, 2004
Posts: 13956
Location: Vancouver, BC

First, this thread is 8 years old.

Second, your post has absolutely nothing to do with the original post.

Third, there is plenty of documentation on it (including code) on Atmel's web site.

_________________
Regards,
Steve A.

The Board helps those that help themselves.
 
 View user's profile Send private message  
Reply with quote Back to top
JohanEkdahl
PostPosted: Feb 19, 2009 - 07:32 PM
10k+ Postman


Joined: Mar 27, 2002
Posts: 18749
Location: Lund, Sweden

Forth, this is a cross post. There is another thread where the discussion is on-going.
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
liamh
PostPosted: Mar 05, 2009 - 01:45 PM
Newbie


Joined: Feb 12, 2009
Posts: 8


gee tanx for help, jus tryin get sum help ere if ya know anythin, then help if not then i hav no interest in wat u hav 2 say
this is a passive post..coz i dont give a donkeys boll*x
 
 View user's profile Send private message  
Reply with quote Back to top
JohanEkdahl
PostPosted: Mar 05, 2009 - 07:08 PM
10k+ Postman


Joined: Mar 27, 2002
Posts: 18749
Location: Lund, Sweden

FYI, I wasn't posting to inform you that it was a cross post. I was posting to inform everyone else so that they don't risk wasting time posting in more than one thread.
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
liamh
PostPosted: Mar 06, 2009 - 02:12 PM
Newbie


Joined: Feb 12, 2009
Posts: 8


yep
i have piles
 
 View user's profile Send private message  
Reply with quote Back to top
BoltLatch
PostPosted: Jun 24, 2012 - 12:02 AM
Newbie


Joined: Jun 23, 2012
Posts: 2


Scott Pitcher, I'm in that same boat with you. In my case, I'm converting a project that was originally done in a defunct (unsupported) IAR workbench to AVR. I've given up on doing it in AS6 IDE; too many hang-ups.

I'm re-buildng at the command-line. I've re-built the C files with avr-gcc to produce .o objects. However, I'm hung up on using avr-as for the one assembly source in the project.

If you or anyone has answers on how to use avr-as and avr-ld, please lend me a hand. I need to put this thing to bed.

Thanks,

Bolt
 
 View user's profile Send private message  
Reply with quote Back to top
js
PostPosted: Jun 24, 2012 - 03:59 AM
10k+ Postman


Joined: Mar 28, 2001
Posts: 20626
Location: Sydney, Australia (Gum trees, Koalas and Kangaroos, No Edelweiss)

Quote:
Scott Pitcher, I'm in that same boat with you.
His boat sailed more then 11 years ago, Mar 27, 2001. He is probably doing something more useful like growing vegetables. Wink

May want to start a new thread in the AS5/6 forum.

_________________
John Samperi
Ampertronics Pty. Ltd.
www.ampertronics.com.au
* Electronic Design * Custom Products * Contract Assembly
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
david.prentice
PostPosted: Jun 24, 2012 - 10:09 AM
10k+ Postman


Joined: Feb 12, 2005
Posts: 16544
Location: Wormshill, England

Porting C files from IAR to avr-gcc is fairly straightforward. There is a useful page: Porting From IAR to AVR GCC

IAR ASM syntax is only a question of changing a few directives.
However it probably makes assumptions for register usage that differs from the avr-gcc calling conventions.

Personally, I would re-write the ASM functions as C functions. Then only use avr-as if necessary. It is easier to just hand-optimise what the C compiler has generated.

Just quote which directives / sequences you have trouble with.

As js has suggested, a new thread is worthwhile. Your problem is not related the this thread's Subject Title !

David.
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT + 1 Hour
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2006 The PNphpBB Group
Credits