EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

Flashless LPC2210, flash download?

Started by volunteer_sysu March 30, 2006
I am beginner in LPC2000. I want to ask some questions. Thank you!
1. I wonder whether there's any free software that can be used to
download programs to the external flash via UART or JTAG?
2. I don't know how to use the ISP protocol provided by Philips, will
anyone who has written a program to download programs to the external
flash teach me how to do that, or send me the source code? thanks!

Yahoo! Groups Links

An Engineer's Guide to the LPC2100 Series

Hello,

you can't use the ISP protocol to program an external flash. On the 2210/20
it's only possible to transfer code to target RAM. Philips can't know how
your external memory wants to be programmed.

The OpenOCD (GPLed JTAG debugger for ARM7/9 systems, happens to be my
project ;)) supports programming of external CFI compatible flashes using the
Intel commandset.

Regards,

Dominic

On Thursday 30 March 2006 09:46, volunteer_sysu wrote:
> I am beginner in LPC2000. I want to ask some questions. Thank you!
> 1. I wonder whether there's any free software that can be used to
> download programs to the external flash via UART or JTAG?
> 2. I don't know how to use the ISP protocol provided by Philips, will
> anyone who has written a program to download programs to the external
> flash teach me how to do that, or send me the source code? thanks!

Yahoo! Groups Links
Thank Dominic, I heard that first I could write my program to the on-
chip RAM via ISP, then I could used the pre-downloaded program to
download my bootloader to flash if the program running in RAM is a
flash program. Is it that possible? Is there anyone doing this
before, and will it be very difficult? Another question is where can
I download openOCD?

Best Regards

--- In l..., Dominic Rath
wrote:
>
> Hello,
>
> you can't use the ISP protocol to program an external flash. On
the 2210/20
> it's only possible to transfer code to target RAM. Philips can't
know how
> your external memory wants to be programmed.
>
> The OpenOCD (GPLed JTAG debugger for ARM7/9 systems, happens to be
my
> project ;)) supports programming of external CFI compatible
flashes using the
> Intel commandset.
>
> Regards,
>
> Dominic
>
> On Thursday 30 March 2006 09:46, volunteer_sysu wrote:
> > I am beginner in LPC2000. I want to ask some questions. Thank
you!
> > 1. I wonder whether there's any free software that can be used to
> > download programs to the external flash via UART or JTAG?
> > 2. I don't know how to use the ISP protocol provided by Philips,
will
> > anyone who has written a program to download programs to the
external
> > flash teach me how to do that, or send me the source code?
thanks!
>

Yahoo! Groups Links
Sure, you could write a flash program, write that to target RAM, and execute
it there. It could then write your external flash. Maybe one of the free
bootloaders (Apex?) is small enough to fit into the LPC2000, and has already
been ported. Ecos/Redboot has support for the lpc2000, but I'm not sure if
that's available in the free version, or only via EcosPro.

The OpenOCD is available at openocd.berlios.de

Regards,

Dominic

On Thursday 30 March 2006 10:43, volunteer_sysu wrote:
> Thank Dominic, I heard that first I could write my program to the on-
> chip RAM via ISP, then I could used the pre-downloaded program to
> download my bootloader to flash if the program running in RAM is a
> flash program. Is it that possible? Is there anyone doing this
> before, and will it be very difficult? Another question is where can
> I download openOCD?
>
> Best Regards

Yahoo! Groups Links
I have downloaded the openOCD from the website you gave to me,
however, when I tried to make the Makefile, errors always occured.
It happened both in Linux and Window using cygwin. Then what's the
problem?
Best Regards.

--- In l..., Dominic Rath
wrote:
>
> Sure, you could write a flash program, write that to target RAM,
and execute
> it there. It could then write your external flash. Maybe one of
the free
> bootloaders (Apex?) is small enough to fit into the LPC2000, and
has already
> been ported. Ecos/Redboot has support for the lpc2000, but I'm not
sure if
> that's available in the free version, or only via EcosPro.
>
> The OpenOCD is available at openocd.berlios.de
>
> Regards,
>
> Dominic
>
> On Thursday 30 March 2006 10:43, volunteer_sysu wrote:
> > Thank Dominic, I heard that first I could write my program to
the on-
> > chip RAM via ISP, then I could used the pre-downloaded program to
> > download my bootloader to flash if the program running in RAM is
a
> > flash program. Is it that possible? Is there anyone doing this
> > before, and will it be very difficult? Another question is where
can
> > I download openOCD?
> >
> > Best Regards
>

