Eclipse Windows Compile Problems

edited July 2014 in General
Hello, 

I've been trying to get eclipse to compile the firmware on windows following the wiki instructions - I also found I needed to install g++ via cygwin and add that to the path as it complained about missing g++. 

When I try and compile the AVR front board code I end up with the following errors...

Description Resource Path Location Type
Symbol 'DDRB' could not be resolved main.c /AVR line 54 Semantic Error
Symbol 'DDRB' could not be resolved main.c /AVR line 55 Semantic Error
Symbol 'PB0' could not be resolved main.c /AVR line 55 Semantic Error
Symbol 'PB0' could not be resolved main.c /AVR line 56 Semantic Error
Symbol 'PORTB' could not be resolved main.c /AVR line 56 Semantic Error

And a separate error...

Building target: AVR.elf
Invoking: Cross GCC Linker
avr-gcc -Wl,-Map="DrumSynthFront.map" -Wl,--start-group -Wl,-lm  -Wl,--end-group -Wl,--gc-sections -mmcu=atmega644 -o "AVR.elf"  ./Preset/presetManager.o  ./Menu/Cc2Text.o ./Menu/copyClearTools.o ./Menu/menu.o ./Menu/screensaver.o  ./IO/adcPots.o ./IO/din.o ./IO/dout.o ./IO/uart.o  ./Hardware/SD/SD_routines.o ./Hardware/SD/SPI_routines.o ./Hardware/SD/diskIo.o ./Hardware/SD/ff.o  ./Hardware/lcd.o ./Hardware/timebase.o  ./buttonHandler.o ./encoder.o ./fifo.o ./frontPanelParser.o ./ledHandler.o ./main.o   
cygwin warning:
  MS-DOS style path detected: C:\Development\LXR-master\front\LxrAvr\Release
  Preferred POSIX equivalent is: /cygdrive/c/Development/LXR-master/front/LxrAvr/Release
  CYGWIN environment variable option "nodosfilewarning" turns off this warning.
  Consult the user's guide for more details about POSIX paths:
Finished building target: AVR.elf
 
C:/Program Files (x86)/GnuWin32/bin/make --no-print-directory post-build
cygwin warning:
  MS-DOS style path detected: C:\Development\LXR-master\front\LxrAvr\Release
  Preferred POSIX equivalent is: /cygdrive/c/Development/LXR-master/front/LxrAvr/Release
  CYGWIN environment variable option "nodosfilewarning" turns off this warning.
  Consult the user's guide for more details about POSIX paths:
/usr/bin/sh: -c: line 0: syntax error near unexpected token `('
/usr/bin/sh: -c: line 0: `C:/Program Files (x86)/GnuWin32/bin/make --no-print-directory post-build'
make: *** [AVR.elf] Error 1

Any insight on what might be wrong would be very much appreciated. 

Thanks

Comments

  • Hi Myles, you might want to try building first with the makefiles. This thread is about mac building, but my comment gives the instructions for Windows. I think someone might have put this all in the wiki too, but not sure where right now.

    http://forum.sonic-potions.com/discussion/comment/5349#Comment_5219

    Once you have it building with Makefile, then eclipse will be easier as you'll be able to compare, etc.

  • Thanks, will give it a try later tonight
  • edited August 2014
    you should not have to install cygwin on a windows machine to use eclipse.
    you can use winAVR to get the AVR GCC compilers.
    http://winavr.sourceforge.net/
  • edited August 2014
    Thanks.. tried cygwin quickly the other night but only had one chance to try to make before having to go out. Will head back to it again if this fails.

    Tried a clean install of eclipse and I'm still getting the non defined DDRB, PORTB & PB0 warnings. The atmel avr include path has been added to the project and it can see avr/io.h but don't think it's picking out the processor to include these pin definitions in the project.

    If I remove io.h and include a direct definition <avr/iom644a.h> then DDRB & PORTB warning disappear ...but then it provides warning that I should be using io.h.

    If I comment out the lines completely (ARM reset lines in the AVR main.c) then it compiles fine.

    Again any help to get this last bit sorted would be great, thanks. 


  • edited August 2014
    Digging further if I go into other files using the io pin definitions e.g. dout.c then it's not recognising them either - I'm surprised it managed to compile before hand and the eclipse is picking up all this unresolved symbols. 

    Can I force eclipse to scan the whole project for such issues? I would've though building the project should chuck all of these up. 

    Looking at the avr/io.h file eclipse is not including any of the micro definitions... the mmcu=atmega644 is in the build settings.

    Thanks
  • edited August 2014
    Right... Still not sure what is going on with eclipse and windows - it's windows 8.1 so I'm not sure if things aren't meshing there.

    As it's also a macbook I've done a big flip (I usually use windows for development and OSX for audio) I've got the system compiling first time with terminal :) 

    Thanks for your help Julian and Rudeog - happy I got it working just before my LXR shows up - I look forward to seeing what I can do with the box. 
  • Yeah, the makefile stuff seems a bit less problematic for people.
Sign In or Register to comment.