Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Thread

ADS to GNU

ADS to GNU

2004-02-02 by Igor Janjatovic

I need to purchase SDK with software libraries (no source) developed with
ADS toolchain. Can I use these libraries with GNU toolchain? It seems that
ADS toolchain is $6000 so I'm trying to avoid that... :(

Regards,
Igor

Re: [lpc2100] ADS to GNU

2004-02-03 by Lewin A.R.W. Edwards

> I need to purchase SDK with software libraries (no source) developed with
> ADS toolchain. Can I use these libraries with GNU toolchain? It seems that
> ADS toolchain is $6000 so I'm trying to avoid that... :(

Okay... The information I'm about to give you is two? three? years old, 
so take it with a grain of salt:

ADS uses, or used to use, the COFF object format. This is strongly 
deprecated in the GNU world, in favor of ELF. It is however possible to 
build a set of GNU tools that use COFF (try --target=arm-unknown-coff at 
a guess). I don't know how well this is tested in current gcc/binutils 
versions, though. The last (and first) success report I read on this 
topic was on the ecos-discuss list a long time ago, from someone who 
needed to use an object-only ADS library with the eCos operating system, 
which is GNU-centric.

I hope these are asm/C libraries. C++ may give you a very hard time indeed.

Have you triple-checked with the vendor that they don't have a 
GNU-compatible version of this library? It's unusual... gcc is the de 
facto industry standard tool for ARM development. When I was looking for 
libraries a couple of years ago, I asked our vendors and all of them 
said they would supply either type according to request.

-- 
  -- Lewin A.R.W. Edwards (http://www.zws.com/)
Learn how to develop high-end embedded systems on a tight budget!
http://www.amazon.com/exec/obidos/ASIN/0750676094/zws-20

Re: ADS to GNU

2004-02-04 by Peter

--- In lpc2100@yahoogroups.com, "Lewin A.R.W. Edwards" <larwe@l...> 
wrote:
> Okay... The information I'm about to give you is two? three? years 
old, 
> so take it with a grain of salt:
> 
> ADS uses, or used to use, the COFF object format. This is strongly 
> deprecated in the GNU world, in favor of ELF. It is however 
possible to 

ADS does use ELF, the old SDT used an Acorn standard, AOF. However 
I've had limited success mixing GNU ELF and ARM ELF.

If I assemble a GNU asm file using the GNU tools, I can link the 
object file into an ADS build, but in the AXD debugger the GNU code 
is displayed as a set of 32-bit constants rather than a disassembly. 
It still executes ok of course.

If I build a complete program in GNU, I can't load the built ELF 
image into AXD - it complains about an error in a debug table.

Another thing to bear in mind is that GNU seems to use frame 
pointers by default, but ARM dispensed with frame pointers years 
ago - so GNU code will corrupt a register that ARM code expects to 
be preserved. I suspect it'll take a lot of jiggling to get ADS 
libraries to work with GNU.

Just goes to show, as old programmers know: "All constants are 
variable, all variables won't, all standards aren't".

Oh... in case it helps, this is a perl script I've started to hack a 
gnu assembler file to a form that can be read by the ARM assembler.

while (<>)
{
    s/@/ ;@/;
    s/^(\w+):/$1/;
    s/\.section.*/ AREA |x|,code,readonly/;
    s/\.equ ([^\s]+),\s+([^\s]+)/$1 equ $2/;
    s/\.global\s+([^\s]+)/ EXPORT $1/;
    
    print ;
}
    print "\n END\n";

Yep, it's crude, but its a start ;)

Peter.

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.