gnupic: Re: [gnupic] Re: [gpsim-devel] gpsim on Debian and module troubles


Previous by date: 17 Aug 2005 14:23:19 +0100 Re: [gpsim-devel] gpsim on Debian and module troubles, Jaime Alberto Silva
Next by date: 17 Aug 2005 14:23:19 +0100 is OO any use?, David McNab
Previous in thread:
Next in thread:

Subject: Re: [gnupic] Re: [gpsim-devel] gpsim on Debian and module troubles
From: "Scott Dattalo" ####@####.####
Date: 17 Aug 2005 14:23:19 +0100
Message-Id: <62572.67.113.28.230.1124284967.squirrel@67.113.28.230>

On Tue, 2005-08-16 at 16:28 -0500, Jaime Alberto Silva wrote:

> On last saturday (13 Aug) I updated the gpsim's cvs tree and the
> scan.ll problems where  solved (what a coincidence! :) . So gpsim
> compiled with the last flex available in Debian etch (2.5.31) and with
> the current (last saturday's) CVS version of gtkextra. But the
> problems I reported earlier are still there. Here is the .stc I'm
> using with a program compiled for a p16f84 with SDCC:
>
> # gpsim
>
> load s luces.cod
>
> module library libgpsim_modules.so
>
> module load pullup pu0
> module load pullup pu1
> module load pullup pu2
> module load pullup pu3
> module load pullup pu4
>
> pu0.resistance=1e3
> pu1.resistance=1e3
> pu2.resistance=1e3
> pu3.resistance=1e3
> pu4.resistance=1e3
>
> node a0
> node a1
> node a2
> node a3
> node a4
> attach a0 porta0 pu0.pin
> attach a1 porta1 pu1.pin
> attach a2 porta2 pu2.pin
> attach a3 porta3 pu3.pin
> attach a4 porta4 pu4.pin
>
> The code has already been tested in protoboard and works fine, however
> in gpsim the porta pins are always read low. Am I doing something
> wrong or is this a bug?

This is most probably a bug in gpsim. I've done a major redesign in this
area and am still testing the code out. At the moment, I'm taking the old
test programs in examples/14bit/ and a) fixing them and b) turning them
into regression tests. Code in the regression/ directory will give you a
better idea of what does work. All the regression tests except for one
currently pass. The only failure at the moment is the internal pullup on
PORTB is not correctly pulling a open collector (e.g. RA4 on 16f84) to
+5V.



> There's something else I think you should know, when I try to change
> the pullup resistor value using the breadboard's dialog it gives me an
> error:
>
> gpsim> change attribute "pu0.resistance" to "5000"
> Could not find attribute named pu0.resistance
> Could not find attribute "pu0.resistance"

Yep. I know about that. There have been numerous changes with symbols and
attributes and I haven't been keeping the breadboard completely in sync
with them.

> Other throuble I'm having is that gpsim no longer loads the C code, In
> the old precompiled Debian version when I load a .cod file builded
> from SDCC gpsim loads the C source and allows me to go step by step,
> etc. in that source, in this new version it only loads the .asm and
> .inc files. How can I make gpsim load the  C source?

Yep. I know about that too. Several years ago I added a hack to SDCC to
generate line number cross reference information in the generated .asm.
Ralf then wrote a parser to extract this info so that the gui could render
.C source. Hacks are brittle and break over time. Somewhere along the way
either the line number info changed or the requirements on the gui parsing
changed and this broke the High Level Language support.

Instead of a Hack, we should use the symbolic capabilities of .coff and
.cod to convey the C-to-ASM cross reference information. To get this to
work requires SDCC to generate the information and for gpsim to extract
it. I'm not going to have time to address in the near future so maybe
someone (hey Peter!) can help out here. BTW, The mechanism for rendering
high-level source files is already present in gpsim.

Scott


Previous by date: 17 Aug 2005 14:23:19 +0100 Re: [gpsim-devel] gpsim on Debian and module troubles, Jaime Alberto Silva
Next by date: 17 Aug 2005 14:23:19 +0100 is OO any use?, David McNab
Previous in thread:
Next in thread:


Powered by ezmlm-browse 0.20.