-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathCompileHelp.txt
104 lines (81 loc) · 5.17 KB
/
CompileHelp.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
Technical Help and FAQ
If this doesnt help then you can email me (robert@42.co.nz) but I will need a full description to help you:
OS type
Eclipse/AVR/egit versions, and the eclipse install dir.
A full description of what you did, and the console output from the build.
This project uses Jans' marvelous Arduino plugin for eclipse at http://www.baeyens.it/eclipse/
Downlaod and install the arduinoEclipse package from there
Building then works very easily, but you may have to check for any local paths (eg /home/robert/gitrep.., when you need C:/dev/..)
Windows users: DONT use directories with spaces for eclipse or the project. Needless pain and suffering will surely result.
You will need to install the Arduino IDE (v1.5.7+) somewhere and point your eclipse setup at it. Using a lower version will not compile.
Below here is notes for the old build method, left in case they are useful
+++++++
Build errors I have known...
+++++++
Major failures when compiling after first importing from git
When you press the hammer in the toolbar it should build - not complain its not an AVR project
Check you have an AVR project nature -If you right click the project>Convert To> AVR Eclipse
**Make sure you use the right AVR plugin:
- the AVR (http://www.baeyens.it/eclipse/). The 'other' avr plugin (http://avr-eclipse.sourceforge.net) will give all sorts of problems as the project expects the baeyens version.
+++++++
Cant upload a binary? - check you have the correct build configuration active
you have the right board the in ARDUINOBOARDNAME = Arduino_Mega_ATmega1280
Its in Properties>C/C++ Build>Environment
Check you have the correct settings in Properties/C/C++ Build/Settings, the should have appeared automatically when you imprted the project
Tool Settings tab (eg for 1280 build)
AVR Assembler>Paths>
PreProcessor
"${workspace_loc:/Arduino_Mega_ATmega1280/arduino}"
"${workspace_loc:/Arduino_Mega_ATmega1280}"
Assembler
"${workspace_loc:/Arduino_Mega_ATmega1280}"
"${workspace_loc:/Arduino_Mega_ATmega1280/Release/arduino}"
AVR Compiler
Directories
"${workspace_loc:/Arduino_Mega_ATmega1280/arduino}"
Symbols
__IN_ECLIPSE__=1
ARDUINO=100
AVR C++ Compiler
Directories
"${workspace_loc:/Arduino_Mega_ATmega1280/arduino}"
"${workspace_loc:/${ProjName}/libraries/PString}"
"${workspace_loc:/${ProjName}/libraries/AverageList}"
"${workspace_loc:/${ProjName}/libraries/PID_v1}"
"${workspace_loc:/${ProjName}/libraries/FlexiTimer2}"
"${workspace_loc:/${ProjName}/libraries/EEPROM}"
"${workspace_loc:/${ProjName}/libraries/NMEA}"
"${workspace_loc:/${ProjName}/libraries/AltSoftSerial}"
"${workspace_loc:/${ProjName}/libraries}"
Symbols
As above
AVR C++ Linker
Libraries
"Arduino_Mega_ATmega1280"
Library paths
"${workspace_loc:/Arduino_Mega_ATmega1280}/${ConfigName}"
Also In Project References I have ticked
"${workspace_loc:/Arduino_Mega_ATmega1280}/${ConfigName}"
+++++++ PString error
In file included from ../libraries/PString/PString.cpp:20:
../libraries/PString/PString.h:40: error: conflicting return type specified for 'virtual void PString::write(uint8_t)'
C:\Users\Hans\Eclipse\Arduino_Mega\arduino/Print.h:48: error: overriding 'virtual size_t Print::write(uint8_t)'
make: *** [libraries/PString/PString.o] Error 1
You will get that error if you have not set ARDUINO=100 in the compile line.
Right click the project (do both) >Properties>C/C Build>Settings.
Choose tab Tool Settings, Open tree to AVR Compiler>Symbols. There should be one with ARDUINO=100, if not eneter it.
Same for the AVR C Compiler
+++++++
Building target: FreeBoardPLC.elf
Invoking: AVR C++ Linker
avr-g++ –-cref -s -Os -o"FreeBoardPLC.elf" ./libraries/SPI/SPI.o ./libraries/PinCatcher/PinCatcher.o ./libraries/PinCatcher/PinCatcher_impl.o ./libraries/PString/PString.o ./libraries/PID_v1/PID_v1.o ./libraries/NMEA/nmea.o ./libraries/LiquidCrystal/LiquidCrystal.o ./libraries/FlexiTimer2/FlexiTimer2.o ./libraries/Firmata/Firmata.o ./libraries/EEPROM/EEPROM.o ./libraries/Bounce/Bounce.o ./libraries/AltSoftSerial/AltSoftSerial.o ./Alarm.o ./Anchor.o ./Autopilot.o ./FreeBoardModel.o ./FreeBoardPLC.o ./Gps.o ./NmeaSerial.o ./Seatalk.o ./Wind.o ./util.o -lArduino_Mega_ATMega1280 -lFreeBoardPLC -lm -Wl,-Map,FreeBoardPLC.map,--cref -Wl,--gc-sections -L"C:\Users\Hans\Eclipse\FreeBoardPLC" -L"C:\Users\Hans\Eclipse\FreeBoardPLC\libraries" -L"C:\Users\Hans\Eclipse\FreeBoardPLC\Release" -L"C:\Users\Hans\Eclipse\Arduino_Mega_ATmega1280\Release" -mmcu=atmega1280
avr-g++.exe: –-cref: No such file or directory
make: *** [FreeBoardPLC.elf] Error 1
If you're using C++ then the hex file can get really big. In the linker menu, change the command to avr-gcc and the command line pattern to the following: ${COMMAND} --cref -s -Os ${OUTPUT_FLAG}${OUTPUT_PREFIX}${OUTPUT} ${INPUTS} -lm ${FLAGS}
+++++++TODO list++++++++
> - '#define __AVR_LIBC_DEPRECATED_ENABLE__ 1' had to be inserted
> into /usr/share/arduino/hardware/arduino/cores/Arduino.h to avoid
> this kind of warnings :
> '/usr/share/arduino/hardware/arduino/cores/arduino/HardwareSerial.cpp:92:41:
> error: attempt to use poisoned "SIG_USART0_RECV"'
>