peplin/arduino.mk — Issue #5: Specific parameter hard-coded in chipKIT.mk
Author: rei-vilo
Created: 2012-01-25 22:31:23+00:00
State: open

In chipKIT.mk, ```_BOARD_MEGA_``` is hard-coded

```
EXTRA_CPPFLAGS = -O2 -mno-smart-io -DARDUINO=22 -D_BOARD_MEGA_= \
-I$(ARDUINO_DIR)/hardware/pic32/variants/$(VARIANT)
```

while /Applications/Mpide.app/Contents/Resources/Java/hardware/pic32/boards.txt specifies

```
uno_pic32.board=_BOARD_UNO_
mega_pic32.board=_BOARD_MEGA_
```

So
* PARSE_BOARD should be defined in main makefile
* code should be altered as follow

```
BOARD = $(call PARSE_BOARD,$(BOARD_TAG),board)
EXTRA_CPPFLAGS = -O2 -mno-smart-io -DARDUINO=22 -D$(BOARD)= \
-I$(ARDUINO_DIR)/hardware/pic32/variants/$(VARIANT)

```