Compile error

A shrunk down Leonardo-compatible board, thumb drive sized with native USB support. [Product info]
Post Reply
owencook
Posts: 2
Joined: Tue Jan 01, 2013 11:12 am

Compile error

Post by owencook » Wed Jan 02, 2013 3:07 am

The LeoStick I had word perfectly, but I have now gone into a Fedora 17, and a Suse-12.2 enviroment and I am unable to get Sketchbook to compile

LeoStick_v1_0 in my sketchbook/hardware directory. D/L in the last week
Programmer is AVRISP MkII (also AVR ISP)

Error message is
======================================================
/home/owen/sketchbook/hardware/LeoStick_v1_0/cores/arduino/Print.cpp: In member function 'size_t Print::print(const __FlashStringHelper*)':
/home/owen/sketchbook/hardware/LeoStick_v1_0/cores/arduino/Print.cpp:44: error: expected initializer before '*' token
/home/owen/sketchbook/hardware/LeoStick_v1_0/cores/arduino/Print.cpp:47: error: 'p' was not declared in this scope
======================================================

I really have no idea where to go from here and if there are any pointers, I would be most
appreciative.

If I pick another board, like Leonardo, it will compile, but I can't upload. I will probably take the local boards.txt file and replace the Leonardo board data with the LeoStick data.

TIA

owencook
Posts: 2
Joined: Tue Jan 01, 2013 11:12 am

Re: Compile error

Post by owencook » Wed Jan 02, 2013 6:20 am

Well I think I solved the problem by copying Print.cpp from
/usr/share/arduino-1.0.1/hardware/arduino/cores/arduino to the local sketchbook at
~/sketchbook/hardware/LeoStick_v1_0/cores/arduino

At least Blink recompiled with different time intervals was uploaded successfully

# diff Print.cpp.bak Print.cpp
44c44
< const prog_char *p = (const prog_char *)ifsh;
---
> const char PROGMEM *p = (const char PROGMEM *)ifsh;

Wish I knew a bit more about C or C++

In case anyone else has this problem

Post Reply