Offline
Newbie
Karma: 0
Posts: 3
|
 |
« on: April 26, 2011, 01:10:28 pm » |
Hi,
I'm trying to use the new QP framework for Arduino, but I'm getting some kind of compilation problem.
I followed the Playground tutorial, and It fails on compiling the dpp example. I've copied the libraries and the examples just like is said in the tutorial.
I got this message:
'Serial' was not declare in this scope. bsp.cpp:31:22: error: Wprogram.h: No such file or directory bsp.cpp: In function ‘void BSP_init()’: bsp.cpp:61: error: ‘Serial’ was not declared in this scope bsp.cpp: In function ‘void BSP_displyPhilStat(uint8_t, const char*)’: bsp.cpp:99: error: ‘Serial’ was not declared in this scope bsp.cpp:100: error: ‘DEC’ was not declared in this scope
Looks like any kind of library problem, but i can't get it working. Any idea?
I'm using Arduino-022 IDE over Ubuntu 9.04.
Thank you.
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Dallas
Online
Shannon Member
Karma: 116
Posts: 10141
|
 |
« Reply #1 on: April 27, 2011, 02:50:02 pm » |
I just installed the library and examples on a Windows Vista computer. Both examples compile trouble-free. The problem appears to be unrelated to QP.
Have you selected the appropriate board?
Are you able to build a simple Sketch that makes use of Serial?
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 3
|
 |
« Reply #2 on: May 03, 2011, 01:57:34 pm » |
Thank you for your reply.
I´ve compiled the examples in windows without any problem. Still no luck in Ubuntu.
Yes, I can compile sketches using the serial library under the same configuration, in Ubuntu.It only fails with these examples and I cant understand why the compiler cant find the libraries.
I would like to find a solution to this problem, as I´m developing primary under Linux. On the other hand, I will have no problem using Windows. It just looks annoying.
Thank you again for your help.
|
|
|
|
« Last Edit: May 03, 2011, 02:08:44 pm by mdb2084 »
|
Logged
|
|
|
|
|
Global Moderator
Dallas
Online
Shannon Member
Karma: 116
Posts: 10141
|
 |
« Reply #3 on: May 03, 2011, 02:15:37 pm » |
In bsp.cpp, change this line...
#include "Wprogram.h"
...to this...
#include <WProgram.h>
...does that make a difference?
Edit: Changed per hixhix's post.
|
|
|
|
« Last Edit: September 03, 2011, 01:28:10 pm by Coding Badly »
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 3
|
 |
« Reply #4 on: May 05, 2011, 07:38:48 am » |
No, sorry, doesn´t work that way, but you gave me a great idea. I commented the "Wprogram.h" and added the HardwareSerial.h library. The new headers definition in the bsp.cpp looks like this: #include "qp_port.h" #include "dpp.h" #include "bsp.h" //#include "Wprogram.h" #include "HardwareSerial.h" Now it compiles,  . Whatever, I don´t understand why it didn´t work with the original declarations. Thank you for your help.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 1
|
 |
« Reply #5 on: September 03, 2011, 09:09:59 am » |
The problem is with the qp example files, the include statement refers to a non existing file, at least on case sensitive Linux.
The file to be included is named WProgram.h, please note that the first two letters are upper-case. qp tries to include a file named Wprogram.h, which is something else on Linux.
Hixhix
|
|
|
|
|
Logged
|
|
|
|
|
Chapel Hill, NC, USA
Offline
Newbie
Karma: 4
Posts: 8
|
 |
« Reply #6 on: September 26, 2011, 08:10:16 am » |
The new release (4.2.04) of the QP framework for Arduino fixes the problem with "WProgram.h" in the examples. Please download the new qp_arduino.zip file from http://www.state-machine.com/arduino/qp_arduino.zip.
|
|
|
|
|
Logged
|
|
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 3
|
 |
« Reply #8 on: January 11, 2012, 05:19:20 am » |
Hello, I want to build the Focus stacking assistant for EOS cameras project (site : http://www.circuitsathome.com/camera-control/focus-stacking-assistant-for-eos-cameras) with an Arduino Uno, they use QP framework. When compiling with Arduino IDE v1.0 and the latest qp_arduino.zip, I have the following error : bsp.cpp:185: error: variable or field ‘onIdle’ declared void bsp.cpp:185: error: ‘QF_INT_KEY_TYPE’ was not declared in this scope When I compile the examples from qp pack : qm_pelican, qp_pelican and qp_dpp, I have the same error. I tried to compile the project with Arduino IDE 0022, and have the same error. My knowledge of language C/C++ is very very basic and don’t see what is wrong. Can you help me. Thanks and Happy New Year.
|
|
|
|
|
Logged
|
|
|
|
|
Chapel Hill, NC, USA
Offline
Newbie
Karma: 4
Posts: 8
|
 |
« Reply #9 on: January 11, 2012, 11:00:45 am » |
Hi BlackBird, First, let's clarify that the examples in the latest http://www.state-machine.com/arduino/qp_arduino.zip really have the problem that you report, because they work fine for me. Please note that you need to copy the \libraries\qp\ subdirectory to the arduino\libraries\ folder and the \examples\qp\ subdirectory to the arduino\examples\ folder. All this is described in the Application Note available online at http://www.state-machine.com/arduino/AN_Event-Driven_Arduino.pdf. Now, regarding the EOS cameras project, it is using the previous version of QP. To bring it up to QP 4.3.00, you need to change the QF::onIdle() function in the bsp.cpp file as follows: void QF::onIdle() {
#ifdef SAVE_POWER
SMCR = (0 << SM0) | (1 << SE); // idle sleep mode, adjust to your project
// never separate the following two assembly instructions, see NOTE2 __asm__ __volatile__ ("sei" "\n\t" :: ); __asm__ __volatile__ ("sleep" "\n\t" :: );
SMCR = 0; // clear the SE bit
#else QF_INT_ENABLE(); #endif }
Please make a post to this forum when you find out what's wrong with the QP examples and to confirm that the fix to the EOS cameras project works.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 3
|
 |
« Reply #10 on: January 13, 2012, 05:26:51 am » |
Hello,
Qp examples run fine, my problem was that the librairies FSA_EOS, PTP and USB host shield were in the arduino librairy, now I put them in the sketchbook library, what is normal. (I am newbie with Arduino). But I think that Arduino Ide 1.0 has made modification, not documented. I think that the projet Focus stacking assistant for EOS cameras from Circuits@Home was made with a previous version (0022 or 0023) and may be with a previous version of QM state machine framework. With my bad knowledge of language C/C++ it will be difficult to find why Focus stacking doesn't work. Thanks for your help.
|
|
|
|
|
Logged
|
|
|
|
|
Chapel Hill, NC, USA
Offline
Newbie
Karma: 4
Posts: 8
|
 |
« Reply #11 on: January 13, 2012, 09:18:31 am » |
I've notified Oleg Mazurov, the author of the FSA_EOS, PTP and USB host shield libraries, about the incompatibilities with the new QP 4.3.00 and Arduino IDE 1.0. It seems that his help would be needed to bring all these software components up to date.
--Miro
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 3
|
 |
« Reply #12 on: January 13, 2012, 02:32:41 pm » |
Many thanks for your help. Regards
|
|
|
|
|
Logged
|
|
|
|
|
Louisville, CO
Offline
Full Member
Karma: 2
Posts: 172
Arduino rocks
|
 |
« Reply #13 on: January 14, 2012, 04:03:44 pm » |
|
|
|
|
|
Logged
|
/felis
|
|
|
|
|