Creating a board template

All design tool related questions: compiler, assembler, linker. Embedded programming questions: assembler, C code.

Moderator: nferre

Andy Peters
Posts: 46
Joined: Mon Jul 08, 2013 11:09 pm

Creating a board template

Tue Jul 15, 2014 1:18 am

At http://asf.atmel.com/docs/3.18.0/get_started.html we are told that "once you get the hang of it you may want to start from scratch by loading a board template (or even make one yourself) and add ASF code in that together with your own code."

So how does one make a board template?
_ref_hannu
Posts: 8
Joined: Sun Apr 06, 2014 3:35 pm

Re: Creating a board template

Tue Jul 15, 2014 2:13 pm

New Project -> C/C++ -> GCC C ASF Board Project

Board Selection window opens.
  • Tick Select By Board
  • Search for "User Board Template"
You now have a list of board templates with every chip supported by ASF.

After selecting the right template and clicking OK, Atmel Studio creates a project for you.
A folder has been created for "user_board" with initial board initialization function and board definition header.

ASF/common/boards/board.h now has

Code: Select all

#elif BOARD == USER_BOARD
  // User-reserved area: #include the header file of your board here (if any).
#  include "user_board.h"
added. Modify that if you wish to relocate your board header. board_init() is declared as an external function, so you can define it anywhere you like.

Next you can look for pointers on what to do by e.g. opening a ready board project and checking out what's defined in [board_name].h and [board_name]/[board_init].

I hope that answers your question. Of course you don't need to use the wizard, but it's a good starting point.
jharley
Posts: 238
Joined: Thu Dec 06, 2012 6:40 am

Re: Creating a board template

Tue Jul 15, 2014 7:44 pm

To allow reuse you can create project or item templates
http://www.atmel.com/webdoc/atmelstudio ... plate.html

If you want to create examples/templates that will show up under "New Example Project from ASF or Extensions"
https://gallery.atmel.com/docs/XDK_User_guide.pdf See the section under Embedded SDK.
Andy Peters
Posts: 46
Joined: Mon Jul 08, 2013 11:09 pm

Re: Creating a board template

Wed Jul 16, 2014 12:06 am

_ref_hannu wrote:New Project -> C/C++ -> GCC C ASF Board Project

Board Selection window opens.
  • Tick Select By Board
  • Search for "User Board Template"
You now have a list of board templates with every chip supported by ASF.

After selecting the right template and clicking OK, Atmel Studio creates a project for you.
A folder has been created for "user_board" with initial board initialization function and board definition header.

ASF/common/boards/board.h now has

Code: Select all

#elif BOARD == USER_BOARD
  // User-reserved area: #include the header file of your board here (if any).
#  include "user_board.h"
added. Modify that if you wish to relocate your board header. board_init() is declared as an external function, so you can define it anywhere you like.

Next you can look for pointers on what to do by e.g. opening a ready board project and checking out what's defined in [board_name].h and [board_name]/[board_init].

I hope that answers your question. Of course you don't need to use the wizard, but it's a good starting point.
Hi, thanks. I did all of that, and had to compare what the user_board project looked like with the simple SAM3UEK starter project. Once I resolved the inconsistencies and figured out what was going on, I got a simple "Hello, world!" to work. Part of the problem is that there are a lot of blanks to fill so having the examples as a reference is very helpful.

There's a lot to ASF. It's very comprehensive, which of course just makes getting started somewhat difficult.

Return to “Development Tools”

Who is online

Users browsing this forum: No registered users and 1 guest