Start a new topic

Arduino verify error

 Hi,


I get this error when verifying the code:


open_evse:197: error: 'void wiresend(uint8_t)' was declared 'extern' and later 'static' [-fpermissive]
 static inline void wiresend(uint8_t x) {


Yoav


What version of Arduino IDE are you using?


What version of OpenEVSE code?

Arduino 1.6.6

open_evse_stable

Hi,

declaring the function solved the error:
+ static inline void wiresend(uint8_t x);
static inline void wiresend(uint8_t x) { // my be wiresend(uint8_t x) {... will do
#if ARDUINO >= 100
  Wire.write((uint8_t)x);
#else
  Wire.send(x);
#endif
}

+ static inline uint8_t wirerecv(void);
static inline uint8_t wirerecv(void) {
#if ARDUINO >= 100
  return Wire.read();
#else
  return Wire.receive();
#endif
}

 now i get:

Sketch too big;

Sketch uses 32,262 bytes (100%) of program storage space. Maximum is 32,256 bytes.


Yoav

You need to add the OpenEVSE board to the Arduino boards.txt 


or


Add OpenEVSE through the Board Manager:


https://github.com/chris1howell/Arduino_Board_Manager

I'm running into the same error that Yoav reported. I'm using the Arduino 1.6.6 software on Mac OS X 10.11.1. I did update the .../Java/hardware/arduino/avr/boards.txt file with the new definitions for the openers board.


While debugging this issue, I discovered that downgrading to either the Arduino 1.6.2 or 1.6.5 toolset allowed the source code to compile, but I then received the other error that Yoav mentioned of getting a sketch that is too big.

@Christopher tnx,

the board manager solved the Sketch too big; error.
what about the other errors? is my solution of declaring the function make sense?

yoav

 

OK, I finally was able to compile the code that I downloaded from https://github.com/OpenEVSE/open_evse.


To correct the compilation error, I just downgraded my copy of the Arduino toolset from version 1.6.6 down to 1.6.5. For whatever reason, the stable code branch available now doesn't compile cleanly using the latest toolset. While I understand that I could have added the function prototypes, until I learn a little more about Arduino in general and OpenEVSE in particular, I'm going to keep it as simple as possible.


To correct the second issue that we ran into, with the compiler saying the resulting code object is too large, adding the board definition worked. There apparently are multiple ways to define new board/connection types. I did this by selecting Arduino->Preferences and then entering https://github.com/chris1howell/Arduino_Board_Manager/releases/download/v0.1/package_OpenEVSE_328p_index.json in the "Additional Board Manager URLs" field, closing that dialog box, then selecting "Tools->Boards->Board Manager", selecting the OpenEVSE entry and then clicking Install. "[Programmer]OpenEVSE" was now a board type.


After downgrading the toolset and installing the custom board type, the current code set compiles cleanly. Just hoping this helps others as they work through this process.

I installed Arduino IDE 1.6.7 on my Linus Fedora 23 system.
I checked out the stable branch at https://github.com/OpenEVSE/open_evse
I installed and selected the "[Programmer]OpenEVSE" board type.

When I do a 'Verify/Compile' I get the following error message:
"In file included from sketch/.ammeter_cal/ammeter_cal.cpp:23:0:
sketch/.ammeter_cal/ammeter_cal.h:29:18: fatal error: time.h: No such file or directory
 #include <time.h>
                  ^
compilation terminated."

I could not find a 'time.h' in any of the open_evse tree or the Arduino libraries.
If I remove the 'ammeter_cal' directory, I get a successful compile.

What should I do to correctly solve the missing 'time'h' problem?

Greg, Did you unzip all the files? In the main directory I see 3 folders and 56 files including time.h and time.cpp.

My apologies. Initially, I did a 'git clone git://github.com/lincomatic/open_evse.git' to create the 'open_evse' directory.
I just tried using the zip file, and the verify/compile succeeded.

What is the difference between the 'git clone' and the zip file method? What controls the content of the sketch building?

In the 'open_evse' directory from the zip file, I also see 3 directories and 56 files. There is a 'Time.h' and a 'Time.cpp' but not 'time.h' nor 'time.cpp'.

 

Login or Signup to post a comment