Yahoo! Groups Links
Sorry to ask so many question. One more. ^_^
Does the openOCD support flashless LPCs?
Thank you indeed!

--- In l..., Dominic Rath
wrote:
>
> Sure, you could write a flash program, write that to target RAM,
and execute
> it there. It could then write your external flash. Maybe one of
the free
> bootloaders (Apex?) is small enough to fit into the LPC2000, and
has already
> been ported. Ecos/Redboot has support for the lpc2000, but I'm not
sure if
> that's available in the free version, or only via EcosPro.
>
> The OpenOCD is available at openocd.berlios.de
>
> Regards,
>
> Dominic
>
> On Thursday 30 March 2006 10:43, volunteer_sysu wrote:
> > Thank Dominic, I heard that first I could write my program to
the on-
> > chip RAM via ISP, then I could used the pre-downloaded program to
> > download my bootloader to flash if the program running in RAM is
a
> > flash program. Is it that possible? Is there anyone doing this
> > before, and will it be very difficult? Another question is where
can
> > I download openOCD?
> >
> > Best Regards
>

Yahoo! Groups Links
What version did you download? What errors occured? If there are more
problems, consider using the OpenOCD help forum at
https://developer.berlios.de/forum/forum.php?forum_id655

OpenOCD should work with flashless LPCs, too, just don't specify a "flash
bank" in the configuration file.

You should have a look at the documentation at
http://openfacts.berlios.de/index-en.phtml?title=Open_On-Chip_Debugger

Regards,

Dominic

On Thursday 30 March 2006 12:11, volunteer_sysu wrote:
> I have downloaded the openOCD from the website you gave to me,
> however, when I tried to make the Makefile, errors always occured.
> It happened both in Linux and Window using cygwin. Then what's the
> problem?
> Best Regards.
>

Yahoo! Groups Links
The errors are as follows. I have no idea about what happend. I
think I downloaded the latest version.

Best Regards

Kevin

