gnupic: troubles in compiling gpsim


Previous by date: 5 Jul 2001 15:47:51 -0000 Re: troubles in compiling gpsim, Vincent Besse
Next by date: 5 Jul 2001 15:47:51 -0000 No more troubles in compiling gpsim, Vincent Besse
Previous in thread: 5 Jul 2001 15:47:51 -0000 Re: troubles in compiling gpsim, Vincent Besse
Next in thread:

Subject: Re: troubles in compiling gpsim
From: Scott Dattalo ####@####.####
Date: 5 Jul 2001 15:47:51 -0000
Message-Id: <Pine.LNX.4.33.0107051042080.5198-100000@tempest.blackhat.net>


On Wed, 4 Jul 2001, Vincent Besse wrote:

> Hello
>
> Scott Dattalo wrote:
>
> > Get and install the latest version of gtk+extra:
> >
> > http://gtkextra.sourceforge.net/
> >
> > It's up to version 0.99.15. (I'm using 0.99.14).
> >
> > Get the latest "development" version of gpsim:
> >
> > http://www.dattalo.com/gnupic/gpsim-0.20.9
>
> It's done.
>
> > Please try this out and let me know if you have any more troubles installing.
>
> I still have. First of all, I have libreadline 4.1-19 installed.
> My problem now is a missing include (and I don't know which lib it's
> from):
>
> make[2]: Entering directory `/usr/local/src/gpsim-0.20.9/gpsim'
> c++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/lib/glib/include
> -I/usr/X11R6/include -I/usr/local/include    -g -O2 -c main.cc
> main.cc:49: popt.h: Aucun fichier ou répertoire de ce type


Okay, you're almost there! You need to install the popt library.
Go to rpmfind.net and search for popt. I see 159 hits:

http://rpmfind.net/linux/rpm2html/search.php?query=popt

Choose the one most appropriate for your distribution. I think this will do it:

http://rpmfind.net/linux/RPM/rpm.org//rpm/test-4.0.3//popt-1.6.3-0.6.i386.html

Download and install this and tell me what happens.


>
> Everything seemed good before that. Some warnings but nothing really
> serious. Could it be OK if I --disable-gui?

The popt library is responsible for parsing command line arguments.

> I have another question. I'd like to use gpsim for a 16F876.You say
> 16F874/877 are not fully supported. What is missing, how can I help ( if
> I have time, courage and almost knowledge)(and almost courage...)?

I also have the 16F873.

In general, the easiest way to add a new processor is to find the one that most
closely matches and inherit from it. (This may be a recursive process :). Once
you've done this then the unique features that distinguish your new processor
from the others can be added. Almost every PIC peripheral is supported in gpsim,
so adding a new processor is matter of choosing the appropriate peripherals.

I'd suggest looking at src/p16f87x.cc and src/p16f87x.h to see how the 16f87x
processors are created.

For example, the '874 inherits from the '16C74 and adds eeprom support:

class P16F874 : public P16C74
{
 public:
  ADRES  adresl;

  virtual void set_out_of_range_pm(int address, int value);

  virtual PROCESSOR_TYPE isa(void){return _P16F874_;};
  virtual unsigned int program_memory_size(void) const { return 0x1000; };
  virtual void create_symbols(void);
  void create_sfr_map(void);
  void create(void);
  virtual unsigned int register_memory_size () const { return 0x200;};

  virtual unsigned int eeprom_get_size(void) {return eeprom_size;};
  virtual unsigned int eeprom_get_value(unsigned int address) ;
  virtual void eeprom_put_value(unsigned int value,
				unsigned int address);
  virtual file_register *eeprom_get_register(unsigned int address);

  P16F874(void);
  static pic_processor *construct(void);
};


Scott


Previous by date: 5 Jul 2001 15:47:51 -0000 Re: troubles in compiling gpsim, Vincent Besse
Next by date: 5 Jul 2001 15:47:51 -0000 No more troubles in compiling gpsim, Vincent Besse
Previous in thread: 5 Jul 2001 15:47:51 -0000 Re: troubles in compiling gpsim, Vincent Besse
Next in thread:


Powered by ezmlm-browse 0.20.