https://elinux.org/index.php?title=How_To_Write_a_Board_Configuration_Script&feed=atom&action=historyHow To Write a Board Configuration Script - Revision history2024-03-19T04:39:47ZRevision history for this page on the wikiMediaWiki 1.31.0https://elinux.org/index.php?title=How_To_Write_a_Board_Configuration_Script&diff=128462&oldid=prevWmat: more board config content2012-05-11T13:48:54Z<p>more board config content</p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">Revision as of 13:48, 11 May 2012</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l44" >Line 44:</td>
<td colspan="2" class="diff-lineno">Line 44:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>#One or more source [target/...cfg] statements.</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>#One or more source [target/...cfg] statements.</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>Given that the OMAP4430 CPU is not currently supported (for demonstration purposes) we can conclude that a source statement will be required in our new [[Board Config]] file.  This is a great time to start writing the config file.  In your editor of choice, open a new file called pandaboard.cfg and seed it with a few comments and the line to source the new [[Target Config]] file that you'll create later:</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline">#:</ins>Given that the OMAP4430 CPU is not currently supported (for demonstration purposes) we can conclude that a source statement will be required in our new [[Board Config]] file.  This is a great time to start writing the config file.  In your editor of choice, open a new file called pandaboard.cfg and seed it with a few comments and the line to source the new [[Target Config]] file that you'll create later:<ins class="diffchange diffchange-inline"><br/></ins></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> </div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline">#:</ins></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>[[File:1_pandaboardcfg.png]]</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline">#:  </ins>[[File:1_pandaboardcfg.png<ins class="diffchange diffchange-inline">|thumb|center]]</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline">#:</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline">#NOR flash configuration (see [NOR Configuration], page 65).</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline">#:The referenced section of the User Guide is for ''Chapter 12 Flash Commands''.  This would apply when NOR Flash is found on the board.  A very simple way to determine whether NOR Flash exists on a board, external of the CPU, FPGA, or CPLD is to review the board's block diagram.  For the PandaBoard, the block diagram looks like this:</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline">#:</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline">#:  [[File:PandaBoard_block_diagram.png|thumb|center]]</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline">#:</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline">#:Perusing the image, we can see that there is no NOR Flash referenced at all.  NOR Flash does not apply to this board.  This method of peripheral determination may not work in all cases.  Block Diagrams may not be available or be undecipherable.  When this is the case, leave NOR Flash statements out of the [[Board Config</ins>]]<ins class="diffchange diffchange-inline">.</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline">#:</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline">#NAND flash configuration (see [NAND Configuration], page 79).</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline">#:The referenced section of the User Guide is for ''Chapter 13 NAND Flash Commands''.  This would apply when NAND Flash is found on the board.  Repeating the method used to locate NOR Flash, the PandaBoard proves to not have NAND Flash either.</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline">#:</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline">#Target reset handlers for SDRAM and I/O configuration.</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline">#:</ins></div></td></tr>
<!-- diff cache key elinux:diff::1.12:old-128042:rev-128462 -->
</table>Wmathttps://elinux.org/index.php?title=How_To_Write_a_Board_Configuration_Script&diff=128042&oldid=prevWmat: seeding the board config howto2012-05-09T19:46:09Z<p>seeding the board config howto</p>
<p><b>New page</b></p><div>== Overview ==<br />
<br />
The following instructions describe how to create a very simple new [[Board Config]] and [[Target Config]] file for [[OpenOCD]]. It is a ''best case scenario'' in that documentation is readily available for the unsupported board the CPU on the board.<br />
<br />
The following assumptions are made:<br />
#Debugging hardware is supported by [[OpenOCD]] as described by an [[Interface Config]]. For the example below, a [[Flyswatter2]] JTAG debugger is used, described by [[flyswatter2.cfg]].<br />
#OpenOCD is built and configured on Linux as described here: [[Compiling_OpenOCD_v06_Linux]].<br />
#The steps to run OpenOCD on Linux have been followed as described here: [[Running_OpenOCD_on_Linux]].<br />
#The [[PandaBoard]], [[Flyswatter2]] are both connected to your host system as described here: [[Flyswatter2_Pandaboard_How_To]].<br />
<br />
== Step One: Information Gathering ==<br />
<br />
Reading the [http://openocd.sourceforge.net/documentation/online-docs/ OpenOCD User Guide] Section 6.2 describes a [[Board Config]] as follows:<br />
<pre><br />
The point of a board config file is to package everything about a given board that user config files need to know.<br />
<br />
In summary the board files should contain (if present)<br />
<br />
1. One or more source [target/...cfg] statements<br />
2. NOR flash configuration (see [NOR Configuration], page 65)<br />
3. NAND flash configuration (see [NAND Configuration], page 79)<br />
4. Target reset handlers for SDRAM and I/O configuration<br />
5. JTAG adapter reset configuration (see Chapter 9 [Reset Configuration], page 45)<br />
6. All things that are not “inside a chip”. <br />
<br />
Generic things inside target chips belong in target config files, not board config files. So<br />
for example a reset-init event handler should know board-specific oscillator and PLL<br />
parameters, which it passes to target-specific utility code.<br />
<br />
The most complex task of a board config file is creating such a reset-init event handler.<br />
Define those handlers last, after you verify the rest of the board configuration works.</pre><br />
<br />
Sources of information you may require moving forward:<br />
* Board Specification. This documentation is typically provided by the manufacturer of your hardware. For example, Texas Instruments provides the [[PandaBoard]] specification here: [http://omappedia.org/wiki/PandaBoard PandaBoard Platform Information].<br />
* CPU, FPGA, or CPLD Specification. This documentation is typically provided by the manufacturer of the CPU, FPGA, or CPLD silicon on the board. For example, the <br />
<br />
Always verify that you have the specifications applicable to the hardware versions you are working with. For example, this ''howto'' uses:<br />
*PandaBoard version A1<br />
*OMAP4430 ES2.1 silicon<br />
<br />
== Step Two: Board Config Requirements ==<br />
<br />
Given the [[OpenOCD]] documentation referenced above, step through each item listed and determine whether it is required in the [[Board Config]] file or can be deferred to the [[Target Config]] file.<br />
<br />
#One or more source [target/...cfg] statements.<br />
Given that the OMAP4430 CPU is not currently supported (for demonstration purposes) we can conclude that a source statement will be required in our new [[Board Config]] file. This is a great time to start writing the config file. In your editor of choice, open a new file called pandaboard.cfg and seed it with a few comments and the line to source the new [[Target Config]] file that you'll create later:<br />
<br />
[[File:1_pandaboardcfg.png]]</div>Wmat