EmbDev.net

Forum: ARM programming with GCC/GNU tools lpc2129 need help..


Author: Tiong Loh (ctloh)
Posted on:
Attached files:

Rate this post
0 useful
not useful
hi all..
i m now learning about ARM and having an assignment to blink led on
lpc2129.i have a simple source code which i am trying currently(just to
blink a led).
can i know what is the command i should use(in command prompt) to
compile the source code and get an .hex output file.the compiler i am
using is gnuarm. thanks and hope to hear from u all soon.

Author: Martin Thomas (mthomas) (Moderator)
Posted on:

Rate this post
0 useful
not useful
Tiong Loh wrote:
> hi all..
> i m now learning about ARM and having an assignment to blink led on
> lpc2129.i have a simple source code which i am trying currently(just to
> blink a led).
> can i know what is the command i should use(in command prompt) to
> compile the source code and get an .hex output file.the compiler i am
> using is gnuarm. thanks and hope to hear from u all soon.

Try to use make and makefile. I have some examples for LPC2129 on my
web-page http://www.siwawi.arubi.uni-kl.de/avr_projects/arm_projects/
which include makefiles (an linker-scripts and startup-code). If you
type make all on the "command prompt" hex-files will be created. But you
need some tools like make.exe installed on your system. WinAVR and
WinARM include the needed tools. Yagarto offers a setup-package for
theses tools too IRC. Alternatively you may install mingw/msys or
Cygwin.

Author: Tiong Loh (ctloh)
Posted on:
Attached files:

Rate this post
0 useful
not useful
Martin Thomas wrote:

>
> Try to use make and makefile. I have some examples for LPC2129 on my
> web-page http://www.siwawi.arubi.uni-kl.de/avr_projects/arm_projects/
> which include makefiles (an linker-scripts and startup-code). If you
> type make all on the "command prompt" hex-files will be created. But you
> need some tools like make.exe installed on your system. WinAVR and
> WinARM include the needed tools. Yagarto offers a setup-package for
> theses tools too IRC. Alternatively you may install mingw/msys or
> Cygwin.

hi Martin Thomas!thanks alot for ur reply..
i am actually create a .hex file before this with commands:
arm-elf-gcc -c 1led.c
arm-elf-ld -v -o 1led.o
arm-elf-objcopy -O ihex 1led.o 1led.hex

then a .hex file was created and i flash the 1led.hex into my board by
using lpc2000 flash utility.bt no respond from the board.i am actually
trying to figure out what is the problem here.is it any problem with the
command i used to compile and create the .hex file?of is it the problem
lies in my source code?can u give me some advise on this?

i am actually using a arm7 educational board,hence i attach the pic of
the board here to show u the connection of the board.

i connect pin38(P0.12) to led1(on peripheral board) and a supply of
3.3v.

Author: Martin Thomas (mthomas) (Moderator)
Posted on:

Rate this post
0 useful
not useful
> i am actually create a .hex file before this with commands:
> arm-elf-gcc -c 1led.c
> arm-elf-ld -v -o 1led.o
> arm-elf-objcopy -O ihex 1led.o 1led.hex

The basic steps are correct but not enough. Even if you do not want to
use my examples you may just download one of them and run a make all.
The output from make will show you the needed steps and parameters.

> then a .hex file was created and i flash the 1led.hex into my board by
> using lpc2000 flash utility.bt no respond from the board.i am actually
> trying to figure out what is the problem here.is it any problem with the
> command i used to compile and create the .hex file?of is it the problem
> lies in my source code?can u give me some advise on this?

There are several things missing for example the startup-code, the
definition of the memory-layout (usualy defined in a linker-script) and
some parameters for the tools.

Author: Tiong Loh (ctloh)
Posted on:

Rate this post
0 useful
not useful
Martin Thomas wrote:
>>
> The basic steps are correct but not enough. Even if you do not want to
> use my examples you may just download one of them and run a make all.
> The output from make will show you the needed steps and parameters.
>
>
thanks for the reply again Martin..
i have download one of your example named lpc2129_blinkswitch_irq and
try to make all in command prompt.but the command prompt respond as
'make' is not recognized as an internal and external command,operable
program or batch file.
for your information,i have install MinGW as u ask me to install at ur
1st reply.
the version i installed is MinGW-5.13.exe.why i still cant use the
command make all?

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.