I copied the last question from Carl van Denzen to start a new topic as follows:
Can you give me some hints about Eclipse and Haiku? I should RTFM, but the help text is not very to the point.
I imported the projects from svn (import with "find child projects") into Eclipse.
I have some concrete questions:
- where can I find the logging of the build process? The Progress view is empty.
- is it a good idea to compile LiquidCrystal.java into bootstrap.jar (package haiku.avr.lib.arduino)?
- is it a good idea to put LiquidCrystalHelloWorld.java in examples (package arduino.tutorial)
- how would I build the bootstrap.jar?
- should I copy the bootstrap.jar from the Eclipse workspace into my Haiku directory and build from there?
Last edit: genom2 2013-05-14
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This is too fast and too much for me. I have to break it down into small steps.
1) Did you read "Step 1" of this http://haiku-vm.sourceforge.net/#Eclipse
description and is your workspace is looking similar? (Keep in mind that "trunk" is always a bit fuzzy. Try to stay with "... tags/HaikuVM-1.0.2" until "... tags/HaikuVM-1.0.3" is released.)
2) I don't know what you mean with "build process". Up to today there is no build process associated with HaikuVM in Eclipse. May be in a later release when I mavenize the whole thing. (I want to leave it to MAVEN and don't want to start writing ANT scripts.)
3) I'm not sure where to put LiquidCrystal.java. My first idea is to put it into project "galerie". There into package "arduino.libraries.liquidcrystal" just to be symetric with the Arduino directory structure. (To enable a seamless transition to HaikuVM for those who already know about the Arduino directory structure.)
4) Sounds good to me.
5) On project "bootstrap" just right-mouse-click | "Export ..." | "Java" | "JAR file" overwriting existing file in workspace "lib/haikuvm/bootstrap.jar" (not! your Haiku directory).
7) For the leonardo, before stepping into LiquidCrystal.java we should focus on
a) BlinkWithThreads without MicroKernel similar like this "avr.gallerie.user.alan.BlinkWithThreads". Because if this is running Thread.sleep(..) will work. (Timing functions are needed in LiquidCrystal!)
b) Serial Output. Because if this is running debugging will be much simpler.
c) Doing a) and b) again this time with a MicroKernel tailor made for leonardo. Because this is the base for a successful LiquidCrystal implementation.
Last edit: genom2 2013-05-14
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The first (logging of build process) is not important, I found the answer.
The other questions about creating new libraries could very well be a chapter on the documentation page of haikuVM. That could also stimulate others to add new libraries.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
1) I imported tags/...1.0.2 into Eclipse.
2) build process is the make process, as used in Netbeans with ant. This issue is not important anymore.
3) I followed your advice for the place and package.
4)..
5) Thank you, this saved me a lot of searching (make a jar file in Eclipse)!
6) I do not see where this could be useful, but that will be clear later. For now I have a .bat file that does the trick and that I can easily edit.
7a) BlinkWithThreads runs in the configuration I already had set up (with the patched JVM.c). It is another led than the first one, but that looks ok because this java file uses portd.
7b) Serial output is more difficult for me. Is there a test or an example how I could do that? How do I catch the serial output in Windows? copy com6: ?
7c) to do later
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
it should shed some light on this solution. Does it work? (If so I will move the NativeCVariable declarations into haiku.avr.AVRConstants.) But maybe its not perfect yet.
For more background read this description about (the powerfull) direct memory access principles in HaikuVM: http://haiku-vm.sourceforge.net/#[[Memory%20Access]]
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
One little problem: I do not have a serial interface in my laptop, and probably rs232 has had its longest time. I suggest to move into the new era of usb. The Arduino Leonardo comes with USB CDC support (com port emulation over usb).
What would be the best way to incorporate it in Haiku? There are some subjects to consider: if you don't want to use usb and/or cdc, you probably don't want it to be in your kernel.
There are two files (I think) that make up the usb and cdc support in Arduino: hardware/arduino/core/arduino/cores/USBCore.cpp and CDC.cpp. There are so many possibilities that I don't know what is the best way: translate the .cpp files into Java files? Make Java files call the native functions of the .cpp files? Where do I put these files?
The problem is quite general: how to integrate Arduino drivers into haiku?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
8) Now I understand. You didn't talk about the physical Serial/Bluetooth Header Pins. You talked about one of the virtual Serial Ports. Right? If so, then this is a challenge! And I don't know what's the best way to implement it. I need to think about it.
9) Faced with this facts a successful LiquidCrystal implementation seams to be less challenging and could be done earlier. But I need your kind help for this. If you agree I will close this thread and you should open a new one
9a) asking for LiquidCrystal implementation in HaikuVM. (Meanwhile I will think about 8.)
9b) asking for USB support in HaikuVM.
Last edit: genom2 2013-05-21
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I copied the last question from Carl van Denzen to start a new topic as follows:
Can you give me some hints about Eclipse and Haiku? I should RTFM, but the help text is not very to the point.
I imported the projects from svn (import with "find child projects") into Eclipse.
I have some concrete questions:
- where can I find the logging of the build process? The Progress view is empty.
- is it a good idea to compile LiquidCrystal.java into bootstrap.jar (package haiku.avr.lib.arduino)?
- is it a good idea to put LiquidCrystalHelloWorld.java in examples (package arduino.tutorial)
- how would I build the bootstrap.jar?
- should I copy the bootstrap.jar from the Eclipse workspace into my Haiku directory and build from there?
Last edit: genom2 2013-05-14
This is too fast and too much for me. I have to break it down into small steps.
1) Did you read "Step 1" of this
http://haiku-vm.sourceforge.net/#Eclipse
description and is your workspace is looking similar? (Keep in mind that "trunk" is always a bit fuzzy. Try to stay with "... tags/HaikuVM-1.0.2" until "... tags/HaikuVM-1.0.3" is released.)
2) I don't know what you mean with "build process". Up to today there is no build process associated with HaikuVM in Eclipse. May be in a later release when I mavenize the whole thing. (I want to leave it to MAVEN and don't want to start writing ANT scripts.)
3) I'm not sure where to put LiquidCrystal.java. My first idea is to put it into project "galerie". There into package "arduino.libraries.liquidcrystal" just to be symetric with the Arduino directory structure. (To enable a seamless transition to HaikuVM for those who already know about the Arduino directory structure.)
4) Sounds good to me.
5) On project "bootstrap" just right-mouse-click | "Export ..." | "Java" | "JAR file" overwriting existing file in workspace "lib/haikuvm/bootstrap.jar" (not! your Haiku directory).
6) No, just stay with the description here
http://haiku-vm.sourceforge.net/#Eclipse
and follow Step 2 and Step 3.
7) For the leonardo, before stepping into LiquidCrystal.java we should focus on
a) BlinkWithThreads without MicroKernel similar like this "avr.gallerie.user.alan.BlinkWithThreads". Because if this is running Thread.sleep(..) will work. (Timing functions are needed in LiquidCrystal!)
b) Serial Output. Because if this is running debugging will be much simpler.
c) Doing a) and b) again this time with a MicroKernel tailor made for leonardo. Because this is the base for a successful LiquidCrystal implementation.
Last edit: genom2 2013-05-14
The first (logging of build process) is not important, I found the answer.
The other questions about creating new libraries could very well be a chapter on the documentation page of haikuVM. That could also stimulate others to add new libraries.
1) I imported tags/...1.0.2 into Eclipse.
2) build process is the make process, as used in Netbeans with ant. This issue is not important anymore.
3) I followed your advice for the place and package.
4)..
5) Thank you, this saved me a lot of searching (make a jar file in Eclipse)!
6) I do not see where this could be useful, but that will be clear later. For now I have a .bat file that does the trick and that I can easily edit.
7a) BlinkWithThreads runs in the configuration I already had set up (with the patched JVM.c). It is another led than the first one, but that looks ok because this java file uses portd.
7b) Serial output is more difficult for me. Is there a test or an example how I could do that? How do I catch the serial output in Windows? copy com6: ?
7c) to do later
7b)
On XP I used Hyperterminal. Today I'm using putty to catch the serial in/output in Windows.
I studied the ATmega32U4 manual to some depth. May be you are right stateing "Serial output is more difficult". Nevertheless I prepared
in SVN here
for you to try serial output with leonardo. If you compare this with
it should shed some light on this solution. Does it work? (If so I will move the NativeCVariable declarations into haiku.avr.AVRConstants.) But maybe its not perfect yet.
For more background read this description about (the powerfull) direct memory access principles in HaikuVM:
http://haiku-vm.sourceforge.net/#[[Memory%20Access]]
One little problem: I do not have a serial interface in my laptop, and probably rs232 has had its longest time. I suggest to move into the new era of usb. The Arduino Leonardo comes with USB CDC support (com port emulation over usb).
What would be the best way to incorporate it in Haiku? There are some subjects to consider: if you don't want to use usb and/or cdc, you probably don't want it to be in your kernel.
There are two files (I think) that make up the usb and cdc support in Arduino: hardware/arduino/core/arduino/cores/USBCore.cpp and CDC.cpp. There are so many possibilities that I don't know what is the best way: translate the .cpp files into Java files? Make Java files call the native functions of the .cpp files? Where do I put these files?
The problem is quite general: how to integrate Arduino drivers into haiku?
8) Now I understand. You didn't talk about the physical Serial/Bluetooth Header Pins. You talked about one of the virtual Serial Ports. Right? If so, then this is a challenge! And I don't know what's the best way to implement it. I need to think about it.
9) Faced with this facts a successful LiquidCrystal implementation seams to be less challenging and could be done earlier. But I need your kind help for this. If you agree I will close this thread and you should open a new one
9a) asking for LiquidCrystal implementation in HaikuVM. (Meanwhile I will think about 8.)
9b) asking for USB support in HaikuVM.
Last edit: genom2 2013-05-21