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´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.
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.
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.
The QP framework Arduino Playground - QP-nano framework for Arduino has been updated for the new Arduino-1.0 and the latest QP version 4.3.00. This version adds also an example, which demonstrates preemptive multitasking on Arduino.
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.
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.
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.
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.