CarterBueford | 1 Jun 10:42 2010
Picon
Picon

recompile libraries

Hi everybody,

I'm working with SDCC to compile code for 8051. My System: KUbuntu-10.04.
I'm trying to use the --xstack option to compile code. Therefor I had to recompile the mcs51 libraries. Here
is the way I did it:

In the following folder:

/sdcc/device/lib

I called the Makefile with the following model:

make model-mcs51-xstack-auto

In the build folder, I got the following new folders:
-large-xstack-auto
-medium-xstack-auto
-small-xstack-auto

Now If I try to compile/build my code, with the following arguments:
--model-large -c --use-stdout --xstack (compile)
--model-large --xram-size 8448 --code-size 131072 --use-stdout (build

I get the following error:
?Aslink-Warning-Undefined Global '__modsint_PARM_2' referenced by module test

So the Linker does not find all libraries. Waht I mentioned is, the model in the Makefile looks like this:

model-mcs51-xstack-auto:
        if grep '^mcs51\>' $(top_builddir)/ports.build > /dev/null; then \
(Continue reading)

Maarten Brock | 1 Jun 12:08 2010
Picon

Re: recompile libraries

Hi Oliver,

I don't see much wrong in your approach. The values for --xram-size and
--code-size are a bit weird though and so is the reported End of Paged Ext
Ram. Isn't the external ram 8192 bytes and 256 bytes internal (default)?
And does your code need more than 64k code? If so, are you using banked
functions or banked constant data?

And finally, what does "did not work" mean exactly? Are you by any chance
using a SiLabs C8051F12x or other mcu that you can debug in-circuit? Can
you try to find out what/where it goes wrong?

HTH,
Maarten

> Hi everybody,
>
> I'm working with SDCC to compile code for 8051. My System: KUbuntu-10.04.
> I'm trying to use the --xstack option to compile code. Therefor I had to
> recompile the mcs51 libraries. Here is the way I did it:
>
> In the following folder:
>
> /sdcc/device/lib
>
> I called the Makefile with the following model:
>
> make model-mcs51-xstack-auto
>
> In the build folder, I got the following new folders:
(Continue reading)

Jan Waclawek | 10 Jun 19:53 2010
Picon

Visual debugging of '51 under Windows - first steps

The SDCC manual chapter 5.1.6 inidicates, that the ddd visual debugger front-end can be used with
sdcdb/s51 to debug visually sdcc-x51 programs. However, ddd is *nux-only, as it is bound to X-Window.
Recently, X-Windows have been added to Cygwin, and that opened a new opportunity. I'd try to go through all
the obstacles and succeeded to run ddd with sdcdb on a Windows Vista SP2 machine. Don't be overly
optimistic, though, this is a rather cumbersome and heavyweight path. See also the caution below at item
4. 
Here are the details:

1. Install SDCC "normally", making sure the appropriate paths to sdcc binaries are set to the command line
environment. Create some working directory, write some simple program (I simply copied
[SDCC]/device/examples/mcs51/simple/hi.c to my working directory) and compile it with the --debug
switch (sdcc --debug hi.c).

2. Install Cygwin/X. The hints are in http://x.cygwin.com/docs/ug/setup-cygwin-x-installing.html .
Basically, run a "normal" Cygwin installation, and make sure you select xorg-server and xinit in the
installator (its response to wild clicking is rather slow, be patient). Don't proceed yet with Cygwin,
goto item 3. below... :-)

3. ... in the same installator, select to install also ddd . It will select some required libraries automagically.

4. Proceed with the installation. CAUTION. Don't even attempt this without access to fast and unlimited
internet connection and enough free disk space. For me, it downloaded more than 1.3GByte data, and the
resulting cygwin directory is almost 5Gbytes. It surely can be tuned up: the installator pulls a lot of
unnecessary applications and their libraries and kin; but I simply cannot tell what is needed from it and
what is not.

