--- In lpc2000@yahoogroups.com, "paloalgodon" <stevef@t...> wrote: > > I admit I'm a little disappointed about getting no replies on this > one. Looking over the exisiting .ld files I have, it would appear to > be less than an hour's work (?). I just figure, why re-invent the > wheel, when there's probably a bunch of *tested* copies running around > (especially when I'm a newbie). I was actually suprized that there > wasn't already a complete set of .ld files for all the lpc parts in the > files section of our group. I understand that .ld files are typically > customized a bit, just like makefiles, but a straightforward one that > runs from rom and calls global ctors would be fine for most beginners, > I would think. I will certainly post if/when I get one > working...course that could be counterproductive if we're trying to > keep all the folks used to having the hard stuff done for them (WinAVR) > off of our list <wink><wink> > > Steve > I don't think anyone is hiding the file, it's just that other tools than GNU use a different approach. Perhaps the .ld just isn't around right now. So, grab James Lynch's tutorial from http://www.olimex.com/dev/pdf/ARM%20Cross%20Development%20with% 20Eclipse%20version%203.pdf and note that there is a process for converting LPC2106 linker script (name *.cmd in the tutorial) to the LPC2148. Basically, you are just defining the size of flash and ram, specifying an address for each and then assigning .text, .data and .bss to the appropriate memory type. There are a couple of other symbols like _end, _bss_end and end (not defined in the tutorial but required for sbrk and malloc). The end of my 2106 file looks like ... /* RTS - changed alignment for malloc() - was ALIGN(4) */ . = ALIGN(8); /* advance location counter to the next 32-bit boundary */ _bss_end = . ; /* define a global symbol marking the end of the .bss section */ } _end = .; /* define a global symbol marking the end of application RAM */ PROVIDE (end = .); /* for sbrk */ That's about it. Richard
Message
Re: .ld for 2148
2005-12-29 by rtstofer
Attachments
- No local attachments were found for this message.