Example file for Maixduino Board fails to compile

Hello,

I have bought the Maixduino board from Sipeed, and wish to program it using Arduino IDE.
I have installed the Maixduino board tools, and under the "Tools" menu, I have set:

Board: "Sipeed Maixduino Board"
CPU Clock Frequency: 400 MHz
Burn Tool Firmware: Default
Burn Baud Rate: 1.5 Mbps
Tool Install Location: Default
Port: ( This is the correct port)
Programmer: k-flash

From the Examples files, I have opened:
Sipeed_OV2640/selfie.ino

Up to this point, everything looks good, no problems.

But it fails to compile.
I get following error mesages:

selfie:7:15: error: cannot declare variable 'camera' to be of abstract type 'Sipeed_OV2640'
Sipeed_OV2640 camera(FRAMESIZE_QVGA, PIXFORMAT_RGB565);
^~~~~~
In file included from C:\Users\Ken\AppData\Local\Arduino15\packages\Maixduino\hardware\k210\0.3.11\libraries\Sipeed_OV2640\examples\selfie\selfie.ino:1:
C:\Users\Ken\AppData\Local\Arduino15\packages\Maixduino\hardware\k210\0.3.11\libraries\Sipeed_OV2640\src/Sipeed_OV2640.h:36:7: note: because the following virtual functions are pure within 'Sipeed_OV2640':
class Sipeed_OV2640 : public Camera{
^~~~~~~~~~~~~
In file included from C:\Users\Ken\AppData\Local\Arduino15\packages\Maixduino\hardware\k210\0.3.11\libraries\Sipeed_OV2640\src/Sipeed_OV2640.h:4,
from C:\Users\Ken\AppData\Local\Arduino15\packages\Maixduino\hardware\k210\0.3.11\libraries\Sipeed_OV2640\examples\selfie\selfie.ino:1:
C:\Users\Ken\AppData\Local\Arduino15\packages\Maixduino\hardware\k210\0.3.11\libraries\Camera\src/Camera.h:79:18: note: 'virtual void Camera::setRotation(uint8_t)'
virtual void setRotation(uint8_t rotation) = 0;
^~~~~~~~~~~

exit status 1
cannot declare variable 'camera' to be of abstract type 'Sipeed_OV2640'

Can you offer any help ?
Many thanks.

A quick Google search shows that you are not the first to hit this bug.

https://visualgdb.com/tutorials/arduino/maixduino/

You can fix the build error by navigating to definition of Sipeed_OV2640 and adding an empty implementation of setRotation() to it:

1

virtual void setRotation(uint8_t rotation) { }

Hello,

Thanks for quick reply, and my apologies for tardy response.
I have edited the Sipeed_OV2640.h file as you indicated, and it now compiles OK.
A few warnings, but I can live with that.

I should say I spent a couple of hours searching online, but did not find the link you give.
I often find that online search only works when you know where to search !!

Anyway, problem solved; many thanks for your help

I searched for: Maixduino virtual