5. Wait. For me, it took another two hours after the download until the installator did everything it wanted
to do. Don't be surprised if it installs some garbage icons on the desktop as it was for me :-( but at least the
Start menu contained (among others) the Cygwin-X directory.

(Continue reading)

Ralf Forsberg | 10 Jun 22:03 2010
Picon

gpsim

Hi everyone,

Those of you using sdcc for the pic targets are welcome to try out
latest svn version.
The source browser support for step/breakpoints/etc inc C is back.

Let me know if you have any problems with this.

A new release is planned, but it would be great to get some testing done
before that.

 / Ralf

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
Borut Razem | 12 Jun 11:44 2010
Picon

Re: Visual debugging of '51 under Windows - first steps

Jan,

you could put this on the SDCC wiki...

Borut

On 06/10/2010 07:53 PM, Jan Waclawek wrote:
> The SDCC manual chapter 5.1.6 inidicates, that the ddd visual debugger front-end can be used with
sdcdb/s51 to debug visually sdcc-x51 programs. However, ddd is *nux-only, as it is bound to X-Window.
Recently, X-Windows have been added to Cygwin, and that opened a new opportunity. I'd try to go through all
the obstacles and succeeded to run ddd with sdcdb on a Windows Vista SP2 machine. Don't be overly
optimistic, though, this is a rather cumbersome and heavyweight path. See also the caution below at item 4.
> Here are the details:
>
> 1. Install SDCC "normally", making sure the appropriate paths to sdcc binaries are set to the command line
environment. Create some working directory, write some simple program (I simply copied
[SDCC]/device/examples/mcs51/simple/hi.c to my working directory) and compile it with the --debug
switch (sdcc --debug hi.c).
>
> 2. Install Cygwin/X. The hints are in http://x.cygwin.com/docs/ug/setup-cygwin-x-installing.html
. Basically, run a "normal" Cygwin installation, and make sure you select xorg-server and xinit in the
installator (its response to wild clicking is rather slow, be patient). Don't proceed yet with Cygwin,
goto item 3. below... :-)
>
> 3. ... in the same installator, select to install also ddd . It will select some required libraries automagically.
>
> 4. Proceed with the installation. CAUTION. Don't even attempt this without access to fast and unlimited
internet connection and enough free disk space. For me, it downloaded more than 1.3GByte data, and the
resulting cygwin directory is almost 5Gbytes. It surely can be tuned up: the installator pulls a lot of
unnecessary applications and their libraries and kin; but I simply cannot tell what is needed from it and
(Continue reading)

George Oikonomou | 18 Jun 19:45 2010
Picon

Linker Searches Wrong libdir with --xstack?

Hello all,

I decided to experiment with --model-huge --stack-auto --xstack so I built
from sources on Linux (Ubuntu 10.04).

Does sdcc ignore --xstack when auto-appending to the libdir? Looks like it
searches into huge-stack-auto instead of huge-xstack-auto (same for large).

I'm sending you details of how I built the compiler, what happened when I
tried to build my project and the output of --print-search-dirs with various
combinations of arguments. I'm also sending you info of what I did to fix
this.

Am I doing something really wrong here or is this a bug?

Thanks ever so much for reading this, all. Any tips would be appreciated.

Warm regards
George

sdcc -v
SDCC : mcs51 2.9.7 #5844 (Jun 18 2010) (Linux)

I configured with:
./configure --disable-gbz80-port --disable-z80-port --disable-ds390-port --disable-ds400-port
 --disable-pic-port --disable-pic16-port --disable-hc08-port

Then I ran make

Then I moved into device/lib, added huge and removed small and medium from
(Continue reading)

Borut Razem | 20 Jun 08:13 2010
Picon

Re: Linker Searches Wrong libdir with --xstack?

Hi George,

can you please submit this report to the sdcc bug tracker:
http://sourceforge.net/tracker/?group_id=599&atid=100599

Thanks,
Borut

