peplin / arduino.mk

DEPRECATED FORK: Arduino Makefile with chipKIT support
http://christopherpeplin.com/2011/12/chipkit-arduino-makefile/
GNU Lesser General Public License v2.1
11 stars 4 forks source link

Error Board_Defs.h: No such file or directory #3

Closed rei-vilo closed 12 years ago

rei-vilo commented 12 years ago

For a chipKIT board, make looks for Board_Defs.h and raises an error

/Applications/Mpide.app/Contents/Resources/Java/hardware/pic32/compiler/pic32-tools/bin/pic32-g++ -c -mprocessor=32MX795F512L -DF_CPU=80000000L -I. -I/Applications/Mpide.app/Contents/Resources/Java/hardware/pic32/cores/pic32 -g -Os -w -Wall -ffunction-sections -fdata-sections -O2 -mno-smart-io -DARDUINO=22 -D_BOARDMEGA= -fno-exceptions build-cli/Blink.cpp -o build-cli/Blink.o

In file included from /Applications/Mpide.app/Contents/Resources/Java/hardware/pic32/cores/pic32/WProgram.h: 9:0, from build-cli/Blink.cpp: 1: /Applications/Mpide.app/Contents/Resources/Java/hardware/pic32/cores/pic32/pins_arduino.h: 128:24: fatal error: Board_Defs.h: No such file or directory compilation terminated. make: *\ [build-cli/Blink.o] Error 1

Do you experience this error?

Board_Defs.h is in /Applications/Mpide.app/Contents/Resources/Java/hardware/pic32/variants/Max32/Board_Defs.h

Folder Max32 is specified in /Applications/Mpide.app/Contents/Resources/Java//hardware/pic32/boards.txt

mega_pic32.build.variant=Max32

I added to chipKIT.mk

BOARD_DEFS   = $(ARDUINO_DIR)/hardware/pic32/variants/$(VARIANT)/Board_Defs.h

I added to Arduino.mk

ifndef VARIANT
VARIANT = $(call PARSE_BOARD,$(BOARD_TAG),build.variant)
endif

But I don't know where to take the BOARD_DEFS parameter into account.

Thank you and best regards.

peplin commented 12 years ago

Thanks, the Board_Defs.h file was introduced in MPIDE 0023 and I've still been using 0022. It should be fixed now, I just updated and tested. I just had to add the variants path that you found to the include path given to avr-g++.