QuantumLeaps / qpcpp

QP/C++ Real-Time Embedded Framework/RTOS for embedded systems based on active objects (actors) and hierarchical state machines
https://www.state-machine.com/products/qp
386 stars 82 forks source link

Undefined reference to QP::QS::onCommand() method #2

Closed subinsebastien closed 5 years ago

subinsebastien commented 5 years ago

The following error is at examples/workstation/blinky with make with CONF=spy

../../../src/qs/qs_rx.cpp:851: undefined reference to `QP::QS::onCommand(unsigned char, unsigned int, unsigned int, unsigned `int)'

Looks like a dummy implementation of onCommand() is missing from the source code. Shall I create a pull request with a fix?

quantum-leaps commented 5 years ago

The simple Blinky examples are intended to be, well, very simple and therefore they don't support the Spy build configuration. Typically, with applications that have a separate BSP (board support package), the BSP has hard-coded #error message that tells you explicitly that the Spy build configuration is not supported. But the Blinky example in workstation/blinky directory is even simpler than that (because it is entirely coded in the singly blinky.cpp file to match the online QM Tutorial). For that reason, it does not even have the aforementioned #error message.

Anyway, this is NOT an error but the simplistic nature of the Blinky application. If you wish to build for Spy, you can always use DPP or other examples.

No pull request or "fixing" this issue is needed.

--MMS

subinsebastien commented 5 years ago

Alright, if it is "intentional", better provide a message from the makefile when someone tries the spy configuration.

quantum-leaps commented 5 years ago

Yes, perhaps the error message in the Makefile would be clearer, but then the Makefile could not be re-used as easily for custom projects that do build Spy configuration. It's difficult to win here... --MMS