Fix and refactor crossbuild target config

Fix some minor issues and more generic with example/targets/<board>.rb.