Reply by "J.C. Wren" November 25, 20082008-11-25
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
>
>

An Engineer's Guide to the LPC2100 Series

Reply by Xiaofan Chen November 25, 20082008-11-25
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

Reply by Xiaofan Chen November 13, 20082008-11-13
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

Reply by Marcos Lucas November 12, 20082008-11-12
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

Reply by leon Heller November 12, 20082008-11-12
----- Original Message -----
From: "Marcos Lucas"
To:
Sent: Wednesday, November 12, 2008 3:33 AM
Subject: Re: [lpc2000] LPC-2148 demo code version 1.43 available
Hi Mike
I am using "c:\WinARM\bin;c:\WinARM\utils\bin;" on environment
variables, this is correct ?
That's what I'm using.

Leon
Reply by leon Heller November 12, 20082008-11-12
----- 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
Reply by Michael Anton November 12, 20082008-11-12
> -----Original Message-----
> From: l...
> [mailto:l...]On Behalf
> Of Marcos Lucas
> Sent: Tuesday, November 11, 2008 8:33 PM
> To: l...
> Subject: Re: [lpc2000] LPC-2148 demo code version 1.43 available
> Hi Mike
> I am using "c:\WinARM\bin;c:\WinARM\utils\bin;" on environment
> variables, this is correct ?
>
> Marcos
>

Yes, that looks correct, but where in the path line is it? If it
is at the end that may be your problem. Remember, these are searched
in order, so if the other make utility is listed first, the system
will always find it first.

Mike
Reply by Marcos Lucas November 11, 20082008-11-11
Hi Mike
I am using "c:\WinARM\bin;c:\WinARM\utils\bin;" on environment
variables, this is correct ?

Marcos

2008/11/12 Michael Anton

> > -----Original Message-----
> > From: l...
> > [mailto:l... ]On Behalf
> > Of Marcos Lucas
> > Sent: Tuesday, November 11, 2008 7:31 PM
> > To: l...
> > Subject: Re: [lpc2000] LPC-2148 demo code version 1.43 available
> >
> >
> > Hi Guys!I am new in arm development, and i have a problem to compile
> > lpc2148_Demo version 1.43 default
> > on WinArm version 20070505.
> > I am trying to compile with 'make -f Makefile.winarm' on WinXP prompt.
> > These are errors that i can't solve. Somebody could give me a help?
> >
> >
> > Microsoft Windows XP [vers 5.1.2600]
> > (C) Copyright 1985-2001 Microsoft Corp.
> >
> > C:\Documents and Settings\Kinho>cd c:\lpc2148\lpc2148_demo
> >
> > C:\LPC2148\lpc2148_demo>make -f Makefile.winarm
> > MAKE Version 5.2 Copyright (c) 1987, 1998 Inprise Corp.
> > Error Makefile.winarm 11: Colon expected
> > Error Makefile.winarm 115: Colon expected
> > Error Makefile.winarm 116: Command syntax error
> > Error Makefile.winarm 143: Command syntax error
> > Error Makefile.winarm 144: Command syntax error
> > Error Makefile.winarm 145: Command syntax error
> > *** 6 errors during make ***
> >
> > C:\LPC2148\lpc2148_demo>
> >
> > Thanks for All!
> > Marcos S. Lucas
> > 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.
>
> Mike
>
>
>

--
Marcos S. Lucas

Reply by Michael Anton November 11, 20082008-11-11
> -----Original Message-----
> From: l...
> [mailto:l...]On Behalf
> Of Marcos Lucas
> Sent: Tuesday, November 11, 2008 7:31 PM
> To: l...
> Subject: Re: [lpc2000] LPC-2148 demo code version 1.43 available
> Hi Guys!I am new in arm development, and i have a problem to compile
> lpc2148_Demo version 1.43 default
> on WinArm version 20070505.
> I am trying to compile with 'make -f Makefile.winarm' on WinXP prompt.
> These are errors that i can't solve. Somebody could give me a help?
> Microsoft Windows XP [vers 5.1.2600]
> (C) Copyright 1985-2001 Microsoft Corp.
>
> C:\Documents and Settings\Kinho>cd c:\lpc2148\lpc2148_demo
>
> C:\LPC2148\lpc2148_demo>make -f Makefile.winarm
> MAKE Version 5.2 Copyright (c) 1987, 1998 Inprise Corp.
> Error Makefile.winarm 11: Colon expected
> Error Makefile.winarm 115: Colon expected
> Error Makefile.winarm 116: Command syntax error
> Error Makefile.winarm 143: Command syntax error
> Error Makefile.winarm 144: Command syntax error
> Error Makefile.winarm 145: Command syntax error
> *** 6 errors during make ***
>
> C:\LPC2148\lpc2148_demo> Thanks for All!
> Marcos S. Lucas
>

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.

Mike
Reply by "J.C. Wren" November 11, 20082008-11-11
It sort of depends on what Linux distribution you use. I use Gentoo,
and emerge (the package manager) crossdev, and use crossdev to install
binutils, gcc, and newlib. Once you have your ARM tool chain
installed, you just type 'make' and away it goes.

--jc

On Tue, Nov 11, 2008 at 9:43 PM, Marcos Lucas wrote:
> Ok!I downloading winarm 20060606 for test.
> If i want to use linux for develop, i need other configurations to
> compile "default version" with small modifications ?
>
> Thanks!
> Marcos
>
> 2008/11/11 J.C. Wren > It would appear that you don't have WinARM 20060606 installed, or you
>> have not modified your path as per the WinARM installation
>> instructions.
>>
>> The version of 'make' you're picking up definitely not the one in the
>> WinARM distribution.
>>
>> --jc
>> On Tue, Nov 11, 2008 at 9:30 PM, Marcos Lucas
>> >
>> wrote:
>> > Hi Guys!I am new in arm development, and i have a problem to compile
>> > lpc2148_Demo version 1.43 default
>> > on WinArm version 20070505.
>> > I am trying to compile with 'make -f Makefile.winarm' on WinXP prompt.
>> > These are errors that i can't solve. Somebody could give me a help?
>> >
>> > Microsoft Windows XP [vers 5.1.2600]
>> > (C) Copyright 1985-2001 Microsoft Corp.
>> >
>> > C:\Documents and Settings\Kinho>cd c:\lpc2148\lpc2148_demo
>> >
>> > C:\LPC2148\lpc2148_demo>make -f Makefile.winarm
>> > MAKE Version 5.2 Copyright (c) 1987, 1998 Inprise Corp.
>> > Error Makefile.winarm 11: Colon expected
>> > Error Makefile.winarm 115: Colon expected
>> > Error Makefile.winarm 116: Command syntax error
>> > Error Makefile.winarm 143: Command syntax error
>> > Error Makefile.winarm 144: Command syntax error
>> > Error Makefile.winarm 145: Command syntax error
>> > *** 6 errors during make ***
>> >
>> > C:\LPC2148\lpc2148_demo>
>> >
>> > Thanks for All!
>> > Marcos S. Lucas
>> >
>> > 2008/11/10 J.C. Wren >
>> >
>> >> 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.
>> >>
>> >>
>> >
>> > --
>> > Marcos S. Lucas
>> >
>> >
>> >
>> >
>> --
> Marcos S. Lucas
>
>
>
>