On 06/18/2010 07:45 PM, George Oikonomou wrote:
> Hello all,
>
> I decided to experiment with --model-huge --stack-auto --xstack so I built
> from sources on Linux (Ubuntu 10.04).
>
> Does sdcc ignore --xstack when auto-appending to the libdir? Looks like it
> searches into huge-stack-auto instead of huge-xstack-auto (same for large).
>
> I'm sending you details of how I built the compiler, what happened when I
> tried to build my project and the output of --print-search-dirs with various
> combinations of arguments. I'm also sending you info of what I did to fix
> this.
>
> Am I doing something really wrong here or is this a bug?
>
> Thanks ever so much for reading this, all. Any tips would be appreciated.
>
> Warm regards
> George
>
>
(Continue reading)

Borut Razem | 20 Jun 08:14 2010
Picon

Re: Linker Searches Wrong libdir with --xstack?

Hi George,

can you please submit this report to the sdcc bug tracker:
http://sourceforge.net/tracker/?group_id=599&atid=100599

Thanks,
Borut

On 06/18/2010 07:45 PM, George Oikonomou wrote:
> Hello all,
>
> I decided to experiment with --model-huge --stack-auto --xstack so I built
> from sources on Linux (Ubuntu 10.04).
>
> Does sdcc ignore --xstack when auto-appending to the libdir? Looks like it
> searches into huge-stack-auto instead of huge-xstack-auto (same for large).
>
> I'm sending you details of how I built the compiler, what happened when I
> tried to build my project and the output of --print-search-dirs with various
> combinations of arguments. I'm also sending you info of what I did to fix
> this.
>
> Am I doing something really wrong here or is this a bug?
>
> Thanks ever so much for reading this, all. Any tips would be appreciated.
>
> Warm regards
> George
>
>
(Continue reading)

Borut Razem | 20 Jun 08:14 2010
Picon

Re: Linker Searches Wrong libdir with --xstack?

Hi George,

can you please submit this report to the sdcc bug tracker:
http://sourceforge.net/tracker/?group_id=599&atid=100599

Thanks,
Borut

On 06/18/2010 07:45 PM, George Oikonomou wrote:
> Hello all,
>
> I decided to experiment with --model-huge --stack-auto --xstack so I built
> from sources on Linux (Ubuntu 10.04).
>
> Does sdcc ignore --xstack when auto-appending to the libdir? Looks like it
> searches into huge-stack-auto instead of huge-xstack-auto (same for large).
>
> I'm sending you details of how I built the compiler, what happened when I
> tried to build my project and the output of --print-search-dirs with various
> combinations of arguments. I'm also sending you info of what I did to fix
> this.
>
> Am I doing something really wrong here or is this a bug?
>
> Thanks ever so much for reading this, all. Any tips would be appreciated.
>
> Warm regards
> George
>
>
(Continue reading)

Sébastien Lorquet | 20 Jun 13:10 2010
Picon

Re: Visual debugging of '51 under Windows - first steps

Hi,

to save spacetime, XMing may be interesting: http://sourceforge.net/projects/xming/

