Changes

Tutorial B2 Viewing Instruction Power Differences

97 bytes removed, 14:49, 28 September 2018
Setting Up the Example
== Setting Up the Example ==
<ol style="list-style-type: decimal;">
<li><p>Like with the previous tutorial, you'll need to have a copy of the firmware you want to modify and be able to build for your platform. The instructions are repeated in the drop down menus below, but if you're comfortable with the previous example, feel free to skip them. Alternatively, if you're not too attached to your code, you can just modify your firmware from [[Tutorial B1 Building a SimpleSerial Project]].</p></li>
<h2p> Building Like with the Basic Example previous tutorial, you'll need to have a copy of the firmware you want to modify and be able to build for your platform. The instructions are repeated in the drop down menus below, but if you're comfortable with the previous example, feel free to skip them. Alternatively, if you're not too attached to your code, you can just modify your firmware from [[Tutorial B1 Building a SimpleSerial Project]].</h2p>
{{CollapsibleSection
|intro = === Building for CWLite with XMEGA Target ===
|intro = === Building for Other Targets ===
|content= Building for Other Targets}}
<h2> Modifying the Basic Example </h2>
<h2> Modifying the Basic Example </h2>
<ol style="list-style-type: decimal;">
<li><p>At this point we want to modify the system to perform a number of operations. We won't actually use the input data. To do so, open the file <code>simpleserial-base.c</code> with a text editor such as Programmer's Notepad (which ships with WinAVR).</p></li>
<li><p>Find the following code block towards the end of the file, which may look different if you just completed [[Tutorial_B1_Building_a_SimpleSerial_Project]].</p>
/* End user-specific code here. *
********************************/</source></li>
<li><p></p></li><li><p>Change the terminal to the directory with your source, and run the same <code>make</code> command you did in earlier to build the system. Remember you can press the up arrow on the keyboard to get recently typed commands in most OSes:</p><pre>make PLATFORM=CW303</pre>
<li>Following the instructions given in [[Tutorial_B1_Building_a_SimpleSerial_Project]], program the AVR, XMEGA, or STM32 (ARM) with your new code. Note you __do not__ need to close the programming window. If you will be doing frequent modifications to the source code, this can simplify your life since you only need to hit the '''Program''' button in AVRStudio to download new code.</li>
<li>Ensure the hardware is setup as in [[Tutorial_B1_Building_a_SimpleSerial_Project]]. If using the CW1002, ensure the SMA cable is also connected as described in the previous tutorial.</li></ol>
Approved_users, administrator
366
edits