EmbeddedRelated.com
Forums

LPC-2148 demo code version 1.43 available

Started by "J.C. Wren" November 10, 2008
Hi Guys!
My problem of compilation is solved, the problem is
"make" wrong version, cygwin or Keil Arm tools has
fucked my "make" version to 5.2...
I am installed winarm in other computher and have success!
Go to format Rwindows today! hehehehe

Thanks for All!

Marcos S. Lucas

2008/11/12 leon Heller

> ----- Original Message -----
> From: "Michael Anton"
> >
> To: >
> Sent: Wednesday, November 12, 2008 3:16 AM
> Subject: RE: [lpc2000] LPC-2148 demo code version 1.43 available
>
> >
> > It looks to me like you have another make utility earlier in your
> > path environment variable list. Instead of picking up the WinARM
> > make, it is picking up one written by Inprise. You could specify
> > the absolute path to make when you call it like:
> > 'C:\WinARM\utils\bin\make -f Makefile.winarm'
> >
> > Or, you could modify your path environment variable so that the
> > winarm path is earlier in the list.
>
> What I do is use a simple setup.bat file that I run from the WinARM
> directory that just sets up the paths for the gcc arm-elf-gcc binaries and
> make, and run that first.:
>
> path=c:\winarm\bin;c:\winarm\utils\bin
>
> Leon
>
>
>

--
Marcos S. Lucas

An Engineer's Guide to the LPC2100 Series

On Mon, Nov 10, 2008 at 12:30 PM, J.C. Wren wrote:
> In the never-ending release cycle... See http://jcwren.com/arm for the code.
>
> No functional changes to the code, so this really only affects folks
> using WinARM.
> 2008/11/09, version 1.43:
>
> Attempted WinARM happiness. Working code can be compiled with the WinARM
> 20060606 build. Please see the README.WinARM file in the .zip or .tgz
> file.

I do not use WinARM but I have installed Yargto. I just tested using
it with the WinARM Makefile it seems to work.

I do not want to use the Winarm library file and I use the default library from
Yagarto distribution. Therefore I do not need to use the hack you put for
Winarm.

lpc2148.elf : .depend Makefile $(ARM_OBJ) $(COMMON)/common.a $(CRT0) $(LDSCRIPT)
# $(CC) $(CFLAGS) $(ARM_OBJ) -nostartfiles $(CRT0) $(LINKER_FLAGS)
-nostdlib winarm_lib/libc.a winarm_lib/libgcc.a
lpc2148.elf : .depend Makefile $(ARM_OBJ) $(COMMON)/common.a $(CRT0) $(LDSCRIPT)
$(CC) $(CFLAGS) $(ARM_OBJ) -nostartfiles $(CRT0) $(LINKER_FLAGS)
# $(OBJDUMP) -d -S lpc2148.elf >lpc2148.lst

And you are right, objdump I/O redirection does not work under my system
either (Windows Vista 32).

As for "make clean", I am thinking that one can use MSYS. Without a shell,
maybe the other alternative is to use batch file. Something like this
(clean.bat):
del *.o /f /q /s
del *.depend /f /q /s
del *.map
del *.lst
del *.elf
del *.hex

Xiaofan

On Mon, Nov 10, 2008 at 12:30 PM, J.C. Wren wrote:
> In the never-ending release cycle... See http://jcwren.com/arm for the code.
>
> No functional changes to the code, so this really only affects folks
> using WinARM.
>
> --jc
>
> 2008/11/09, version 1.43:
>
> Attempted WinARM happiness. Working code can be compiled with the WinARM
> 20060606 build. Please see the README.WinARM file in the .zip or .tgz
> file.
>

A short writeup for Linux. You are free to modify it and put it into the
README file if you like. Thanks.

*************************************
Using it (Linux):

For the purposes of these instructions, it will be assumed that COM1 is the
serial port on the host PC, a USB cable is connected to the LPC-P2148 board
and the PC, and that the lpc21isp 1.63 will be used for programming. You can
also use lpc2k_pgm.

Connect the RS232_0/ICSP DB-9 on the LPC-P2148 board to the comm port on the
PC, using a straight-thru serial cable. Set both the ICSP slide switches
(located near the RS232_0/ICSP DB-9 connector) to the 'on' position (towards
the DB-9 connector), then press the reset button (located next to the ICSP
switches).

Use the following command for lpc21isp.
"lpc21isp -control lpc2148.hex /dev/ttyS0 38400 12000"
The prompt will be something like the following.
"lpc21isp version 1.63
File lpc2148.hex:
loaded...
converted to binary format...
image size : 221044
Synchronizing (ESC to abort). OK
Read bootcode version: 11
2
Read part ID: LPC2148, 512 kiB ROM / 40 kiB SRAM (0x402FF25)
Will start programming at Sector 1 if possible, and conclude with Sector 0
to ensure that checksum is written last.
Sector 1: ................................
Sector 2: ................................

Sector 13: ...............................
Sector 0: ................................
Download Finished... taking 111 seconds
Now launching the brand new code"

When it completes, set the two ISCP slide switches to 'off', and press the
reset button. The 'LED1' LED should start flashing.

