Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » SDCC
  • » [Sdcc-user] sdcdb appears to be broken in the current snapshots [RSS Feed]

#1 Dec. 14, 2010 04:13:46

Peter V.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[Sdcc-user] sdcdb appears to be broken in the current snapshots


In case it isn't known, sdcdb looks to be broken in the current
snapshots:

pe...@pc700 ~/wiznet/nos_test
$ "/cygdrive/c/program files/SDCC"/bin/sdcdb test1
CreateProcess failed (2).
connect failed :: No error

pe...@pc700 ~/wiznet/nos_test
$ "/cygdrive/c/program files/SDCC"/bin/sdcc -v
SDCC : mcs51/gbz80/z80/ds390/pic16/pic14/TININative/ds400/hc08 3.0.1 #6066 (Nov
26 2010) (MINGW32)

On the assumption it didn't work on cygwin I built from source on a
Centos 5.4 system (test1 recompiled on that machine) where the message is:

$sdcdb test1
connect failed :: Connection refused
$
$ sdcc -v
SDCC : mcs51/gbz80/z80/ds390/TININative/ds400/hc08 3.0.1 #6079 (Dec 13 2010)
(Linux)
$

back to cygwin with the 2.9.0 release version and sdcdb works:

pe...@pc700 ~/wiznet/nos_test
$ "/cygdrive/c/program files/SDCC2_9_0"/bin/sdcdb test1
SDCDB is free software and you are welcome to distribute copies of it
under certain conditions; type "show copying" to see the conditions.
There is absolutely no warranty for SDCDB; type "show warranty" for details.
SDCDB 0.8 . Copyright (C) 1999 Sandeep Dutta (sandeep.du***@*sa.net)
Type ? for help
WARNING: SDCDB is EXPERIMENTAL.
uCsim 0.5.4, Copyright (C) 1997 Daniel Drotos, Talker Bt.
uCsim comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
file "test1.ihx"
(sdcdb) list main
21 main() {
22
23 serial_init();
24 printf("hello world\r\n");
25
26 return 0;
27 }
(sdcdb)

pe...@pc700 ~/wiznet/nos_test
$ "/cygdrive/c/program files/SDCC2_9_0"/bin/sdcc -v
SDCC : mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08 2.9.0 #5
416 (Mar 22 2009) (MINGW32)

Peter Van Epp


Sdcc-user mailing list
Sdcc-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/sdcc-user

Offline

#2 Dec. 14, 2010 17:48:19

Borut R.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[Sdcc-user] sdcdb appears to be broken in the current snapshots


This shows how many peope are using it...

Peter, can you please submit it to the bug tracker?

Borut


