glumb / mrc

MicroPede robot controller 🤖🖥👾
https://micropede.de
MIT License
96 stars 44 forks source link

platformio run ends with error #7

Closed marmik18 closed 3 years ago

marmik18 commented 5 years ago

Sorry i am new to platformio could you please help me out

Processing megaatmega2560 (platform: atmelavr; board: megaatmega2560; framework: arduino)
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/atmelavr/megaatmega2560.html
PLATFORM: Atmel AVR > Arduino Mega or Mega 2560 ATmega2560 (Mega 2560)
HARDWARE: ATMEGA2560 16MHz 8KB RAM (248KB Flash)
Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF MODES: FINDER(chain) COMPATIBILITY(soft)
Collected 11 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <SPI> 1.0
|-- <TimerOne>
|-- <Adafruit SSD1306> 1.1.2

|   |-- <SPI> 1.0
|   |-- <Wire> 1.0
|   |-- <Adafruit GFX Library> 1.1.5
|-- <Adafruit GFX Library> 1.1.5
|-- <Wire> 1.0
|-- <Servo> 1.1.3
|-- <EEPROM> 2.0
Compiling .pioenvs\megaatmega2560\src\EEPromStorage.cpp.o
Compiling .pioenvs\megaatmega2560\src\IOLogic.cpp.o
Compiling .pioenvs\megaatmega2560\src\Kinematic.cpp.o
Compiling .pioenvs\megaatmega2560\src\Logger.cpp.o
Compiling .pioenvs\megaatmega2560\src\MRCPParser.cpp.o
Compiling .pioenvs\megaatmega2560\src\MRILParser.cpp.o
Compiling .pioenvs\megaatmega2560\src\RingBuffer.cpp.o
Compiling .pioenvs\megaatmega2560\src\RobotController.cpp.o
src\EEPromStorage.cpp: In member function 'void EEPromStorage::appendMessage(char*, char)':
src\EEPromStorage.cpp:27:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t i = 0; i < length; i++) {
^
src\EEPromStorage.cpp:34:19: warning: array subscript has type 'char' [-Wchar-subscripts]
message[length] = 0;
^
src\EEPromStorage.cpp: In member function 'char EEPromStorage::getMessage(unsigned int, char*)':
src\EEPromStorage.cpp:54:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t i = 0; i < messageLength; i++) {
^
src\IOLogic.cpp: In member function 'void IOLogic::addCondition(unsigned int, unsigned int)':
src\IOLogic.cpp:17:22: error: 'INPUT_PULLDOWN' was not declared in this scope
pinMode(pin, INPUT_PULLDOWN);
src\IOLogic.cpp: In member function 'void IOLogic::setOutput(unsigned int, unsigned int)':
src\IOLogic.cpp:32:20: warning: invalid conversion from 'unsigned int' to 'const char*' [-fpermissive]
logger.info(pin);
^
In file included from src\IOLogic.cpp:4:0:
src\Logger.h:30:10: note:   initializing argument 1 of 'void Logger::info(const char*, bool)'
void info(const char *text,
^
src\IOLogic.cpp:34:22: warning: invalid conversion from 'unsigned int' to 'const char*' [-fpermissive]
logger.info(state);
^
In file included from src\IOLogic.cpp:4:0:
src\Logger.h:30:10: note:   initializing argument 1 of 'void Logger::info(const char*, bool)'
void info(const char *text,
^

*** [.pioenvs\megaatmega2560\src\IOLogic.cpp.o] Error 1
src\MRCPParser.cpp: In member function 'void MRCPParser::parseCommand(char*, unsigned int)':
src\MRCPParser.cpp:83:36: warning: invalid conversion from 'char' to 'const char*' [-fpermissive]
logger.info((char)buffer[0]);
^
In file included from src\MRCPR.h:9:0,
from src\MRILParser.h:10,
from src\MRCPParser.h:6,
from src\MRCPParser.cpp:1:
src\Logger.h:30:10: note:   initializing argument 1 of 'void Logger::info(const char*, bool)'
void info(const char *text,
^
src\MRCPParser.cpp: In member function 'void MRCPParser::process()':
src\MRCPParser.cpp:164:20: warning: enumeration value 'HALT' not handled in switch [-Wswitch]
switch (this->mrcpMode) {
^
src\MRCPParser.cpp:164:20: warning: enumeration value 'EXECUTE' not handled in switch [-Wswitch]
In file included from src\MRCPR.h:9:0,
from src\MRILParser.h:10,
from src\MRILParser.cpp:1:
src\Logger.h: In member function 'void MRILParser::parse(char*, unsigned int)':
src\Logger.h:24:10: note:   initializing argument 1 of 'void Logger::warning(String, bool)'
void warning(String text,
^
src\MRILParser.cpp:254:42: error: no matching function for call to 'Logger::warning(float&)'
_logger.warning(value);
^
In file included from src\MRCPR.h:9:0,
from src\MRILParser.h:10,
from src\MRILParser.cpp:1:
src\Logger.h:24:10: note: candidate: void Logger::warning(String, bool)
void warning(String text,
^
src\Logger.h:24:10: note:   no known conversion for argument 1 from 'float' to 'String'
src\Logger.h:24:10: note:   initializing argument 1 of 'void Logger::warning(String, bool)'
*** [.pioenvs\megaatmega2560\src\MRILParser.cpp.o] Error 1
In file included from src\RobotController.cpp:2:0:
src\RobotController.h: In constructor 'RobotController::RobotController(VarSpeedServo**, Kinematic&, float (*)[2], void (*)(float*), void (*)(float*))':
src\RobotController.h:119:28: warning: 'RobotController::Servos' will be initialized after [-Wreorder]
VarSpeedServo *Servos[6];
^
src\RobotController.h:118:16: warning:   'Kinematic& RobotController::_Kinematic' [-Wreorder]
Kinematic &_Kinematic;
^
src\RobotController.cpp:47:1: warning:   when initialized here [-Wreorder]

RobotController::RobotController(VarSpeedServo *servos[],
^
In file included from src\RobotController.cpp:2:0:
src\RobotController.h:118:16: warning: 'RobotController::_Kinematic' will be initialized after [-Wreorder]
Kinematic &_Kinematic;
^
src\RobotController.h:95:32: warning:   'float RobotController::logicalAngleLimits [6][2]' [-Wreorder]
float logicalAngleLimits[6][2];
^
src\RobotController.cpp:47:1: warning:   when initialized here [-Wreorder]
RobotController::RobotController(VarSpeedServo *servos[],
^
src\RobotController.cpp: In member function 'void RobotController::process()':
src\RobotController.cpp:384:49: warning: invalid conversion from 'unsigned int' to 'const char*' [-fpermissive]
logger.info(currentInterpolationStep);
^
In file included from src\RobotController.cpp:3:0:
src\Logger.h:30:10: note:   initializing argument 1 of 'void Logger::info(const char*, bool)'
void info(const char *text,
^
src\RobotController.cpp:385:48: warning: invalid conversion from 'unsigned int' to 'const char*' [-fpermissive]
logger.info(totalInterpolationSteps);
^
In file included from src\RobotController.cpp:3:0:
src\Logger.h:30:10: note:   initializing argument 1 of 'void Logger::info(const char*, bool)'
void info(const char *text,
^
src\RobotController.cpp:480:16: warning: enumeration value 'CIRCULAR' not handled in switch [-Wswitch]
switch (this->movementMethod) {
^
src\RobotController.cpp:596:27: error: no matching function for call to 'Logger::info(float&)'
logger.info(dx);
^
In file included from src\RobotController.cpp:3:0:
src\Logger.h:27:10: note: candidate: void Logger::info(String, bool)
void info(String text,
^
src\Logger.h:27:10: note:   no known conversion for argument 1 from 'float' to 'String'
src\Logger.h:30:10: note: candidate: void Logger::info(const char*, bool)
void info(const char *text,
^
src\Logger.h:30:10: note:   no known conversion for argument 1 from 'float' to 'const char*'

src\RobotController.cpp:597:27: error: no matching function for call to 'Logger::info(float&)'
logger.info(dy);
^
In file included from src\RobotController.cpp:3:0:
src\Logger.h:27:10: note: candidate: void Logger::info(String, bool)
void info(String text,
^
src\Logger.h:27:10: note:   no known conversion for argument 1 from 'float' to 'String'
src\Logger.h:30:10: note: candidate: void Logger::info(const char*, bool)
void info(const char *text,
^
src\Logger.h:30:10: note:   no known conversion for argument 1 from 'float' to 'const char*'
src\RobotController.cpp:598:27: error: no matching function for call to 'Logger::info(float&)'
logger.info(dz);
^
In file included from src\RobotController.cpp:3:0:
src\Logger.h:27:10: note: candidate: void Logger::info(String, bool)
void info(String text,
^
src\Logger.h:27:10: note:   no known conversion for argument 1 from 'float' to 'String'
src\Logger.h:30:10: note: candidate: void Logger::info(const char*, bool)
void info(const char *text,
^
src\Logger.h:30:10: note:   no known conversion for argument 1 from 'float' to 'const char*'
src\RobotController.cpp:599:27: error: no matching function for call to 'Logger::info(float&)'
.
.
.
.
.
.
.
.
.
.
.
.
.
.
src\RobotController.cpp:645:53: error: no matching function for call to 'Logger::info(float&, bool)'
logger.info(tmpTargetPose[4],      false);
^
In file included from src\RobotController.cpp:3:0:

src\Logger.h:27:10: note: candidate: void Logger::info(String, bool)
void info(String text,
^
src\Logger.h:27:10: note:   no known conversion for argument 1 from 'float' to 'String'
src\Logger.h:30:10: note: candidate: void Logger::info(const char*, bool)
void info(const char *text,
^
src\Logger.h:30:10: note:   no known conversion for argument 1 from 'float' to 'const char*'
src\RobotController.cpp:646:53: error: no matching function for call to 'Logger::info(float&, bool)'
logger.info(tmpTargetPose[5],      false);
^
In file included from src\RobotController.cpp:3:0:
src\Logger.h:27:10: note: candidate: void Logger::info(String, bool)
void info(String text,
^
src\Logger.h:27:10: note:   no known conversion for argument 1 from 'float' to 'String'
src\Logger.h:30:10: note: candidate: void Logger::info(const char*, bool)
void info(const char *text,
^
src\Logger.h:30:10: note:   no known conversion for argument 1 from 'float' to 'const char*'
src\RobotController.cpp: In member function 'float RobotController::getCurrentPose(RobotController::POSITION)':
src\RobotController.cpp:161:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
src\RobotController.cpp: In member function 'float RobotController::getTargetPose(RobotController::POSITION)':
src\RobotController.cpp:274:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
*** [.pioenvs\megaatmega2560\src\RobotController.cpp.o] Error 1
Luppie83 commented 5 years ago

I have a similar error tring to compile this program for the arduino mega 2560. Its made for the teensy but i hope its possible to modify it for the mega2560.

anybody have a clue if its doable ? What should be modified or what direction to look to get it compiling?

i already tried manually insert the servo.h and other missing libraries but it only makes it worse?

`Processing megaatmega2560 (platform: atmelavr; board: megaatmega2560; framework: arduino)

Verbose mode can be enabled via -v, --verbose option CONFIGURATION: https://docs.platformio.org/page/boards/atmelavr/megaatmega2560.html PLATFORM: Atmel AVR > Arduino Mega or Mega 2560 ATmega2560 (Mega 2560) HARDWARE: ATMEGA2560 16MHz 8KB RAM (248KB Flash) Library Dependency Finder -> http://bit.ly/configure-pio-ldf LDF MODES: FINDER(chain) COMPATIBILITY(soft) Collected 92 compatible libraries Scanning dependencies... Dependency Graph |-- 1.3.6 | |-- | |-- 1.0 |-- 1.2.9 | |-- | |-- 1.3.6 | | |-- | | |-- 1.0 | |-- 1.0 |-- |-- |-- |-- 1.0 Compiling .pioenvs\megaatmega2560\src\EEPromStorage.cpp.o Compiling .pioenvs\megaatmega2560\src\IOLogic.cpp.o Compiling .pioenvs\megaatmega2560\src\Kinematic.cpp.o Compiling .pioenvs\megaatmega2560\src\Logger.cpp.o Compiling .pioenvs\megaatmega2560\src\MRCPParser.cpp.o Compiling .pioenvs\megaatmega2560\src\MRILParser.cpp.o Compiling .pioenvs\megaatmega2560\src\RingBuffer.cpp.o Compiling .pioenvs\megaatmega2560\src\RobotController.cpp.o Compiling .pioenvs\megaatmega2560\src\VarSpeedServo.cpp.o Compiling .pioenvs\megaatmega2560\src\main.cpp.o Compiling .pioenvs\megaatmega2560\src\main_test.cpp.o Compiling .pioenvs\megaatmega2560\lib606\GRBL-Arduino-Library-master\coolant_control.cpp.o In file included from src\RobotController.h:21:0, from src\MRILParser.h:6, from src\MRILParser.cpp:1: src\VarSpeedServo.h:9:19: fatal error: Servo.h: No such file or directory


compilation terminated. In file included from src\RobotController.h:21:0, from src\MRILParser.h:6, from src\MRCPParser.h:6, from src\MRCPParser.cpp:1: src\VarSpeedServo.h:9:19: fatal error: Servo.h: No such file or directory


compilation terminated. src\EEPromStorage.cpp: In member function 'void EEPromStorage::appendMessage(char, char)': src\EEPromStorage.cpp:14:12: error: 'EEPROM' was not declared in this scope while (EEPROM.read(pointer) != 0) { ^ src\EEPromStorage.cpp:23:5: error: 'EEPROM' was not declared in this scope EEPROM.write(pointer, length); ^ src\EEPromStorage.cpp:27:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (size_t i = 0; i < length; i++) { ^ src\EEPromStorage.cpp:34:19: warning: array subscript has type 'char' [-Wchar-subscripts] message[length] = 0; ^ src\EEPromStorage.cpp: In member function 'char EEPromStorage::getMessage(unsigned int, char)': src\EEPromStorage.cpp:42:13: error: 'EEPROM' was not declared in this scope if (EEPROM.read(pointer) == 0) { // last message ^ src\EEPromStorage.cpp:45:20: error: 'EEPROM' was not declared in this scope pointer += EEPROM.read(pointer) + 1; ^ src\EEPromStorage.cpp:48:26: error: 'EEPROM' was not declared in this scope char messageLength = EEPROM.read(pointer); ^ src\EEPromStorage.cpp:54:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (size_t i = 0; i < messageLength; i++) { ^ src\EEPromStorage.cpp: In member function 'char EEPromStorage::getByte(int)': src\EEPromStorage.cpp:66:12: error: 'EEPROM' was not declared in this scope return EEPROM.read(address); ^ src\EEPromStorage.cpp: In member function 'int EEPromStorage::getNumberOfMessages()': src\EEPromStorage.cpp:73:12: error: 'EEPROM' was not declared in this scope while (EEPROM.read(pointer) != 0) { ^ src\EEPromStorage.cpp: In member function 'void EEPromStorage::clear()': src\EEPromStorage.cpp:93:5: error: 'EEPROM' was not declared in this scope EEPROM.write(0, 0); ^ src\IOLogic.cpp: In member function 'void IOLogic::addCondition(unsigned int, unsigned int)': src\IOLogic.cpp:17:22: error: 'INPUT_PULLDOWN' was not declared in this scope pinMode(pin, INPUT_PULLDOWN); ^ src\IOLogic.cpp: In member function 'void IOLogic::setOutput(unsigned int, unsigned int)': src\IOLogic.cpp:32:20: warning: invalid conversion from 'unsigned int' to 'const char' [-fpermissive] logger.info(pin); ^ In file included from src\IOLogic.cpp:4:0: src\Logger.h:30:10: note: initializing argument 1 of 'void Logger::info(const char, bool)' void info(const char text, ^ src\IOLogic.cpp:34:22: warning: invalid conversion from 'unsigned int' to 'const char' [-fpermissive] logger.info(state); ^ In file included from src\IOLogic.cpp:4:0: src\Logger.h:30:10: note: initializing argument 1 of 'void Logger::info(const char, bool)' void info(const char text, ^ [.pioenvs\megaatmega2560\src\IOLogic.cpp.o] Error 1 [.pioenvs\megaatmega2560\src\EEPromStorage.cpp.o] Error 1 *** [.pioenvs\megaatmega2560\src\MRILParser.cpp.o] Error 1 In file included from src\RobotController.h:21:0, from src\RobotController.cpp:2: src\VarSpeedServo.h:9:19: fatal error: Servo.h: No such file or directory


compilation terminated. [.pioenvs\megaatmega2560\src\RobotController.cpp.o] Error 1 [.pioenvs\megaatmega2560\src\MRCPParser.cpp.o] Error 1 In file included from src\VarSpeedServo.cpp:1:0: src\VarSpeedServo.h:9:19: fatal error: Servo.h: No such file or directory


compilation terminated. *** [.pioenvs\megaatmega2560\src\VarSpeedServo.cpp.o] Error 1 In file included from src\main.cpp:12:0: src\VarSpeedServo.h:9:19: fatal error: Servo.h: No such file or directory


compilation terminated. *** [.pioenvs\megaatmega2560\src\main.cpp.o] Error 1 =============================================================================================== [ERROR] Took 7.85 seconds ===============================================================================================

======================================================================================================= [SUMMARY] ======================================================================================================= Environment megaatmega2560 [ERROR] Environment teensy31 [SKIP] Environment teensy35 [SKIP]`