lpc21isp v160

Started by Xiaofan Chen October 12, 2008
Somehow I could not get lpc21isp to build under Ubuntu 8.04.

mcuee@Ubuntu804:~/Desktop/arm/lpc21isp_160$ make
gcc -D__FREEBSD__ -c -o adprog.o adprog.c
gcc -D__FREEBSD__ -c -o lpcprog.o lpcprog.c
gcc -D__FREEBSD__ -c -o lpcterm.o lpcterm.c
gcc -D__FREEBSD__ -o lpc21isp lpc21isp.c adprog.o lpcprog.o lpcterm.o
lpc21isp.c:244: error: static declaration of 'debug_level' follows
non-static declaration
lpc21isp.h:176: error: previous declaration of 'debug_level' was here
lpc21isp.c: In function 'OpenSerialPort':
lpc21isp.c:322: warning: initialization makes pointer from integer
without a cast
make: *** [lpc21isp] Error 1

So I change the Makefile and lpc21isp.h file to remove the conditional
compiling directives. I just define the following two in lpc21isp.h.
#define COMPILE_FOR_LINUX

#define COMPILED_FOR "Linux"

Now I have a new error.

mcuee@Ubuntu804:~/Desktop/arm/lpc21isp_160$ make
gcc -c -o adprog.o adprog.c
gcc -c -o lpcprog.o lpcprog.c
gcc -c -o lpcterm.o lpcterm.c
gcc -o lpc21isp lpc21isp.c adprog.o lpcprog.o lpcterm.o
lpc21isp.c:244: error: static declaration of 'debug_level' follows
non-static declaration
lpc21isp.h:181: error: previous declaration of 'debug_level' was here
lpc21isp.c: In function 'OpenSerialPort':
lpc21isp.c:322: warning: initialization makes pointer from integer
without a cast
make: *** [lpc21isp] Error 1
Regards,
Xiaofan

An Engineer's Guide to the LPC2100 Series

Hello Xiaofan,

> lpc21isp.c:244: error: static declaration of 'debug_level' follows
> non-static declaration
> lpc21isp.h:176: error: previous declaration of 'debug_level' was
here
> lpc21isp.c: In function 'OpenSerialPort':
> lpc21isp.c:322: warning: initialization makes pointer from integer
> without a cast
> make: *** [lpc21isp] Error 1

there is a lpc21isp specific yahoo mailing list where changes were
discussedto solve this problem (also patches are available):

http://groups.yahoo.com/group/lpc21isp/

I think it is time, to create a new version which works again on all
OS, otherwise this topic comes up again and again.

Regards,

Martin
On Mon, Oct 13, 2008 at 3:12 PM, capiman26061973 wrote:
> there is a lpc21isp specific yahoo mailing list where changes were
> discussedto solve this problem (also patches are available):
>
> http://groups.yahoo.com/group/lpc21isp/
>
> I think it is time, to create a new version which works again on all
> OS, otherwise this topic comes up again and again.

Thanks. I will try the patches.

Regards,
Xiaofan

On Mon, Oct 13, 2008 at 3:19 PM, Xiaofan Chen wrote:
> On Mon, Oct 13, 2008 at 3:12 PM, capiman26061973 wrote:
>> there is a lpc21isp specific yahoo mailing list where changes were
>> discussedto solve this problem (also patches are available):
>>
>> http://groups.yahoo.com/group/lpc21isp/
>>
>> I think it is time, to create a new version which works again on all
>> OS, otherwise this topic comes up again and again.
>
> Thanks. I will try the patches.

Yes the patch in the following thread works fine for me
under Ubuntu 8.04. I tested it with Olimex LPC-P2148
and J. C. Wren's V1.30 example.
http://tech.groups.yahoo.com/group/lpc21isp/message/337

mcuee@Ubuntu804:~/Desktop/arm/lpc21isp_160$ ./lpc21isp -control
lpc2148_v130.hex /dev/ttyS0 19200 12000
lpc21isp version 1.60
File lpc2148_v130.hex:
loaded...
converted to binary format...
image size : 193724
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: ...............................................................................................
...skipped...
Sector 0: ...............................................................................................
Download Finished... taking 188 seconds
Now launching the brand new code
Regards,
Xiaofan

I try to built in ubuntu with the same error message.

I suscribe me to that group but I still wainting for aprovation.

Do you have the patch for :
error: static declaration of ‘debug_level’ follows non-static declaration
Hello,

lpc21isp version 1.60 is over 7 years old.
Try one of the recent versions, latest is version 1.94.

You can download it from file area of Yahoo mailing list lpc21isp

http://groups.yahoo.com/neo/groups/lpc21isp/files/Beta%20versions

or github

https://github.com/capiman/lpc21isp

or sourceforge

http://sourceforge.net/projects/lpc21isp/

Best regards,

Martin