if gcc -DHAVE_CONFIG_H -I. -I. -I../.. -g -O2 -MT command.o -MD -
MP -MF ".deps/command.Tpo" -c -o command.o command.c; \
then mv -f ".deps/command.Tpo" ".deps/command.Po"; else rm -
f ".deps/command.Tpo"; exit 1; fi
rm -f libhelper.a
ar cru libhelper.a binarybuffer.o configuration.o log.o
interpreter.o command.o
ranlib libhelper.a
make[3]: Leaving directory
`/cygdrive/d/kevin/software/openocd/src/helper'
Making all in jtag
make[3]: Entering directory
`/cygdrive/d/kevin/software/openocd/src/jtag'
if gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../../src/helper -
I/home/vmaster/D2XX_3.01.04// -g -O2 -MT jtag.o -MD -MP -
MF ".deps/
jtag.Tpo" -c -o jtag.o jtag.c; \
then mv -f ".deps/jtag.Tpo" ".deps/jtag.Po"; else rm -
f ".deps/jtag.Tpo"; exit 1; fi
if gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../../src/helper -
I/home/vmaster/D2XX_3.01.04// -g -O2 -MT bitbang.o -MD -MP -
MF ".de
ps/bitbang.Tpo" -c -o bitbang.o bitbang.c; \
then mv -f ".deps/bitbang.Tpo" ".deps/bitbang.Po"; else rm -
f ".deps/bitbang.Tpo"; exit 1; fi
if gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../../src/helper -
I/home/vmaster/D2XX_3.01.04// -g -O2 -MT parport.o -MD -MP -
MF ".de
ps/parport.Tpo" -c -o parport.o parport.c; \
then mv -f ".deps/parport.Tpo" ".deps/parport.Po"; else rm -
f ".deps/parport.Tpo"; exit 1; fi
if gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../../src/helper -
I/home/vmaster/D2XX_3.01.04// -g -O2 -MT ftd2xx.o -MD -MP -
MF ".dep
s/ftd2xx.Tpo" -c -o ftd2xx.o ftd2xx.c; \
then mv -f ".deps/ftd2xx.Tpo" ".deps/ftd2xx.Po"; else rm -
f ".deps/ftd2xx.Tpo"; exit 1; fi
ftd2xx.c:36:20: ftd2xx.h: No such file or directory
ftd2xx.c:72: error: parse error before "ftdih"
ftd2xx.c:72: warning: initialization makes integer from pointer
without a cast
ftd2xx.c:72: warning: data definition has no type or storage class
ftd2xx.c: In function `ftd2xx_speed':
ftd2xx.c:100: error: `FT_STATUS' undeclared (first use in this
function)
ftd2xx.c:100: error: (Each undeclared identifier is reported only
once
ftd2xx.c:100: error: for each function it appears in.)
ftd2xx.c:100: error: parse error before "status"
ftd2xx.c:108: error: `status' undeclared (first use in this function)
ftd2xx.c:108: error: `FT_OK' undeclared (first use in this function)
ftd2xx.c: In function `ftd2xx_send_and_recv':
ftd2xx.c:186: error: `FT_STATUS' undeclared (first use in this
function)
ftd2xx.c:186: error: parse error before "status"
ftd2xx.c:203: error: `status' undeclared (first use in this function)
ftd2xx.c:203: error: `FT_OK' undeclared (first use in this function)
ftd2xx.c: In function `ftd2xx_init':
ftd2xx.c:621: error: `FT_STATUS' undeclared (first use in this
function)
ftd2xx.c:621: error: parse error before "status"
ftd2xx.c:631: error: `status' undeclared (first use in this function)
ftd2xx.c:631: error: `FT_OPEN_BY_DESCRIPTION' undeclared (first use
in this function)
ftd2xx.c:631: error: `FT_OK' undeclared (first use in this function)
ftd2xx.c:634: error: `FT_LIST_NUMBER_ONLY' undeclared (first use in
this function)
ftd2xx.c:644: error: `FT_LIST_ALL' undeclared (first use in this
function)
ftd2xx.c:703: error: `FT_PURGE_RX' undeclared (first use in this
function)
ftd2xx.c:703: error: `FT_PURGE_TX' undeclared (first use in this
function)
ftd2xx.c: In function `ftd2xx_quit':
ftd2xx.c:714: error: `FT_STATUS' undeclared (first use in this
function)
ftd2xx.c:714: error: parse error before "status"
ftd2xx.c:716: error: `status' undeclared (first use in this function)
make[3]: *** [ftd2xx.o] Error 1
make[3]: Leaving directory
`/cygdrive/d/kevin/software/openocd/src/jtag'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/cygdrive/d/kevin/software/openocd/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/cygdrive/d/kevin/software/openocd'
make: *** [all] Error 2

kevinzhu@jerryliu /cygdrive/d/kevin/software/openocd
--- In l..., Dominic Rath
wrote:
>
> What version did you download? What errors occured? If there are
more
> problems, consider using the OpenOCD help forum at
> https://developer.berlios.de/forum/forum.php?forum_id655
>
> OpenOCD should work with flashless LPCs, too, just don't specify
a "flash
> bank" in the configuration file.
>
> You should have a look at the documentation at
> http://openfacts.berlios.de/index-en.phtml?title=Open_On-
Chip_Debugger
>
> Regards,
>
> Dominic
>
> On Thursday 30 March 2006 12:11, volunteer_sysu wrote:
> > I have downloaded the openOCD from the website you gave to me,
> > however, when I tried to make the Makefile, errors always
occured.
> > It happened both in Linux and Window using cygwin. Then what's
the
> > problem?
> > Best Regards.
>

Yahoo! Groups Links
I guess this was the last release from the files section, precompiled for
Cygwin with support for FTDI FT2232 based JTAG interfaces.

Try this one instead:
http://www.siwawi.arubi.uni-kl.de/avr_projects/arm_projects/openocd_svn55_win32_cygwin.zip

It comes with all the files necessary and you don't have to build it yourself.

Regards,

Dominic

On Thursday 30 March 2006 12:45, volunteer_sysu wrote:
> The errors are as follows. I have no idea about what happend. I
> think I downloaded the latest version.
>
> Best Regards
>
> Kevin

Yahoo! Groups Links
Thanks a lot.

Best Regards.

Kevin

--- In l..., Dominic Rath
wrote:
>
> I guess this was the last release from the files section,
precompiled for
> Cygwin with support for FTDI FT2232 based JTAG interfaces.
>
> Try this one instead:
> http://www.siwawi.arubi.uni-
kl.de/avr_projects/arm_projects/openocd_svn55_win32_cygwin.zip
>
> It comes with all the files necessary and you don't have to build
it yourself.
>
> Regards,
>
> Dominic
>
> On Thursday 30 March 2006 12:45, volunteer_sysu wrote:
> > The errors are as follows. I have no idea about what happend. I
> > think I downloaded the latest version.
> >
> > Best Regards
> >
> > Kevin
>

Yahoo! Groups Links

The 2024 Embedded Online Conference