Thread: Re: [Botix-devel] Remarks about Botix-howto
Status: Beta
Brought to you by:
vorik2005
|
From: Just4 F. <rb...@ho...> - 2005-11-08 21:06:07
|
HHHEEELLLLLPPPPP I have tried to install Eclipse on 2 Linux machines, both running Fedora C4. Java is running correctly on both. I installed (unpacked) Eclipse to /usr/java. I have not installed any plugin on the one system, but I did install CDT on the other system. Still, when starting Eclipse I get the following error message while starting up on both systems: Unable to read workbench state. Workbench UI layout will be reset. After that Eclipse WILL start but with a very limited set of features in the menu. For example: it is not possible to create a project or anything. Anyone seen this b4? Any ideas? Greetz, Richard |
|
From: Ger A. <in...@ge...> - 2005-11-08 22:08:06
|
ehhhh Nope, that didnt happen with me.. BTW: On ubuntu, you can just install it through the package manager. Have you checked file system permissions? Try giving your user account read/write rights. Quick and (very) dirty: chmod -R 777 /usr/java To test if this is likely a permissions problem, you can also run eclipse as root. Ger. Just4 Fun schreef: > HHHEEELLLLLPPPPP > > I have tried to install Eclipse on 2 Linux machines, both running > Fedora C4. Java is running correctly on both. I installed (unpacked) > Eclipse to /usr/java. I have not installed any plugin on the one > system, but I did install CDT on the other system. Still, when > starting Eclipse I get the following error message while starting up > on both systems: > > Unable to read workbench state. Workbench UI layout will be reset. > > After that Eclipse WILL start but with a very limited set of features > in the menu. For example: it is not possible to create a project or > anything. Anyone seen this b4? Any ideas? > > Greetz, > > Richard > > > > > ------------------------------------------------------- > SF.Net email is sponsored by: > Tame your development challenges with Apache's Geronimo App Server. > Download > it for free - -and be entered to win a 42" plasma tv or your very own > Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php > _______________________________________________ > Botix-devel mailing list > Bot...@li... > https://lists.sourceforge.net/lists/listinfo/botix-devel |
|
From: Just4 F. <rb...@ho...> - 2005-11-09 23:45:33
|
So now, I installed it as root.... same error... I installed it as user.... same error... I begin to think that my installation of java (linux fedora c4) is not correct, although the testing site by Sun works ok. But this is a testing site that tests the functioning of java within a browser as plugin. And it is af course not a plugin what I need, but a real java surrounding within Linux. Biggest problem is that I am completely blond concerning java (it is even worse: I am grey:) I installed the java JRE and as mentioned it runs fine within Firefox as plugin. Is JRE the same as JVM? Is there a way I can check whether java is available as VM? Are there symbolic links to be made? When I start Eclipse with the -vm etc argument it answers me that there are to many arguments, although I just give up Eclipse and the -vm.? I am dazed and confused..:) Greetz, Richard >From: Ger Apeldoorn <in...@ge...> >Reply-To: bot...@li... >To: bot...@li... >Subject: Re: [Botix-devel] Remarks about Botix-howto >Date: Tue, 08 Nov 2005 23:07:56 +0100 > >ehhhh > >Nope, that didnt happen with me.. BTW: On ubuntu, you can just install it >through the package manager. > >Have you checked file system permissions? Try giving your user account >read/write rights. > >Quick and (very) dirty: chmod -R 777 /usr/java > >To test if this is likely a permissions problem, you can also run eclipse >as root. > >Ger. > >Just4 Fun schreef: > >>HHHEEELLLLLPPPPP >> >>I have tried to install Eclipse on 2 Linux machines, both running Fedora >>C4. Java is running correctly on both. I installed (unpacked) Eclipse to >>/usr/java. I have not installed any plugin on the one system, but I did >>install CDT on the other system. Still, when starting Eclipse I get the >>following error message while starting up on both systems: >> >>Unable to read workbench state. Workbench UI layout will be reset. >> >>After that Eclipse WILL start but with a very limited set of features in >>the menu. For example: it is not possible to create a project or anything. >>Anyone seen this b4? Any ideas? >> >>Greetz, >> >>Richard >> >> >> >> >>------------------------------------------------------- >>SF.Net email is sponsored by: >>Tame your development challenges with Apache's Geronimo App Server. >>Download >>it for free - -and be entered to win a 42" plasma tv or your very own >>Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php >>_______________________________________________ >>Botix-devel mailing list >>Bot...@li... >>https://lists.sourceforge.net/lists/listinfo/botix-devel > > > >------------------------------------------------------- >SF.Net email is sponsored by: >Tame your development challenges with Apache's Geronimo App Server. >Download >it for free - -and be entered to win a 42" plasma tv or your very own >Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php >_______________________________________________ >Botix-devel mailing list >Bot...@li... >https://lists.sourceforge.net/lists/listinfo/botix-devel |
|
From: Ger A. <in...@ge...> - 2005-11-10 05:55:47
|
Hi, I dont think this is a java error. Perhaps you have run it the first time as root? Try to delete (or if uncertain, move) your workspace directory that is located in your home folder. Just4 Fun schreef: > So now, > I installed it as root.... same error... > I installed it as user.... same error... > > I begin to think that my installation of java (linux fedora c4) is not > correct, although the testing site by Sun works ok. But this is a > testing site that tests the functioning of java within a browser as > plugin. And it is af course not a plugin what I need, but a real java > surrounding within Linux. > > Biggest problem is that I am completely blond concerning java (it is > even worse: I am grey:) I installed the java JRE and as mentioned it > runs fine within Firefox as plugin. > > Is JRE the same as JVM? The JRE contains the JVM. > Is there a way I can check whether java is available as VM? in a console, type java. > Are there symbolic links to be made? if the above command returns some output, you are fine. If not, yes. :) > > When I start Eclipse with the -vm etc argument it answers me that > there are to many arguments, although I just give up Eclipse and the > -vm.? > > I am dazed and confused..:) > > Greetz, > > Richard Grreetingss, Gerrr > >> From: Ger Apeldoorn <in...@ge...> >> Reply-To: bot...@li... >> To: bot...@li... >> Subject: Re: [Botix-devel] Remarks about Botix-howto >> Date: Tue, 08 Nov 2005 23:07:56 +0100 >> >> ehhhh >> >> Nope, that didnt happen with me.. BTW: On ubuntu, you can just >> install it through the package manager. >> >> Have you checked file system permissions? Try giving your user >> account read/write rights. >> >> Quick and (very) dirty: chmod -R 777 /usr/java >> >> To test if this is likely a permissions problem, you can also run >> eclipse as root. >> >> Ger. >> >> Just4 Fun schreef: >> >>> HHHEEELLLLLPPPPP >>> >>> I have tried to install Eclipse on 2 Linux machines, both running >>> Fedora C4. Java is running correctly on both. I installed (unpacked) >>> Eclipse to /usr/java. I have not installed any plugin on the one >>> system, but I did install CDT on the other system. Still, when >>> starting Eclipse I get the following error message while starting up >>> on both systems: >>> >>> Unable to read workbench state. Workbench UI layout will be reset. >>> >>> After that Eclipse WILL start but with a very limited set of >>> features in the menu. For example: it is not possible to create a >>> project or anything. Anyone seen this b4? Any ideas? >>> >>> Greetz, >>> >>> Richard >>> >>> >>> >>> >>> ------------------------------------------------------- >>> SF.Net email is sponsored by: >>> Tame your development challenges with Apache's Geronimo App Server. >>> Download >>> it for free - -and be entered to win a 42" plasma tv or your very own >>> Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php >>> _______________________________________________ >>> Botix-devel mailing list >>> Bot...@li... >>> https://lists.sourceforge.net/lists/listinfo/botix-devel >> >> >> >> >> ------------------------------------------------------- >> SF.Net email is sponsored by: >> Tame your development challenges with Apache's Geronimo App Server. >> Download >> it for free - -and be entered to win a 42" plasma tv or your very own >> Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php >> _______________________________________________ >> Botix-devel mailing list >> Bot...@li... >> https://lists.sourceforge.net/lists/listinfo/botix-devel > > > > > > ------------------------------------------------------- > SF.Net email is sponsored by: > Tame your development challenges with Apache's Geronimo App Server. > Download > it for free - -and be entered to win a 42" plasma tv or your very own > Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php > _______________________________________________ > Botix-devel mailing list > Bot...@li... > https://lists.sourceforge.net/lists/listinfo/botix-devel |
|
From: Just4 F. <rb...@ho...> - 2005-11-10 21:55:23
|
Hi all, Problem solved, thanks for helping me out. But I think I can prove that I am blond:) It was a java problem, that is, I didn't have all the right librairies installed.... Lazy as I am, I did not feel like finding out and installing multiple individual librairies, so I decided to make a clean install of Fedora C4. While configuring the options it turned out that installing Eclipse is done by only one single mouse-click, including CDT :)...... It is just as easy as that on Fedora C4..... Btw, this new install also made my PCMCIA Wifi card working....:) Without having to setup anything... The further I come, the more I believe in Linux..:) Greetz Richard >From: Ger Apeldoorn <in...@ge...> >Reply-To: bot...@li... >To: bot...@li... >Subject: Re: [Botix-devel] Remarks about Botix-howto >Date: Thu, 10 Nov 2005 06:55:41 +0100 > >Hi, > >I dont think this is a java error. Perhaps you have run it the first time >as root? Try to delete (or if uncertain, move) your workspace directory >that is located in your home folder. > > > >Just4 Fun schreef: > >>So now, >>I installed it as root.... same error... >>I installed it as user.... same error... >> >>I begin to think that my installation of java (linux fedora c4) is not >>correct, although the testing site by Sun works ok. But this is a testing >>site that tests the functioning of java within a browser as plugin. And it >>is af course not a plugin what I need, but a real java surrounding within >>Linux. >> >>Biggest problem is that I am completely blond concerning java (it is even >>worse: I am grey:) I installed the java JRE and as mentioned it runs fine >>within Firefox as plugin. >> >>Is JRE the same as JVM? > >The JRE contains the JVM. > >>Is there a way I can check whether java is available as VM? > >in a console, type java. > >>Are there symbolic links to be made? > >if the above command returns some output, you are fine. If not, yes. :) > >> >>When I start Eclipse with the -vm etc argument it answers me that there >>are to many arguments, although I just give up Eclipse and the -vm.? >> >>I am dazed and confused..:) >> >>Greetz, >> >>Richard > >Grreetingss, Gerrr > >> >>>From: Ger Apeldoorn <in...@ge...> >>>Reply-To: bot...@li... >>>To: bot...@li... >>>Subject: Re: [Botix-devel] Remarks about Botix-howto >>>Date: Tue, 08 Nov 2005 23:07:56 +0100 >>> >>>ehhhh >>> >>>Nope, that didnt happen with me.. BTW: On ubuntu, you can just install it >>>through the package manager. >>> >>>Have you checked file system permissions? Try giving your user account >>>read/write rights. >>> >>>Quick and (very) dirty: chmod -R 777 /usr/java >>> >>>To test if this is likely a permissions problem, you can also run eclipse >>>as root. >>> >>>Ger. >>> >>>Just4 Fun schreef: >>> >>>>HHHEEELLLLLPPPPP >>>> >>>>I have tried to install Eclipse on 2 Linux machines, both running Fedora >>>>C4. Java is running correctly on both. I installed (unpacked) Eclipse to >>>>/usr/java. I have not installed any plugin on the one system, but I did >>>>install CDT on the other system. Still, when starting Eclipse I get the >>>>following error message while starting up on both systems: >>>> >>>>Unable to read workbench state. Workbench UI layout will be reset. >>>> >>>>After that Eclipse WILL start but with a very limited set of features in >>>>the menu. For example: it is not possible to create a project or >>>>anything. Anyone seen this b4? Any ideas? >>>> >>>>Greetz, >>>> >>>>Richard >>>> >>>> >>>> >>>> >>>>------------------------------------------------------- >>>>SF.Net email is sponsored by: >>>>Tame your development challenges with Apache's Geronimo App Server. >>>>Download >>>>it for free - -and be entered to win a 42" plasma tv or your very own >>>>Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php >>>>_______________________________________________ >>>>Botix-devel mailing list >>>>Bot...@li... >>>>https://lists.sourceforge.net/lists/listinfo/botix-devel >>> >>> >>> >>> >>>------------------------------------------------------- >>>SF.Net email is sponsored by: >>>Tame your development challenges with Apache's Geronimo App Server. >>>Download >>>it for free - -and be entered to win a 42" plasma tv or your very own >>>Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php >>>_______________________________________________ >>>Botix-devel mailing list >>>Bot...@li... >>>https://lists.sourceforge.net/lists/listinfo/botix-devel >> >> >> >> >> >>------------------------------------------------------- >>SF.Net email is sponsored by: >>Tame your development challenges with Apache's Geronimo App Server. >>Download >>it for free - -and be entered to win a 42" plasma tv or your very own >>Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php >>_______________________________________________ >>Botix-devel mailing list >>Bot...@li... >>https://lists.sourceforge.net/lists/listinfo/botix-devel > > > >------------------------------------------------------- >SF.Net email is sponsored by: >Tame your development challenges with Apache's Geronimo App Server. >Download >it for free - -and be entered to win a 42" plasma tv or your very own >Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php >_______________________________________________ >Botix-devel mailing list >Bot...@li... >https://lists.sourceforge.net/lists/listinfo/botix-devel |
|
From: Wouter H. <ww....@zo...> - 2005-11-12 23:44:03
|
Hi all,
Tonight I committed the first version of a HAL for Botix.
(Botix/Hardware/Hal)
The purpose of the HAL is to provide a controlled layer over the
hardware, to protect the hardware and ease in debugging. Because the HAL
knows the purpose of the connected devices and their pins it knows when
an illegal command is performed: like setting an input pin. This greatly
reduces errors and creates a safety net for beginners.
Another purpose of the hal is to check and debug the software pin map
to the hardware pin map by printing out what the HAL knows about the pin
usage. It is possible to show runtime the status of the devices & pins.
Last but not least: the functional programming can use symbolic device
names instead of pin address. This very much increases code readability
and makes it for easy device programming. (No knowledge required *how*
the device works, let the hal take care of that.)
Short overview of the hall:
- Class: set of devices.
- Device: abstract device which is connected to zero or more pins.
- Port: set of pins used for a device.
- Pin: actual hardware pin.
- Driver: small function which contains all logic to use a device. (i.e:
send a ping for a sonar device)
Hal->|-> Class 'Sensor' |-> Device |-> Driver 'srf04'
| | |-> Pin A1 Input
| | |-> Pin A2 Output
| |
| |-> Device |-> Driver
| |-> Pin
|
|-> Class 'Led' -> etc.
|
|-> Ports |-> Pin 1 (owner device 'Sonar1'
|-> Pin 2 (owner device 'Sonar1'
|-> Pin 3 (owner device ''
Drivers do not know which actual pins they use, because there is a
device pin map -> actual pin map. Because of this drivers can be very
generic.
To keep memory footprint low, all strings are pointers back into rom. As
always with abstraction some cpu overhead is unavoidable. At this moment
it is unknown what the performance on an actual embedded cpu (AVR) is.
Controlling the hal works like this:
register_class("switches");
register_class("leds");
register_class("sonars");
register_dev("led1",
find_class("leds"), /* class */
1, /* number of pins */
(PORT []){1, OUTPUT}, /* pin list */
&generic_led); /* driver */
register_dev("sonar_left"
find_class("sonars"), /* class */
2, /* number of pins */
(PORT []){1, OUTPUT, 2 INPUT}, /* pin list */
&generic_led); /* driver */
set_dev("led1", ON);
int dist = get_dev("sonar1");
A driver looks like this:
float generic_led(int mode) {
printf("Led driver called!\n");
switch(mode) {
case ON: set_pin(1, ON); break;
case OFF: set_pin(1, ON); break;
}
}
You get the idea ;-)
At this moment this concept is working when compiling hal_demo.c on a
pc. (Botix/Hardware/Hal)
The hal should be directly driven by an protocol stack or small virtual
machine running on the CPU.
One big problem at this time is memory consumption, I will keep trying
to reduce the memory footprint.
Let met know what you all think of this!
Greetings,
Wouter
|
|
From: Ger A. <in...@ge...> - 2005-11-13 12:50:02
|
Hi wouter,
I've edited your documentation so that it works with DOC++.
Basicly a few issues:
A function documentation starts with /** <- double star
If you use the single star, it will be disregarded by doc++
Only if you've got a long and a short description, you should use the
memo field. If there is only a memo field, a seperate page for the
function will not be made.
If there is no parameter or no return, these should not be mentioned.
Thanks!
Greetings,
Ger.
Wouter Houweling schreef:
>Hi all,
>
>Tonight I committed the first version of a HAL for Botix.
>(Botix/Hardware/Hal)
>
>The purpose of the HAL is to provide a controlled layer over the
>hardware, to protect the hardware and ease in debugging. Because the HAL
>knows the purpose of the connected devices and their pins it knows when
>an illegal command is performed: like setting an input pin. This greatly
>reduces errors and creates a safety net for beginners.
>
>Another purpose of the hal is to check and debug the software pin map
>to the hardware pin map by printing out what the HAL knows about the pin
>usage. It is possible to show runtime the status of the devices & pins.
>
>Last but not least: the functional programming can use symbolic device
>names instead of pin address. This very much increases code readability
>and makes it for easy device programming. (No knowledge required *how*
>the device works, let the hal take care of that.)
>
>Short overview of the hall:
>
>- Class: set of devices.
>- Device: abstract device which is connected to zero or more pins.
>- Port: set of pins used for a device.
>- Pin: actual hardware pin.
>- Driver: small function which contains all logic to use a device. (i.e:
>send a ping for a sonar device)
>
>Hal->|-> Class 'Sensor' |-> Device |-> Driver 'srf04'
> | | |-> Pin A1 Input
> | | |-> Pin A2 Output
> | |
> | |-> Device |-> Driver
> | |-> Pin
> |
> |-> Class 'Led' -> etc.
> |
> |-> Ports |-> Pin 1 (owner device 'Sonar1'
> |-> Pin 2 (owner device 'Sonar1'
> |-> Pin 3 (owner device ''
>
>Drivers do not know which actual pins they use, because there is a
>device pin map -> actual pin map. Because of this drivers can be very
>generic.
>
>To keep memory footprint low, all strings are pointers back into rom. As
>always with abstraction some cpu overhead is unavoidable. At this moment
>it is unknown what the performance on an actual embedded cpu (AVR) is.
>
>Controlling the hal works like this:
>
>register_class("switches");
>register_class("leds");
>register_class("sonars");
>
>register_dev("led1",
> find_class("leds"), /* class */
> 1, /* number of pins */
> (PORT []){1, OUTPUT}, /* pin list */
> &generic_led); /* driver */
>
>register_dev("sonar_left"
> find_class("sonars"), /* class */
> 2, /* number of pins */
> (PORT []){1, OUTPUT, 2 INPUT}, /* pin list */
> &generic_led); /* driver */
>
>set_dev("led1", ON);
>int dist = get_dev("sonar1");
>
>A driver looks like this:
>
>float generic_led(int mode) {
> printf("Led driver called!\n");
> switch(mode) {
> case ON: set_pin(1, ON); break;
> case OFF: set_pin(1, ON); break;
> }
>}
>
>You get the idea ;-)
>
>At this moment this concept is working when compiling hal_demo.c on a
>pc. (Botix/Hardware/Hal)
>
>The hal should be directly driven by an protocol stack or small virtual
>machine running on the CPU.
>
>One big problem at this time is memory consumption, I will keep trying
>to reduce the memory footprint.
>
>Let met know what you all think of this!
>
>Greetings,
>Wouter
>
>
>
>
>
>
>
>
>
>-------------------------------------------------------
>SF.Net email is sponsored by:
>Tame your development challenges with Apache's Geronimo App Server. Download
>it for free - -and be entered to win a 42" plasma tv or your very own
>Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
>_______________________________________________
>Botix-devel mailing list
>Bot...@li...
>https://lists.sourceforge.net/lists/listinfo/botix-devel
>
>
|
|
From: Ger A. <in...@ge...> - 2005-11-13 15:16:57
|
Hi Wouter,
Looking good this HAL!
What are your ideas for devices that do not connect directly to a port
on the avr?
Example: i2c compass, io pin on an i2c port expander etc.
The i2c compass has got a single address and register, but the i2c port
expanders can get different addresses and each have multiple pins.
Is it possible to include the driver-includes only when they are
actually used?
Once you've verified its workings on the AVR, you can kick out the
existing registration structure and implement this..
On MSN, you stated that we both changed hal.c and that you cannot commit
now. You can combine the changes if i'm not mistaking, i'll check.
Yes. On the changed (local) file, right click, choose Team and click
Create Patch.
Then save that patch to a file.
Then, overwrite your local file with the one from CVS. (make a backup!)
<- yeah right!
Then choose Apply patch to import your own changes.
That should be it. (Untested, alpha and a garanteed untill it breaks!)
;) Good Luck! :)
Ger.
Wouter Houweling schreef:
>Hi all,
>
>Tonight I committed the first version of a HAL for Botix.
>(Botix/Hardware/Hal)
>
>The purpose of the HAL is to provide a controlled layer over the
>hardware, to protect the hardware and ease in debugging. Because the HAL
>knows the purpose of the connected devices and their pins it knows when
>an illegal command is performed: like setting an input pin. This greatly
>reduces errors and creates a safety net for beginners.
>
>Another purpose of the hal is to check and debug the software pin map
>to the hardware pin map by printing out what the HAL knows about the pin
>usage. It is possible to show runtime the status of the devices & pins.
>
>Last but not least: the functional programming can use symbolic device
>names instead of pin address. This very much increases code readability
>and makes it for easy device programming. (No knowledge required *how*
>the device works, let the hal take care of that.)
>
>Short overview of the hall:
>
>- Class: set of devices.
>- Device: abstract device which is connected to zero or more pins.
>- Port: set of pins used for a device.
>- Pin: actual hardware pin.
>- Driver: small function which contains all logic to use a device. (i.e:
>send a ping for a sonar device)
>
>Hal->|-> Class 'Sensor' |-> Device |-> Driver 'srf04'
> | | |-> Pin A1 Input
> | | |-> Pin A2 Output
> | |
> | |-> Device |-> Driver
> | |-> Pin
> |
> |-> Class 'Led' -> etc.
> |
> |-> Ports |-> Pin 1 (owner device 'Sonar1'
> |-> Pin 2 (owner device 'Sonar1'
> |-> Pin 3 (owner device ''
>
>Drivers do not know which actual pins they use, because there is a
>device pin map -> actual pin map. Because of this drivers can be very
>generic.
>
>To keep memory footprint low, all strings are pointers back into rom. As
>always with abstraction some cpu overhead is unavoidable. At this moment
>it is unknown what the performance on an actual embedded cpu (AVR) is.
>
>Controlling the hal works like this:
>
>register_class("switches");
>register_class("leds");
>register_class("sonars");
>
>register_dev("led1",
> find_class("leds"), /* class */
> 1, /* number of pins */
> (PORT []){1, OUTPUT}, /* pin list */
> &generic_led); /* driver */
>
>register_dev("sonar_left"
> find_class("sonars"), /* class */
> 2, /* number of pins */
> (PORT []){1, OUTPUT, 2 INPUT}, /* pin list */
> &generic_led); /* driver */
>
>set_dev("led1", ON);
>int dist = get_dev("sonar1");
>
>A driver looks like this:
>
>float generic_led(int mode) {
> printf("Led driver called!\n");
> switch(mode) {
> case ON: set_pin(1, ON); break;
> case OFF: set_pin(1, ON); break;
> }
>}
>
>You get the idea ;-)
>
>At this moment this concept is working when compiling hal_demo.c on a
>pc. (Botix/Hardware/Hal)
>
>The hal should be directly driven by an protocol stack or small virtual
>machine running on the CPU.
>
>One big problem at this time is memory consumption, I will keep trying
>to reduce the memory footprint.
>
>Let met know what you all think of this!
>
>Greetings,
>Wouter
>
>
>
>
>
>
>
>
>
>-------------------------------------------------------
>SF.Net email is sponsored by:
>Tame your development challenges with Apache's Geronimo App Server. Download
>it for free - -and be entered to win a 42" plasma tv or your very own
>Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
>_______________________________________________
>Botix-devel mailing list
>Bot...@li...
>https://lists.sourceforge.net/lists/listinfo/botix-devel
>
>
|
|
From: Wouter H. <ww....@zo...> - 2005-11-13 16:43:08
|
On Sun, 2005-11-13 at 16:16 +0100, Ger Apeldoorn wrote:
> Hi Wouter,
>
> Looking good this HAL!
>
> What are your ideas for devices that do not connect directly to a port
> on the avr?
>
> Example: i2c compass, io pin on an i2c port expander etc.
>
> The i2c compass has got a single address and register, but the i2c port
> expanders can get different addresses and each have multiple pins.
For i2c we can use some kind of virtual device, which is what the
compass driver uses when executing commands. Port expanders can use
multiple pins and just have to be defined, right?
Device linking is possible, so led1 is connected to portexpander port 1
which is at its turn connected to a set of avr pins. (right?)
>
> Is it possible to include the driver-includes only when they are
> actually used?
>
Yep no problem, so the more we stuff things in drivers the more modulair
and 'rom' efficient things will get. This is the big advantage of using
function pointers.
> Once you've verified its workings on the AVR, you can kick out the
> existing registration structure and implement this..
>
> On MSN, you stated that we both changed hal.c and that you cannot commit
> now. You can combine the changes if i'm not mistaking, i'll check.
> Yes. On the changed (local) file, right click, choose Team and click
> Create Patch.
> Then save that patch to a file.
> Then, overwrite your local file with the one from CVS. (make a backup!)
> <- yeah right!
> Then choose Apply patch to import your own changes.
>
> That should be it. (Untested, alpha and a garanteed untill it breaks!)
> ;) Good Luck! :)
>
Done.
- Wouter
> Ger.
>
> Wouter Houweling schreef:
>
> >Hi all,
> >
> >Tonight I committed the first version of a HAL for Botix.
> >(Botix/Hardware/Hal)
> >
> >The purpose of the HAL is to provide a controlled layer over the
> >hardware, to protect the hardware and ease in debugging. Because the HAL
> >knows the purpose of the connected devices and their pins it knows when
> >an illegal command is performed: like setting an input pin. This greatly
> >reduces errors and creates a safety net for beginners.
> >
> >Another purpose of the hal is to check and debug the software pin map
> >to the hardware pin map by printing out what the HAL knows about the pin
> >usage. It is possible to show runtime the status of the devices & pins.
> >
> >Last but not least: the functional programming can use symbolic device
> >names instead of pin address. This very much increases code readability
> >and makes it for easy device programming. (No knowledge required *how*
> >the device works, let the hal take care of that.)
> >
> >Short overview of the hall:
> >
> >- Class: set of devices.
> >- Device: abstract device which is connected to zero or more pins.
> >- Port: set of pins used for a device.
> >- Pin: actual hardware pin.
> >- Driver: small function which contains all logic to use a device. (i.e:
> >send a ping for a sonar device)
> >
> >Hal->|-> Class 'Sensor' |-> Device |-> Driver 'srf04'
> > | | |-> Pin A1 Input
> > | | |-> Pin A2 Output
> > | |
> > | |-> Device |-> Driver
> > | |-> Pin
> > |
> > |-> Class 'Led' -> etc.
> > |
> > |-> Ports |-> Pin 1 (owner device 'Sonar1'
> > |-> Pin 2 (owner device 'Sonar1'
> > |-> Pin 3 (owner device ''
> >
> >Drivers do not know which actual pins they use, because there is a
> >device pin map -> actual pin map. Because of this drivers can be very
> >generic.
> >
> >To keep memory footprint low, all strings are pointers back into rom. As
> >always with abstraction some cpu overhead is unavoidable. At this moment
> >it is unknown what the performance on an actual embedded cpu (AVR) is.
> >
> >Controlling the hal works like this:
> >
> >register_class("switches");
> >register_class("leds");
> >register_class("sonars");
> >
> >register_dev("led1",
> > find_class("leds"), /* class */
> > 1, /* number of pins */
> > (PORT []){1, OUTPUT}, /* pin list */
> > &generic_led); /* driver */
> >
> >register_dev("sonar_left"
> > find_class("sonars"), /* class */
> > 2, /* number of pins */
> > (PORT []){1, OUTPUT, 2 INPUT}, /* pin list */
> > &generic_led); /* driver */
> >
> >set_dev("led1", ON);
> >int dist = get_dev("sonar1");
> >
> >A driver looks like this:
> >
> >float generic_led(int mode) {
> > printf("Led driver called!\n");
> > switch(mode) {
> > case ON: set_pin(1, ON); break;
> > case OFF: set_pin(1, ON); break;
> > }
> >}
> >
> >You get the idea ;-)
> >
> >At this moment this concept is working when compiling hal_demo.c on a
> >pc. (Botix/Hardware/Hal)
> >
> >The hal should be directly driven by an protocol stack or small virtual
> >machine running on the CPU.
> >
> >One big problem at this time is memory consumption, I will keep trying
> >to reduce the memory footprint.
> >
> >Let met know what you all think of this!
> >
> >Greetings,
> >Wouter
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >-------------------------------------------------------
> >SF.Net email is sponsored by:
> >Tame your development challenges with Apache's Geronimo App Server. Download
> >it for free - -and be entered to win a 42" plasma tv or your very own
> >Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
> >_______________________________________________
> >Botix-devel mailing list
> >Bot...@li...
> >https://lists.sourceforge.net/lists/listinfo/botix-devel
> >
> >
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by:
> Tame your development challenges with Apache's Geronimo App Server. Download
> it for free - -and be entered to win a 42" plasma tv or your very own
> Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
> _______________________________________________
> Botix-devel mailing list
> Bot...@li...
> https://lists.sourceforge.net/lists/listinfo/botix-devel
|
|
From: Ger A. <in...@ge...> - 2005-11-13 17:38:15
|
Hi WOuter >For i2c we can use some kind of virtual device, which is what the >compass driver uses when executing commands. Port expanders can use >multiple pins and just have to be defined, right? > > Yeah, mine have got 8 io pins each. When read, you get a byte containing the entire set of bits. You've got to AND them with a bitmask to determine if a single bit is high or low. They can be used as output too. >Device linking is possible, so led1 is connected to portexpander port 1 >which is at its turn connected to a set of avr pins. (right?) > > > nope, the expander is connected to i2c. You're talking about a shift register. (cheaper, but requires a number of io pins.) >>Is it possible to include the driver-includes only when they are >>actually used? >> >> >> > >Yep no problem, so the more we stuff things in drivers the more modulair >and 'rom' efficient things will get. This is the big advantage of using >function pointers. > > Excellent! :) Gerrrrrrrr |
|
From: Just4 F. <rb...@ho...> - 2005-11-13 22:37:23
|
Hi all, I know that classes etc are the way to program nowadays. However, Atmel controllers are not designed to have classes or anything. They are just made to run some simple assembler code. There is hardly any RAM, so what does it benifit? If Botix should remain compatible, you should consider, that RAM usage should be minimized to almost any price. The least price is programmmers convienience. Please consider RAM usage, and (maybe) possible compiler options to avoid RAM usage. >>For i2c we can use some kind of virtual device, which is what the >>compass driver uses when executing commands. Port expanders can use >>multiple pins and just have to be defined, right? Port expanders are just a way of interfacing the controllers. They don't have to know anything about what is going on, they just have to interface / expand. So they should just be an extra interfacing layer, that can be addressed by input/output devices, as if it was just processor hardware. >nope, the expander is connected to i2c. You're talking about a shift >register. (cheaper, but requires a number of io pins.) This problem should also be solved if an expander is just regarded as some way to interface between controller and periphials, but not as an item on itself. It does not contribute to the robot, it contributes to the controller. Although the previous may sound negativ, I still think that the implementation of such a layer is an improvement on Botix. Only thing is that an ATmega32 may not be considered as a standard Atmel controller. It is a controller that comes out of the Atmel top line. I think you should also test your software on a cheaper controller???? Greetz, Richard |
|
From: Ger A. <in...@ge...> - 2005-11-14 05:54:39
|
Hi Richard, Just4 Fun schreef: > Hi all, > > I know that classes etc are the way to program nowadays. However, > Atmel controllers are not designed to have classes or anything. They > are just made to run some simple assembler code. There is hardly any > RAM, so what does it benifit? If Botix should remain compatible, you > should consider, that RAM usage should be minimized to almost any > price. The least price is programmmers convienience. Please consider > RAM usage, and (maybe) possible compiler options to avoid RAM usage. Class is not only a java class, but also english for "klasse", or type of device. This HAL is not really object oriented in the java or C++ sense. > >>> For i2c we can use some kind of virtual device, which is what the >>> compass driver uses when executing commands. Port expanders can use >>> multiple pins and just have to be defined, right? >> > Port expanders are just a way of interfacing the controllers. They > don't have to know anything about what is going on, they just have to > interface / expand. So they should just be an extra interfacing layer, > that can be addressed by input/output devices, as if it was just > processor hardware. Yes, but a device behind a port expander is addressed in a different manner (for the controller) than a device directly to a pin. Botix should know how to address it. > >> nope, the expander is connected to i2c. You're talking about a shift >> register. (cheaper, but requires a number of io pins.) > > This problem should also be solved if an expander is just regarded as > some way to interface between controller and periphials, but not as an > item on itself. It does not contribute to the robot, it contributes to > the controller. I agree. > > Although the previous may sound negativ, I still think that the > implementation of such a layer is an improvement on Botix. Only thing > is that an ATmega32 may not be considered as a standard Atmel > controller. It is a controller that comes out of the Atmel top line. I > think you should also test your software on a cheaper controller???? Yes, but the memory constraint will probably be a problem. We've got to do our best to minimalize memory consumption, but when we add a layer (which was there from the beginning) to make it easier to configure for the end-user extra memory utilization is inevitable. Unless we hard-code all the nessessary ports and pins directly into the code controlling the sonar for instance, we've got to store this information somewhere. As much of the static data as possible should be stored in flash, and I know Wouter is trying to achieve that. But you are right, it should be tested on a cheaper controller (f.e. atmega8) That's where you come in! ;) Ger. > > Greetz, > > Richard > > > > > ------------------------------------------------------- > SF.Net email is sponsored by: > Tame your development challenges with Apache's Geronimo App Server. > Download > it for free - -and be entered to win a 42" plasma tv or your very own > Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php > _______________________________________________ > Botix-devel mailing list > Bot...@li... > https://lists.sourceforge.net/lists/listinfo/botix-devel |