Unfortunately at 174 error and 11 warnings, my patience wears thin.
Probably some tool path issues but I'm getting a lot of errors like this:
Description Resource Path Location Type
../Hardware/SD\ff.h: No such file or directory presetManager.c /AVR/Preset line 9 C/C++ Problem
but I don't really understand how that file can be referenced as it doesn't exist (in exactly that path/format) in the git root. There is a file in ./mainboard/firmware/DrumSynt_FPU/src/hardware/SD_FAT named ff.h though
I suspect it has to do with case sensitivity in filenames. On windows there is no case sensitivity. Try changing the include line in the code to have a lower case h. etc.
It seems like it's not finding the avr gcc includes or something. Run the following command from the command line:
avr-gcc -E -x c++ - -v </dev/null
And then look for the output that says COMPILER_PATH. This is the path it's looking on for avr headers. Make sure you have those headers somewhere on that path.
Nothing I do seems to fix anything. I've tried adding paths (everywhere in the project settings - just to see if something will catch). As far as I can tell the avr headers are installed (as part of Crosspak) but I've exhausted my knowledge.
Is there something I need to add to the Project in Eclipse to make it look in the right place for the AVR stuff?
the avr gcc command itself should know wher to find its headers. run the command I suggested and see whether anything weird with the paths it dumps. you shouldn't need to add these to eclipse
Ok, well that looks about the same as mine, relatively speaking. I assume you checked those three paths at the end to make sure they have valid looking header files... In particular, one of the errors you got was missing util/atomic.h (from presetManager.c), that file should be in avr/include/util which on your system should be in this search path:
/usr/local/CrossPack-AVR-20131216/lib/gcc/avr/4.8.1/../../../../avr/include So you should see a file /usr/local/CrossPack-AVR-20131216/lib/gcc/avr/4.8.1/../../../../avr/include/util/atomic.h (all lowercase).
Also, can you paste your console output when trying to compile one of the files... eg. here is mine when I build presetMamager.c: Info: Internal Builder is used for build avr-gcc -DF_CPU=20000000UL -D__PROG_TYPES_COMPAT__ -Os -Wall -Wextra -Wconversion -c -funsigned-char -funsigned-bitfields -ffast-math -freciprocal-math -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -Wall -mmcu=atmega644 -std=gnu99 -MD -MP -o "Preset\\presetManager.o" "..\\Preset\\presetManager.c" ..\Preset\presetManager.c: In function 'preset_sendMainStepDataToSeq': ..\Preset\presetManager.c:365:44: warning: unused parameter 'stepNr' [-Wunused-parameter] ..\Preset\presetManager.c: In function 'preset_sendStepDataToSeq': ..\Preset\presetManager.c:373:40: warning: unused parameter 'stepNr' [-Wunused-parameter]
OK, it seems that somehow my avr lib install is messed up. Even though avr-gcc paths are set to '/usr/local/CrossPack-AVR-20131216/lib/gcc/avr/4.8.1/' etc. There is not a full library there. However, I did find a full avr lib/include folder in the root of my drive.
Problem is, I'm not sure how to reconfigure avr-gcc to perhaps include that path too. Or maybe I should try to copy the library files (until/atomic.h etc.) into the folder where avr-gcc is looking?
It's better to reinstall or get it installed properly. avr-gcc is hardwired to look in paths relative to where it's launched from. So if you have a lib/avr in your root, maybe move that whole tree to where it belongs, or clean it out and try to get a good install layed down.
Did a reinstall of the libs. If I try to build the presetManager.c from the command line as you suggested I get exactly the same output as you do.
But in Eclipse, all the errors/warning seem to stem from presetManager. To me that would seem that something isn't setup right in Eclipse. Then I noticed in the Eclipse console output that the build command was trying to use gcc to build the AVR project. I managed to figure out how to change this to avr-gcc and now something has changed (finally!) though it still fails. See below
**** Build of configuration Release for project AVR ****
Ok, so I think all you need to do is create a script that sets your paths and launches eclipse. You will need 3 paths: avr path, arm path, make path. My script looks like this (windows), so you'll need to probably change it to use export and $PATH. Refer to some other mac scripts...:
@echo off set PATH=C:\AVRToolchain\bin;C:\gcc-arm\bin;C:\Program Files (x86)\GnuWin32\bin;%PATH% C:\eclipse\eclipse.exe
OK, bit more progress. Now I've figured out how to set Eclipse to properly use avr-gcc (there was an inconspicuous checkbox labelled 'show compatible toolchains only' which on un-checking revealed options to select the avr toolchain)
So the AVR part seems to build OK now but I get an error on the drum_synth part:
**** Build of configuration Release for project DrumSynth_FPU ****
make all
make: *** No rule to make target `DrumSynth_FPU.elf', needed by `all'. Stop.
**** Build Finished ****
I did a Clean and Build All but still get the error.
Make sure you have a Release directory under DrumSynth_FPU, then right click the project do clean project (might get errors), then right click the project and do build project. You might also need to rebuild indexes (although not sure) If you haven't built before, eclipse will get in this state where it doesn't want to generate makefiles. I'm not sure what exactly forces it to generate them, but once it's generated them once you won't see the error again.
Also make sure your arm toolchain is correct. Mine is Arm Windows GCC (Tools For Embedded) and yours might be different.
Hello guys! thanks a lot for your discussion here as I think for my MAC OS I went a step forward in the compilation process under eclipse, I donot have errors but inly a message:
**** Build of configuration Release for project DrumSynth_FPU ****
Comments
avr-gcc -E -x c++ - -v </dev/null
And then look for the output that says COMPILER_PATH.
This is the path it's looking on for avr headers. Make sure you have those headers somewhere on that path.
In particular, one of the errors you got was missing util/atomic.h (from presetManager.c), that file should be in avr/include/util which on your system should be in this search path:
/usr/local/CrossPack-AVR-20131216/lib/gcc/avr/4.8.1/../../../../avr/include
So you should see a file
/usr/local/CrossPack-AVR-20131216/lib/gcc/avr/4.8.1/../../../../avr/include/util/atomic.h (all lowercase).
Also, can you paste your console output when trying to compile one of the files... eg. here is mine when I build presetMamager.c:
Info: Internal Builder is used for build
avr-gcc -DF_CPU=20000000UL -D__PROG_TYPES_COMPAT__ -Os -Wall -Wextra -Wconversion -c -funsigned-char -funsigned-bitfields -ffast-math -freciprocal-math -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -Wall -mmcu=atmega644 -std=gnu99 -MD -MP -o "Preset\\presetManager.o" "..\\Preset\\presetManager.c"
..\Preset\presetManager.c: In function 'preset_sendMainStepDataToSeq':
..\Preset\presetManager.c:365:44: warning: unused parameter 'stepNr' [-Wunused-parameter]
..\Preset\presetManager.c: In function 'preset_sendStepDataToSeq':
..\Preset\presetManager.c:373:40: warning: unused parameter 'stepNr' [-Wunused-parameter]
@echo off
set PATH=C:\AVRToolchain\bin;C:\gcc-arm\bin;C:\Program Files (x86)\GnuWin32\bin;%PATH%
C:\eclipse\eclipse.exe
If you haven't built before, eclipse will get in this state where it doesn't want to generate makefiles. I'm not sure what exactly forces it to generate them, but once it's generated them once you won't see the error again.
Also make sure your arm toolchain is correct. Mine is Arm Windows GCC (Tools For Embedded) and yours might be different.
thanks a lot for your discussion here as I think for my MAC OS I went a step forward in the compilation process under eclipse, I donot have errors but inly a message:
**** Build of configuration Release for project DrumSynth_FPU ****
Nothing to build for project DrumSynth_FPU
I will open a special thread for this matter :-)
can you help ?
cheers