Modern Linux should have built-in USB CDC ACM driver and the kernel will
automatically load the driver for the USB device. Under Ubuntu 8.04/8.10,
the USB CDC-ACM device will be recognized as /dev/ttyACM0 or similar. You
can use command "dmesg" to know the exact device node it is assigned. For
example, the following is from my system running Ubuntu 8.10.
"[ 3231.576706] usb 1-8: USB disconnect, address 7
[ 4058.892032] usb 1-8: new full speed USB device using ohci_hcd and address 8
[ 4059.120333] usb 1-8: configuration #1 chosen from 1 choice
[ 4059.123502] cdc_acm: This device cannot do calls on its own. It
is no modem.
[ 4059.124803] cdc_acm 1-8:1.0: ttyACM0: USB ACM device".

I like to use GUI terminal emulation program like cutecom or gtkterm with the
demo. If they are not installed, you can install them easily by following your
Linux distribution's help document. For cutecom, put "/dev/ttyACM0" as the
device name. Leave the other as default. For gtkterm, put
"/dev/ttyACM0" as the
Port name in the Configuration menu. Leave the other as default. You
can also use
other terminal program like minicom if you prefer.

If all went well, typing 'help' should show a list of commands
supported by the CCI. If so, congratulations! You can now play with various
commands. If not, there's not much advice that can be offered at this point.

*************************************

Regards,
Xiaofan
http://mcuee.blogspot.com

Ah, excellent! I will definitely include that in the next release.

I have two bug fixes in the file system submitted by another user, improved
the response in the telnet handler, and fixed an error if CFG_SNTP was
defined but CFG_RTC was not. I'm hoping to get to that sometime in the next
couple weeks, but at the moment I'm fixated on developing an application for
the Android G1.

Programming for the G1 reminds me how much I like C and despise Java. Doing
*anything* just feels so inefficient compared to nice clean C.

--jc

On Tue, Nov 25, 2008 at 8:39 AM, Xiaofan Chen wrote:

> On Mon, Nov 10, 2008 at 12:30 PM, J.C. Wren >
> wrote:
> > In the never-ending release cycle... See http://jcwren.com/arm for the
> code.
> >
> > No functional changes to the code, so this really only affects folks
> > using WinARM.
> >
> > --jc
> >
> > 2008/11/09, version 1.43:
> >
> > Attempted WinARM happiness. Working code can be compiled with the WinARM
> > 20060606 build. Please see the README.WinARM file in the .zip or .tgz
> > file.
> > A short writeup for Linux. You are free to modify it and put it into the
> README file if you like. Thanks.
>
> *************************************
> Using it (Linux):
>
> For the purposes of these instructions, it will be assumed that COM1 is the
> serial port on the host PC, a USB cable is connected to the LPC-P2148 board
> and the PC, and that the lpc21isp 1.63 will be used for programming. You
> can
> also use lpc2k_pgm.
>
> Connect the RS232_0/ICSP DB-9 on the LPC-P2148 board to the comm port on
> the
> PC, using a straight-thru serial cable. Set both the ICSP slide switches
> (located near the RS232_0/ICSP DB-9 connector) to the 'on' position
> (towards
> the DB-9 connector), then press the reset button (located next to the ICSP
> switches).
>
> Use the following command for lpc21isp.
> "lpc21isp -control lpc2148.hex /dev/ttyS0 38400 12000"
> The prompt will be something like the following.
> "lpc21isp version 1.63
> File lpc2148.hex:
> loaded...
> converted to binary format...
> image size : 221044
> Synchronizing (ESC to abort). OK
> Read bootcode version: 11
> 2
> Read part ID: LPC2148, 512 kiB ROM / 40 kiB SRAM (0x402FF25)
> Will start programming at Sector 1 if possible, and conclude with Sector 0
> to ensure that checksum is written last.
> Sector 1: ................................
> Sector 2: ................................
>
> Sector 13: ...............................
> Sector 0: ................................
> Download Finished... taking 111 seconds
> Now launching the brand new code"
>
> When it completes, set the two ISCP slide switches to 'off', and press the
> reset button. The 'LED1' LED should start flashing.
>
> Modern Linux should have built-in USB CDC ACM driver and the kernel will
> automatically load the driver for the USB device. Under Ubuntu 8.04/8.10,
> the USB CDC-ACM device will be recognized as /dev/ttyACM0 or similar. You
> can use command "dmesg" to know the exact device node it is assigned. For
> example, the following is from my system running Ubuntu 8.10.
> "[ 3231.576706] usb 1-8: USB disconnect, address 7
> [ 4058.892032] usb 1-8: new full speed USB device using ohci_hcd and
> address 8
> [ 4059.120333] usb 1-8: configuration #1 chosen from 1 choice
> [ 4059.123502] cdc_acm: This device cannot do calls on its own. It
> is no modem.
> [ 4059.124803] cdc_acm 1-8:1.0: ttyACM0: USB ACM device".
>
> I like to use GUI terminal emulation program like cutecom or gtkterm with
> the
> demo. If they are not installed, you can install them easily by following
> your
> Linux distribution's help document. For cutecom, put "/dev/ttyACM0" as the
> device name. Leave the other as default. For gtkterm, put
> "/dev/ttyACM0" as the
> Port name in the Configuration menu. Leave the other as default. You
> can also use
> other terminal program like minicom if you prefer.
>
> If all went well, typing 'help' should show a list of commands
> supported by the CCI. If so, congratulations! You can now play with various
> commands. If not, there's not much advice that can be offered at this
> point.
>
> *************************************
>
> Regards,
> Xiaofan
> http://mcuee.blogspot.com
>
>