timknapen/Arduino-With-XCode — Issue #11: Lighter .xconfig files
Author: rei-vilo
Created: 2012-01-23 15:06:16+00:00
State: open

All the parameters for the boards are in the boards.txt file.

So no need to copy/paste them into the .xconfig files.

* Uno.xconfig is now a single line file:
```boardname = uno```

* Please find the corresponding function to add to the makefile:

```
BOARDS_TXT = /Applications/Mpide.app/Contents/Resources/Java/hardware/arduino/boards.txt

# result = $(call READ_BOARD_TXT, 'boardname.parameter', 'pathfileboards.txt')
nullstring :=
spacestring := $(nullstring) # end of the line
equalstring := $(nullstring)=# end of the line
READ_BOARD_TXT = $(lastword $(subst $(equalstring),$(spacestring),$(shell grep -e$(1) $(2))))

boardname = uno
parameter = build.f_cpu
BF_CPU = $(call READ_BOARD_TXT, $(boardname).$(parameter), $(BOARDS_TXT))
```