Yahoo Groups archive

Lpc2000

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

Message

Re: [lpc2100] Many thanks to ariusdsp -> how to build application ?

2003-12-16 by Pablo Bleyer Kocik

At 17:39 2003-12-16, you wrote:
>Hello,
>
>first many thanks to ariusdsp for their arm toolchain, seems to be running
>fine under cygwin (WinXP)

  Please, let us know if you find any problems.

  I have tested it with a few targets and it seems to work alright, but 
with Windows you never know ;^) Do you have CygWin installed in your system 
or you are using the supplied CygWin DLLs?

  ARM compilation for the current GCC is particularly buggy in some 
situations, and specially for thumb mode. I know most of the [known] 
roaches (á là http://www.intercorr.com/roach.htm) have been eliminated in 
the 3.4 series. I hope this release comes out soon. If not, I will study 
the possibility to release an intermediate 3.4 snapshot build.

>Already compiled some C code from this newsgroup.
>
>But: Can you tell me how to proceed ?
>
>arm-elf-gcc -S helloworld.c
>arm-elf-gcc -mcpu=arm7tdmi -mthumb -O2 -g -c helloworld.c
>arm-elf-gcc -mcpu=arm7tdmi -mthumb -o helloworld helloworld.o -lc
>arm-elf-objcopy --output-target srec helloworld helloworld.srec
>arm-elf-objcopy --output-target ihex helloworld helloworld.hex
>arm-elf-objcopy --output-target binary helloworld helloworld.bin

  Please, always use the appropriate cpu and interwork switches, since the 
toolchain targets all arm architecture versions.

>Theoretically i would say i can load the intel binary helloworld.hex ? Is
>this correct ?

  That really depends on the tool but, yes, most of them will recognize 
Intel HEX format.

>I think i remember to read something the program start was 0x8000,
>and when i call gdb i see that start is 0x8000. But for LPC210x this must be
>0x0000 ?
>Can someone send me the option again ?
>Must i have the startup stub or why can't i directly jump to main ?
>Is the stub for initializing the variable & other things ?

  As Lewin pointed out, this will depend on the linker scripts.

  If you are getting started with the GNU toolchain for ARM7TDMI, I have 
found that a very good learning approach is to use the VisualBoyAdvance 
emulator (http://vboy.emuhq.com/). The architecture of Nintendo's GBA is 
simple and well described all over the net 
(http://www.cs.rit.edu/~tjh8300/CowBite/CowBiteSpec.htm), and Jeff Frohwein 
has written the necessary scripts and C-runtime code in a well documented 
fashion (http://www.devrs.com/). Nice thing about the VBA is that the GDB 
debug stub is built in, so you can use GDB remotely with it. This is a very 
good virtual learning platform.

  Regards.


--
PabloBleyerKocik /"...I didn't want to be kissing Kevin Spacey.
  pbleyer        / Come on! Lying there naked with rose petals?"
   @... /- Kirsten Dunst on turning down American Beauty

Attachments

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.