However, ddd does not seem to exist for mingw/msys, or I missed it :(

Regards
Sebastien

On Sat, Jun 12, 2010 at 6:44 PM, Borut Razem <borut.razem-gGgVlfcn5nU@public.gmane.org> wrote:
Jan,

you could put this on the SDCC wiki...

Borut



On 06/10/2010 07:53 PM, Jan Waclawek wrote:
> The SDCC manual chapter 5.1.6 inidicates, that the ddd visual debugger front-end can be used with sdcdb/s51 to debug visually sdcc-x51 programs. However, ddd is *nux-only, as it is bound to X-Window. Recently, X-Windows have been added to Cygwin, and that opened a new opportunity. I'd try to go through all the obstacles and succeeded to run ddd with sdcdb on a Windows Vista SP2 machine. Don't be overly optimistic, though, this is a rather cumbersome and heavyweight path. See also the caution below at item 4.
> Here are the details:
>
> 1. Install SDCC "normally", making sure the appropriate paths to sdcc binaries are set to the command line environment. Create some working directory, write some simple program (I simply copied [SDCC]/device/examples/mcs51/simple/hi.c to my working directory) and compile it with the --debug switch (sdcc --debug hi.c).
>
> 2. Install Cygwin/X. The hints are in http://x.cygwin.com/docs/ug/setup-cygwin-x-installing.html . Basically, run a "normal" Cygwin installation, and make sure you select xorg-server and xinit in the installator (its response to wild clicking is rather slow, be patient). Don't proceed yet with Cygwin, goto item 3. below... :-)
>
> 3. ... in the same installator, select to install also ddd . It will select some required libraries automagically.
>
> 4. Proceed with the installation. CAUTION. Don't even attempt this without access to fast and unlimited internet connection and enough free disk space. For me, it downloaded more than 1.3GByte data, and the resulting cygwin directory is almost 5Gbytes. It surely can be tuned up: the installator pulls a lot of unnecessary applications and their libraries and kin; but I simply cannot tell what is needed from it and what is not.
>
> 5. Wait. For me, it took another two hours after the download until the installator did everything it wanted to do. Don't be surprised if it installs some garbage icons on the desktop as it was for me :-( but at least the Start menu contained (among others) the Cygwin-X directory.
>
> 6. From Start menu, run Cygwin-X. Wait. It creates an "X" icon in the right icon tray, and, after more waiting, it opens a window with the shell. At this point, some rudimentary experience with *nux or at least with command line tools is needed. Note, that the root directory inside Cygwin is equal to Win directory where Cygwin was installed, typically C:\cygwin. So we are now in our $HOME directory, which in Cygwin is /home/[YOUR_NAME], in Win it is C:\[cygwin]\home\[YOUR_NAME]. To break out from cygwin to the Win directory system, cygwin provides a /cygdrive "directory" containing all the Win drives. So, a C:\Programs\SDCC Win directory is /cygdrive/c/Programs/SDCC in Cygwin. Try to go up and down on the directory structure in Cygwin using the cd and ls commands to get a grip of what is happening.
>
> 7. As sdcdb runs as a Win application and ddd as a Cygwin one, they see the directory structure differently. This different notion of paths makes unpractical to try to run if from anywhere else than from the working directory, where we have all the sources and files resulting from compilation at one place with no need to go elsewhere in the directory structure (to understand this took me quite some time and experimentation... ;-) ). So, if your working directory from item 1 was say C:\Work, in the Cygwin/X window do cd /cygdrive/c/Work.
>
> 8. A happy moment:
> ddd -debugger "sdcdb hi"
> ("hi" here is the name of your program but with no file extension - mine was hi.c)
> Wait. Wait. Wait.
> Voila!
>
> 9. It has its limitations, of course. Source code and disassembly display and breakpoints and run/step work (mostly). Could display registers but not memory. The fonts are ugly and some windows can't be resized so you need to scroll up/down or left/right to see everything. Don't know how to redirect IO. Some commands make the whole stuff crash; the aftermath is that you need to inspect in TaskManager within processes if s51 (and sdcdb itself) are not still running and if yes, kill them manually.
>
> First steps, but maybe there will be more.
>
> Jan Waclawek
>
>
>
>
>
> ------------------------------------------------------------------------------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> lucky parental unit.  See the prize list and enter to win:
> http://p.sf.net/sfu/thinkgeek-promo
> _______________________________________________
> Sdcc-user mailing list
> Sdcc-user-5NWGOfrQmneHXe+LvDLADg@public.gmane.orgrceforge.net
> https://lists.sourceforge.net/lists/listinfo/sdcc-user
>
>


------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit.  See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Sdcc-user mailing list
Sdcc-user-5NWGOfrQmnetEtDZOKyKiw@public.gmane.orgrge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Sdcc-user mailing list
Sdcc-user@...
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Gmane