[Gambas-devel] How to develop gambas components

Benoît Minisini gambas at ...1...
Wed Jan 27 10:40:35 CET 2010


> > Hi !
> > 
> > My name is Matteo and it's first time taht I posto on gambas-devel mailing
> >  list.
> > 
> > I'm writing because I need to develop a Gambas component in C/C++.
> > 
> > I found an old documentation about components development on the web, but
> > I think that it's not good ...
> > 
> > Thanks
> > 
> > I'll try to explain my project:
> > 
> > I have an Arm 9 system, and I have to run gambas interpreter
> > on in. This Arm 9  exchange data across the SPI with a
> > Microchip PIC.
> > 
> > Whereas we want to develop and debug the Arm application
> > from a PC, we thought to exchange data from PC to Arm and
> > viceversa through UDP socket. When we debug on the PC the
> > gambas application, we use the gambas IDE, and when we want
> > to read or write data to PIC WE use a UDP socket to send
> > data to ARM 9.
> > 
> > But when we execute the gambas program on ARM system we read
> > or write data to PIC through the SPI.
> > 
> > My components , used without graphic interface, have to
> > export the same interface to Pc and Arm but, if compiled for
> > PC the link channel has to be UDP socket, while if compiled
> > for Arm have to use the SPI interface.
> > 
> > On the arm system there will be a task that export an UDP
> > Server and take the data arrived from SPI.
> > 
> > I hope that I explained well !
> > 
> > If I have my low level function , both UDP and SPI , how I
> > can insert my C++ class on the gambas enviroment ?
> > 
> > thanks a lot for all your reply !
> > 
> 
> Apparently you have very specific needs.
> 
> But I think what you really need is a way to have the IDE on one computer,
>  and  the debugged program on another computer. Then you won't have to
>  adapt the way to send data to the PIC. Am I wrong?
> 

As said on the user mailing-list, finally, you don't really need a component, 
but a way to debug on the ARM from the PC.

To debug a program, the IDE run your project in debugging mode. A text 
debugger embedded into the interpreter is run, and it communicated with the 
IDE through two named pipes.

If the IDE could run the project directly on ARM, it would be a matter or 
replacing the two named pipes by one socket to get the same result.

So now I have two problems:

1) How to run a program on another computer from the IDE? I suggest using ssh.

2) How to communicate? The debugged program should create a socket on a 
specific port, and the IDE should be able to use it automatically. I think a 
TCP socket is needed.

What do you think?

-- 
Benoît Minisini




More information about the Devel mailing list