On 12/14/2010 03:12 AM, Peter Van Epp wrote:
> In case it isn't known, sdcdb looks to be broken in the current
> snapshots:
>
> pe...@pc700 ~/wiznet/nos_test
> $ "/cygdrive/c/program files/SDCC"/bin/sdcdb test1
> CreateProcess failed (2).
> connect failed :: No error
>
> pe...@pc700 ~/wiznet/nos_test
> $ "/cygdrive/c/program files/SDCC"/bin/sdcc -v
> SDCC : mcs51/gbz80/z80/ds390/pic16/pic14/TININative/ds400/hc08 3.0.1 #6066
> (Nov
> 26 2010) (MINGW32)
>
> On the assumption it didn't work on cygwin I built from source on a
> Centos 5.4 system (test1 recompiled on that machine) where the message is:
>
> $sdcdb test1
> connect failed :: Connection refused
> $
> $ sdcc -v
> SDCC : mcs51/gbz80/z80/ds390/TININative/ds400/hc08 3.0.1 #6079 (Dec 13 2010)
> (Linux)
> $
>
> back to cygwin with the 2.9.0 release version and sdcdb works:
>
> pe...@pc700 ~/wiznet/nos_test
> $ "/cygdrive/c/program files/SDCC2_9_0"/bin/sdcdb test1
> SDCDB is free software and you are welcome to distribute copies of it
> under certain conditions; type "show copying" to see the conditions.
> There is absolutely no warranty for SDCDB; type "show warranty" for details.
> SDCDB 0.8 . Copyright (C) 1999 Sandeep Dutta (sandeep.du***@*sa.net)
> Type ? for help
> WARNING: SDCDB is EXPERIMENTAL.
> uCsim 0.5.4, Copyright (C) 1997 Daniel Drotos, Talker Bt.
> uCsim comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
> This is free software, and you are welcome to redistribute it
> under certain conditions; type `show c' for details.
> file "test1.ihx"
> (sdcdb) list main
> 21 main() {
> 22
> 23 serial_init();
> 24 printf("hello world\r\n");
> 25
> 26 return 0;
> 27 }
> (sdcdb)
>
> pe...@pc700 ~/wiznet/nos_test
> $ "/cygdrive/c/program files/SDCC2_9_0"/bin/sdcc -v
> SDCC : mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08 2.9.0
> #5
> 416 (Mar 22 2009) (MINGW32)
>
> Peter Van Epp


Sdcc-user mailing list
Sdcc-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/sdcc-user

Offline

#3 Dec. 15, 2010 01:02:41

Peter V.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[Sdcc-user] sdcdb appears to be broken in the current snapshots


On Tue, Dec 14, 2010 at 06:45:46PM +0100, Borut Razem wrote:
> This shows how many peope are using it...
>
> Peter, can you please submit it to the bug tracker?
>
> Borut
>

Will do, I wasn't sure I wasn't doing something wrong as this is the
first time I'd tried it ...

Peter Van Epp


Sdcc-user mailing list
Sdcc-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/sdcc-user

Offline

#4 Dec. 19, 2010 03:25:44

Peter V.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[Sdcc-user] sdcdb appears to be broken in the current snapshots


On Tue, Dec 14, 2010 at 06:45:46PM +0100, Borut Razem wrote:
> This shows how many peope are using it...
>
> Peter, can you please submit it to the bug tracker?
>
> Borut
>

What has other people's experience with sdcdb on the 8051 been like?
Even the one from 2.9.0 release which at least starts doesn't run very well
for me. Using this very simple test program (which runs on the simulator):

#include <stdio.h>
#include "w7100.h"

void serial_init(void) {

TMOD &= 0x0f; /* clear timer 1 mode bits */
TMOD |= 0x20; /* timer 1 mode 1 */
PCON |= 0x80; /* set SMOD0 fosc/32 */
TH1 = 0xfc; /* set a baud rate (around 115K) */
TR1 = 1; /* start timer 1 */
SCON = 0x50; /* set the uart mode */
TI = 1; /* indicate the UART is empty! */
}


void putchar (char c) {

while (!TI)
;
TI = 0;
SBUF = c;
}

main() {

serial_init();
printf("hello world\r\n");
return 0;
}

only sort of works in sdcdb somewhat:

$ "/cygdrive/c/program files/SDCC2_9_0"/bin/sdcdb test
SDCDB is free software and you are welcome to distribute copies of it
under certain conditions; type "show copying" to see the conditions.
There is absolutely no warranty for SDCDB; type "show warranty" for details.
SDCDB 0.8 . Copyright (C) 1999 Sandeep Dutta (sandeep.du***@*sa.net)
Type ? for help
WARNING: SDCDB is EXPERIMENTAL.
uCsim 0.5.4, Copyright (C) 1997 Daniel Drotos, Talker Bt.
uCsim comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
file "test1.ihx"
(sdcdb) l mai
23 main() {
24
25 serial_init();
26 printf("hello world\r\n");
27 return 0;
28 }
(sdcdb) b 26
(sdcdb) r
Starting program
Breakpoint 1, main() at test1.c:26
26 serial_init();
(sdcdb)
serial_init () at test1.c:6
6 TMOD &= 0x0f; /* clear timer 1 mode bits */
(sdcdb)
7 TMOD |= 0x20; /* timer 1 mode 1 */
(sdcdb)
8 PCON |= 0x80; /* set SMOD0 fosc/32 */
(sdcdb)
9 TH1 = 0xfc; /* set a baud rate (around 115K) */
(sdcdb)
10 TR1 = 1; /* start timer 1 */
(sdcdb)
11 SCON = 0x50; /* set the uart mode */
(sdcdb)
12 TI = 1; /* indicate the UART is empty! */
(sdcdb)
13 }
(sdcdb)
main () at test1.c:27
27 printf("hello world\r\n");
(sdcdb)
putchar () at test1.c:16
16 void putchar (char c) {
(sdcdb)
20 TI = 0;
(sdcdb)
21 SBUF = c;
(sdcdb)
22 }
(sdcdb)
Breakpoint 1 at 0x82: file test1.c, line 26.
addr 0xc2 in no module/function (runtime env?)
addr 0xc4 in no module/function (runtime env?)
addr 0xc7 in no module/function (runtime env?)
addr 0xc9 in no module/function (runtime env?)
addr 0xcb in no module/function (runtime env?)
addr 0xcd in no module/function (runtime env?)
addr 0xce in no module/function (runtime env?)
... (lots more)
addr 0x105 in no module/function (runtime env?)
addr 0x107 in no module/function (runtime env?)
addr 0x109 in no modulmain () at test1.c:28
28 return 0;
(sdcdb)

While this mostly works, I'd expect to see a line such as

putchar () at test1.c:16
16 void putchar (char c) {

for each character in the string and that doesn't happen (I don't know if the
correct output goes to the serial port as I haven't figured out if I can
get sdcdb to pass the file command to the simulator).
However the code I really want to debug breaks rather quickly making
sdcdb not useful. This code will have some problems as its for the Wiznet
m7100 which has a bunch of non standard SFRs (as well as a tcpip engine that
isn't in the simulator) but it doesn't even get as far as any of the processor
specific code (which I could comment out if it did). As soon as it disables
the interrupts in the 8051 sdcdb dies:

pe...@pc700 ~/wiznet/nos
$ "/cygdrive/c/program files/SDCC2_9_0"/bin/sdcdb main
SDCDB is free software and you are welcome to distribute copies of it
under certain conditions; type "show copying" to see the conditions.
There is absolutely no warranty for SDCDB; type "show warranty" for details.
SDCDB 0.8 . Copyright (C) 1999 Sandeep Dutta (sandeep.du***@*sa.net)
Type ? for help
WARNING: SDCDB is EXPERIMENTAL.
uCsim 0.5.4, Copyright (C) 1997 Daniel Drotos, Talker Bt.
uCsim comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
file "main.ihx"
(sdcdb) b 67
(sdcdb) r
Starting program
Breakpoint 1, main() at main.c:68
68 sys_initialize();
(sdcdb) set srcmode
(sdcdb) s
Program exited with code 0.
idle_task () at m7100os.asm:968
968 clr _EA
(sdcdb) l 968
967 ; m7100os.c:219: SYS_DISABLE_INTERRUPTS;
968 clr _EA
969 C$m7100os.c$222$1$1 ==.
970 ; m7100os.c:222: STACK_OVERFLOW_nLED = 1;
971 setb _P0_5
972 C$m7100os.c$225$1$1 ==.
973 ; m7100os.c:225: DEBUG1 = 1;
974 setb _P3_7
975 C$m7100os.c$231$1$1 ==.
976 ; m7100os.c:231: __endasm;
(sdcdb) s

At this point sdcdb is hung (it will after a long delay loops around
some non debugable code (never getting to the "setb _P0_5" which is the next
statement). I the have to close the cygwin window to exit sdcdb not even
cntrl-c will get control back to cygwin or sdcdb. I'll try and extract a small
test program (this code takes most of the 64K external code and data memory
which may be where the problem is :-)) and submit another bug report if I can
get a small one to break. However the bottom line for me is that sdcdb isn't
usable and I'm back to compiled in debug statements on the hardware for
debugging the code.

Peter Van Epp


Sdcc-user mailing list
Sdcc-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/sdcc-user

Offline

  • Root
  • » SDCC
  • » [Sdcc-user] sdcdb appears to be broken in the current snapshots [RSS Feed]

Board footer

Moderator control

Enjoy the 12th of December
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support