<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://www.ethernut.de/nutwiki/index.php?action=history&amp;feed=atom&amp;title=Elektor_Internet_Radio_1.0</id>
		<title>Elektor Internet Radio 1.0 - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://www.ethernut.de/nutwiki/index.php?action=history&amp;feed=atom&amp;title=Elektor_Internet_Radio_1.0"/>
		<link rel="alternate" type="text/html" href="http://www.ethernut.de/nutwiki/index.php?title=Elektor_Internet_Radio_1.0&amp;action=history"/>
		<updated>2026-04-18T21:14:40Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.26.2</generator>

	<entry>
		<id>http://www.ethernut.de/nutwiki/index.php?title=Elektor_Internet_Radio_1.0&amp;diff=80&amp;oldid=prev</id>
		<title>Harald: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="http://www.ethernut.de/nutwiki/index.php?title=Elektor_Internet_Radio_1.0&amp;diff=80&amp;oldid=prev"/>
				<updated>2016-10-27T16:02:54Z</updated>
		
		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='1' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='1' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 16:02, 27 October 2016&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan='2' style='text-align: center;' lang='en'&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Harald</name></author>	</entry>

	<entry>
		<id>http://www.ethernut.de/nutwiki/index.php?title=Elektor_Internet_Radio_1.0&amp;diff=79&amp;oldid=prev</id>
		<title>Daniel: /* Makefile */</title>
		<link rel="alternate" type="text/html" href="http://www.ethernut.de/nutwiki/index.php?title=Elektor_Internet_Radio_1.0&amp;diff=79&amp;oldid=prev"/>
				<updated>2009-03-12T16:39:26Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Makefile&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Image:eir10c-overview.png|upright|400px|thumb|Elektor Internet Radio 1.0 C]]&lt;br /&gt;
&lt;br /&gt;
== Test Environments ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;smalldiv&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#F6F9ED&amp;quot; | Board&lt;br /&gt;
| style=&amp;quot;background-color:#F6F9ED&amp;quot; | Nut/OS&lt;br /&gt;
| style=&amp;quot;background-color:#F6F9ED&amp;quot; | YAGARTO&lt;br /&gt;
| style=&amp;quot;background-color:#F6F9ED&amp;quot; | Tera Term&lt;br /&gt;
|-&lt;br /&gt;
| EIR 1.0 C&lt;br /&gt;
| 2.6.4&lt;br /&gt;
| 20080928&lt;br /&gt;
| 4.61&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
On this page you will learn how to setup an '''E'''lektor '''I'''nternet '''R'''adio development and testing environment.&lt;br /&gt;
&lt;br /&gt;
Your EIR comes with the webradio software installed and ready-to-use. So if you just want to use it as a radio you're done. Please consult the documents on the EIR CD for further assistance e.g. on how to use the web interface.&lt;br /&gt;
&lt;br /&gt;
This guide concentrates on how to upload applications to Your EIR and consists of two sections . &lt;br /&gt;
&lt;br /&gt;
*In the first section You will learn the '''easiest way''' on how to use the examples from nutwiki and your own applications.&lt;br /&gt;
*The [[#Repitutorium: Restoring the webradio firmware|second section]] is a step-by-step style tutorial that uses the workflow from section one and explaines You how to '''restore the webradio firmware''' in case you have deleted or overwritten it.&lt;br /&gt;
&lt;br /&gt;
This Guide is not supposed to be a complete manual but as a Quick Start Guide, teaching one of the many methods to get an application running on your Ethernut board.&lt;br /&gt;
&lt;br /&gt;
Immediatly after working through this document, you have the competence to test the examples featured by nutwiki.&lt;br /&gt;
&lt;br /&gt;
Screencasts:&lt;br /&gt;
&lt;br /&gt;
# [[Image:flashvideo.png|16px]] [http://ethernut.de/arc/screencasts/EIR10CONFIGURATOR.htm Screencast Part 1] The Nut/OS Configurator&lt;br /&gt;
# [[Image:flashvideo.png|16px]] [http://ethernut.de/arc/screencasts/EIR10PREP.htm Screencast Part 2] Preparations&lt;br /&gt;
# [[Image:flashvideo.png|16px]] [http://ethernut.de/arc/screencasts/EIR10COMPILE.htm Screencast Part 3] Compiling the source code&lt;br /&gt;
# [[Image:flashvideo.png|16px]] [http://ethernut.de/arc/screencasts/EIR10SAMBA.htm Screencast Part 4] Using SAM-BA / Uploading&lt;br /&gt;
# [[Image:flashvideo.png|16px]] [http://ethernut.de/arc/screencasts/TERATERM.htm Screencast Part 5] Serial Communications / TeraTerm&lt;br /&gt;
&lt;br /&gt;
== Required Tools ==&lt;br /&gt;
&lt;br /&gt;
=== Nut/OS ===&lt;br /&gt;
Of course you need the latest version of Nut/OS.&lt;br /&gt;
&lt;br /&gt;
Visit this page to download the latest version for Win32:&amp;lt;br&amp;gt;&lt;br /&gt;
Download: [http://ethernut.de/en/download/index.html http://ethernut.de/en/download/index.html]&lt;br /&gt;
&lt;br /&gt;
Nut/OS for Windows features an installer which will do most of the work for you.&lt;br /&gt;
&lt;br /&gt;
It is recommended to install the ethernut folder directly on the root directory: &lt;br /&gt;
 [[Image:winpath.png|24px]] C:/ethernut-4.6.4/ &lt;br /&gt;
'''Note:''' All paths in this guide refer to that location!&lt;br /&gt;
&lt;br /&gt;
=== AT91 In-system Programmer (ISP)===&lt;br /&gt;
[http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3883 AT91 ISP] provides an open set of tools for programming the AT91SAM7 and AT91SAM9 ARM-based microcontrollers.&lt;br /&gt;
&lt;br /&gt;
It includes the SAM Boot Assistant ('''SAM-BA'''), which we will be using to upload applications to EIR.&lt;br /&gt;
&lt;br /&gt;
Download: [http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3883 http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3883] + Installation Guide&lt;br /&gt;
=== YAGARTO ===&lt;br /&gt;
[http://winavr.sourceforge.net/index.html WinAVR] is a very fast, self-contained GCC toolchain for ARM for Windows.&lt;br /&gt;
&lt;br /&gt;
It includes Binutils, Newlib, GCC compiler, and the Insight debugger.&lt;br /&gt;
&lt;br /&gt;
An installation guide can be found [http://www.yagarto.de/howto/yagarto1/index.html here]&lt;br /&gt;
&lt;br /&gt;
Download: [http://sourceforge.net/project/showfiles.php?group_id=211530&amp;amp;package_id=254273 http://sourceforge.net/project/showfiles.php?group_id=211530&amp;amp;package_id=254273]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is recommended to install the YAGARTO folder directly on the root directory:&lt;br /&gt;
 [[Image:winpath.png|24px]] C:/yagarto/&lt;br /&gt;
'''Note:''' All paths in this guide refer to that location!&lt;br /&gt;
&lt;br /&gt;
=== Tera Term ===&lt;br /&gt;
[http://ttssh2.sourceforge.jp/ Tera Term] is a so called terminal emulator. We use it to communicate via COM with the board.&lt;br /&gt;
&lt;br /&gt;
Download: [http://sourceforge.jp/projects/ttssh2/releases/ http://sourceforge.jp/projects/ttssh2/releases/]&lt;br /&gt;
&lt;br /&gt;
=== Text Editor ===&lt;br /&gt;
You can use any text editor you want.&lt;br /&gt;
Some recommended ones include:&lt;br /&gt;
* [http://www.eclipse.org/ Eclipse] Open Source&lt;br /&gt;
* [http://www.e-texteditor.com/ The e Text Editor] Commercial, Trial&lt;br /&gt;
&lt;br /&gt;
== The Nut/OS Configurator ==&lt;br /&gt;
&lt;br /&gt;
[[Image:flashvideo.png|64px]] [http://ethernut.de/arc/screencasts/EIR10CONFIGURATOR.htm Screencast Part 1] &lt;br /&gt;
&lt;br /&gt;
In order to build an optimized Nut/OS for you needs you have to configure one.&lt;br /&gt;
&lt;br /&gt;
''In some examples from nutwiki you are asked to setup something in the Nut/OS configurator. This is the time and place to do so.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In general the workflow is as following:&lt;br /&gt;
&lt;br /&gt;
1. Start the Nut/OS Configurator:&lt;br /&gt;
 [[Image:winpath.png|24px]] C:\ethernut-4.6.4\nutconf.exe&lt;br /&gt;
2. Select and open the configuration file:&lt;br /&gt;
 [[Image:winpath.png|24px]] C:\ethernut-4.6.4\nut\conf\eir10c.conf&lt;br /&gt;
3. Click on Menubar: '''Edit &amp;gt; Settings'''&amp;lt;br&amp;gt;&lt;br /&gt;
* Goto Tab: '''Build'''&lt;br /&gt;
** Choose Platform: '''arm-gcc'''&lt;br /&gt;
** Choose Build Directory: '''nutbld_eir10c'''&lt;br /&gt;
* Goto Tab: '''Tools'''&lt;br /&gt;
** Enter Tool Paths: '''c:\ethernut-4.6.4\nut\tools\win32;c:\yagarto\bin;'''&amp;lt;br&amp;gt;(Do not forget the last semicolon and modify paths if you used other locations as described above.)&lt;br /&gt;
* Goto Tab: '''Samples'''&lt;br /&gt;
** Choose Application Directory: '''nutapp_eir10c'''&lt;br /&gt;
** Choose Programmer: '''arm-jom'''&lt;br /&gt;
* Click '''OK'''&lt;br /&gt;
4. In the Nut/OS Components tree (left)&lt;br /&gt;
* Expand Tools&lt;br /&gt;
** Expand GCC Settings&lt;br /&gt;
*** Click on ARM Linker Script&lt;br /&gt;
**** Choose '''at91sam7se512_rom''' from the dropdown menu.&lt;br /&gt;
By choosing the Linker Script, you specify, in which kind of memory your application will run.&lt;br /&gt;
We are using 'at91sam7se512_rom' here, because we are going to upload the&amp;lt;br&amp;gt;application via a Bootloader (in ROM) directly into FLASH and run it in there.&lt;br /&gt;
&lt;br /&gt;
5. Click on Menubar: '''Build &amp;gt; Build Nut/OS'''&amp;lt;br&amp;gt;&lt;br /&gt;
* Say '''OK''' 2 times.&lt;br /&gt;
6. Click on Menubar: '''Build &amp;gt; Create Sample Directory'''&amp;lt;br&amp;gt;&lt;br /&gt;
* Say '''OK'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Note:''' You should create a new sample directory every time you build a new system, even if you do not want to use the samples. There are two files named&lt;br /&gt;
* Makerules&lt;br /&gt;
* Makedefs&lt;br /&gt;
in that directory, that are necessary for every application to compile.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Nut/OS Configurator built a customized version for your needs and put it in:&lt;br /&gt;
 [[Image:winpath.png|24px]] C:\ethernut-4.6.4\nutbld_eir10c\&lt;br /&gt;
&lt;br /&gt;
Additionally it created an Sample Application Directory with source codes ready to compile:&lt;br /&gt;
 [[Image:winpath.png|24px]] C:\ethernut-4.6.4\nutapp_eir10c\&lt;br /&gt;
&lt;br /&gt;
== Preparations ==&lt;br /&gt;
&lt;br /&gt;
[[Image:flashvideo.png|64px]][http://ethernut.de/arc/screencasts/EIR10PREP.htm Screencast Part 2]&lt;br /&gt;
&lt;br /&gt;
=== Application Directory ===&lt;br /&gt;
First of all we need a home for our application. &lt;br /&gt;
&lt;br /&gt;
Create a new directory &amp;quot;'''testcode'''&amp;quot; in&lt;br /&gt;
 [[Image:winpath.png|24px]] C:\ethernut-4.6.4\nutapp_eir10c\&lt;br /&gt;
&lt;br /&gt;
You can, of course, use any names you want.&lt;br /&gt;
&lt;br /&gt;
=== Editing ===&lt;br /&gt;
1. Write your application code, or for testing purposes, paste in an example code from nutwiki in a plain text file.&lt;br /&gt;
&lt;br /&gt;
2. Save it as &amp;lt;code&amp;gt;testcode.c&amp;lt;/code&amp;gt; in:&lt;br /&gt;
 [[Image:winpath.png|24px]] C:\ethernut-4.6.4\nutapp_eir10c\testcode\&lt;br /&gt;
&lt;br /&gt;
'''Note:''' Make sure, that in your Windows folder options, the setting 'Hide file extensions for unknown file types' is deactivated! If not, you will create .txt files instead of .c or Makefiles, when saving in the Editor!&lt;br /&gt;
&lt;br /&gt;
=== Makefile ===&lt;br /&gt;
For our applications to compile, we need a makefile.&lt;br /&gt;
&lt;br /&gt;
This is used and interpreted by a tool called GNU Make, which we will use later.&lt;br /&gt;
&lt;br /&gt;
Makefiles may differ from application to application, but the following is a general purpose one, which will work for basic applications.&amp;lt;br&amp;gt;&lt;br /&gt;
Later, when you are familiar with Nut/OS and makefiles you can create your own ones.&lt;br /&gt;
&lt;br /&gt;
'''Note''', that in this example makefile, the project name,&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
PROJ = testcode&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
has to be identical to the name of your application's &amp;lt;code&amp;gt;.c&amp;lt;/code&amp;gt; file!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
PROJ = testcode&lt;br /&gt;
&lt;br /&gt;
include ../Makedefs&lt;br /&gt;
&lt;br /&gt;
SRCS =  $(PROJ).c&lt;br /&gt;
OBJS =  $(SRCS:.c=.o)&lt;br /&gt;
LIBS =  $(LIBDIR)/nutinit.o -lnutpro -lnutos -lnutarch -lnutdev -lnutarch -lnutnet -lnutfs -lnutcrt&lt;br /&gt;
TARG =  $(PROJ).hex&lt;br /&gt;
PARM =  $(PROJ).eep&lt;br /&gt;
&lt;br /&gt;
all: $(OBJS) $(TARG) $(ITARG) $(DTARG)&lt;br /&gt;
&lt;br /&gt;
include ../Makerules&lt;br /&gt;
&lt;br /&gt;
clean:&lt;br /&gt;
	-rm -f $(OBJS)&lt;br /&gt;
	-rm -f $(TARG) $(ITARG) $(DTARG)&lt;br /&gt;
	-rm -f $(PROJ).eep&lt;br /&gt;
	-rm -f $(PROJ).obj&lt;br /&gt;
	-rm -f $(PROJ).map&lt;br /&gt;
	-rm -f $(SRCS:.c=.lst)&lt;br /&gt;
	-rm -f $(SRCS:.c=.bak)&lt;br /&gt;
	-rm -f $(SRCS:.c=.i)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
'''Note''', when copy and pasting the above Makefile: the spaces before '''-rm...''' have to be '''tabs''' instead of normal spaces!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Create a plain text file and paste in the code above. &lt;br /&gt;
&lt;br /&gt;
Call it &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; (Without any file extension) and save it to:&lt;br /&gt;
 [[Image:winpath.png|24px]] C:\ethernut-4.6.4\nutapp_eir10c\testcode\&lt;br /&gt;
&lt;br /&gt;
=== Configuration Files ===&lt;br /&gt;
The files&lt;br /&gt;
* Makedefs&lt;br /&gt;
* Makerules&lt;br /&gt;
from&lt;br /&gt;
 [[Image:winpath.png|24px]] C:\ethernut-4.6.4\nutapp_eir10c\&lt;br /&gt;
are essential.&lt;br /&gt;
By building a new Nut/OS and a new sample directory (nutapp_eir10c) these files get updated. &lt;br /&gt;
Your application directory (testcode) will remain untouched.&lt;br /&gt;
&lt;br /&gt;
(If you used different paths, note, that the configuration files have to be located in the top directory of the apllication directory.)&lt;br /&gt;
&lt;br /&gt;
'''Note:''' You have to build a new sample directory and move 'Makedefs' and 'Makerules' to your application's parent directory (if your app directory is not already a subfolder of &amp;quot;nutapp_eir10c&amp;quot; as recommended) every time you build a new Nut/OS!&lt;br /&gt;
&lt;br /&gt;
=== Path environment ===&lt;br /&gt;
Every command line session has its own PATH variable. &lt;br /&gt;
&lt;br /&gt;
Applications like GNU Make look up paths in that variable.&lt;br /&gt;
&lt;br /&gt;
We need to add to the path variable our tools:&lt;br /&gt;
 C:/ethernut-4.6.4/nut/tools/win32;c:/yagarto/bin;&lt;br /&gt;
&lt;br /&gt;
To do so, we could enter in the command line prompt:&lt;br /&gt;
 SET PATH=c:/ethernut-4.6.4/nut/tools/win32;c:/yagarto/bin;%PATH%&lt;br /&gt;
&lt;br /&gt;
(The &amp;lt;code&amp;gt;%PATH%&amp;lt;/code&amp;gt; at the end appends the original content of the PATH variable to the newly set.&amp;lt;br&amp;gt;&lt;br /&gt;
By leaving that out the PATH gets overwritten.)&lt;br /&gt;
&lt;br /&gt;
Because every time you close the command line prompt your PATH variable gets lost,&amp;lt;br&amp;gt;&lt;br /&gt;
there is a better way to handle it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Create a plain text file and enter:&lt;br /&gt;
 SET PATH=c:/ethernut-4.6.4/nut/tools/win32;c:/yagarto/bin;%PATH%&lt;br /&gt;
&lt;br /&gt;
2. Name it &amp;lt;code&amp;gt;ARM.bat&amp;lt;/code&amp;gt; and save it to:&lt;br /&gt;
 [[Image:winpath.png|24px]] C:\ethernut-4.6.4\nutapp_enut30e\testcode\&lt;br /&gt;
&lt;br /&gt;
This is called a Batch file.&amp;lt;br&amp;gt;&lt;br /&gt;
Everytime you type in &amp;lt;code&amp;gt;ARM&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;testcode&amp;lt;/code&amp;gt; directory now, the PATH variable gets set.&amp;lt;br&amp;gt;&lt;br /&gt;
You have to execute &amp;lt;code&amp;gt;ARM&amp;lt;/code&amp;gt; every time after you open a new command line window.&amp;lt;br&amp;gt;&lt;br /&gt;
If you do not, GNU Make will not find the tools.&lt;br /&gt;
&lt;br /&gt;
=== Connecting ===&lt;br /&gt;
&lt;br /&gt;
To connect your EIR&lt;br /&gt;
&lt;br /&gt;
*Use a standard USB cable to connect the EIR board to any free USB port on your PC.&lt;br /&gt;
*Connect EIR`s DB-9 RS232 port to an available COM port using the serial cable.&lt;br /&gt;
*Use one twisted pair cable to connect Ethernut's RJ-45 connector to the hub / switch / router and the other twisted pair cable to connect the hub / switch / router with the&lt;br /&gt;
network adapter in the PC. If you are not using a hub or switch, then directly&lt;br /&gt;
connect the EIR board with the PC’s network adapter using a twisted pair&lt;br /&gt;
cross cable.&lt;br /&gt;
*Connect the power supply to the barrel connector on the EIR board.&lt;br /&gt;
*Apply power to the EIR board by connecting the power supply to an&lt;br /&gt;
electrical outlet. When the board is powered up, the red power LED should go&lt;br /&gt;
on.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For further details have a look at the [http://ethernut.de/pdf/eir_um_1_0_6.pdf Hardware Manual]&lt;br /&gt;
&lt;br /&gt;
== Compiling and Using the Bootloader==&lt;br /&gt;
&lt;br /&gt;
Basically, the workflow is as following.&lt;br /&gt;
&lt;br /&gt;
# Compiling the source code.&lt;br /&gt;
# Erasing EIR's flash storage by a jumper setting&lt;br /&gt;
# Using SAM-BA to upload the binaries to the EIR flash storage&lt;br /&gt;
&lt;br /&gt;
=== Compiling ===&lt;br /&gt;
&lt;br /&gt;
[[Image:flashvideo.png|64px]][http://ethernut.de/arc/screencasts/EIR10COMPILE.htm Screencast Part 3]&lt;br /&gt;
&lt;br /&gt;
1. Open a command line window.&lt;br /&gt;
&lt;br /&gt;
2. Change to&lt;br /&gt;
 [[Image:winpath.png|24px]] C:\ethernut-4.6.4\nutapp_eir10c\testcode\&lt;br /&gt;
&lt;br /&gt;
3. Enter:&lt;br /&gt;
 [[Image:winpath.png|24px]] SET PATH=c:/ethernut-4.6.4/nut/tools/win32;c:/yagarto/bin;%PATH%&lt;br /&gt;
or&lt;br /&gt;
 [[Image:winpath.png|24px]] ARM&lt;br /&gt;
if you are using a batch file.&lt;br /&gt;
&lt;br /&gt;
4. Enter:&lt;br /&gt;
&lt;br /&gt;
 make clean&lt;br /&gt;
&lt;br /&gt;
''This tells &amp;quot;Make&amp;quot; to clean up the directory with respect to the rules made in the Makefile''&lt;br /&gt;
&lt;br /&gt;
You should get something like:&lt;br /&gt;
 rm -f testcode.o&lt;br /&gt;
 rm -f testcode.hex testcode.bin testcode.elf&lt;br /&gt;
 rm -f testcode.eep&lt;br /&gt;
 rm -f testcode.obj&lt;br /&gt;
 rm -f testcode.map&lt;br /&gt;
 rm -f testcode.lst&lt;br /&gt;
 rm -f testcode.bak&lt;br /&gt;
 rm -f testcode.i&lt;br /&gt;
&lt;br /&gt;
If not, you maybe left out step 3.&lt;br /&gt;
&lt;br /&gt;
5. Enter:&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
This should get you something like:&lt;br /&gt;
&lt;br /&gt;
 arm-elf-gcc -c -mcpu=arm7tdmi -Os -mthumb-interwork -fomit-frame-pointer -Wall -Wstrict-prototypes&lt;br /&gt;
 -fverbose-asm -Wa,-ahlms=testcode.lst -DELEKTOR_IR1 -I../../nutbld_eir10c/include&lt;br /&gt;
 -I../../nut/include  testcode.c -o testcode.o&lt;br /&gt;
 testcode.c: In function 'main':&lt;br /&gt;
 testcode.c:11: warning: implicit declaration of function '_ioctl'&lt;br /&gt;
 testcode.c:18:2: warning: no newline at end of file&lt;br /&gt;
 arm-elf-gcc testcode.o -mcpu=arm7tdmi&lt;br /&gt;
 -nostartfiles -T../../nut/arch/arm/ldscripts/at91sam7se512_rom.ld -Wl,-Map=testcode.map,&lt;br /&gt;
 --cref,--no-warn-mismatch -L../../nutbld_eir10c/lib &lt;br /&gt;
 -Wl,--start-group ../../nutbld_eir10c/lib/nutinit.o -lnutpro -lnutos -lnutarch -lnutdev -lnutarch&lt;br /&gt;
 -lnutnet -lnutfs -lnutcrt  -Wl,--end-group -o testcode.elf&lt;br /&gt;
 arm-elf-objcopy -O ihex testcode.elf testcode.hex&lt;br /&gt;
 arm-elf-objcopy -O binary testcode.elf testcode.bin&lt;br /&gt;
&lt;br /&gt;
This command compiled the source code and generated the binary files beside some other files in&lt;br /&gt;
 [[Image:winpath.png|24px]] C:\ethernut-4.6.4\nutapp_eir10c\testcode\&lt;br /&gt;
&lt;br /&gt;
=== Erasing the Flash Storage ===&lt;br /&gt;
&lt;br /&gt;
On the EIR board connect pins 34 and 36 of K3 (Port C) using a 2.54 mm jumper. &lt;br /&gt;
&lt;br /&gt;
Press the reset button and remove the jumper. This erases the flash storage and also activates the SAM-BA boot loader.&lt;br /&gt;
&lt;br /&gt;
'''Note:'''This procedure has to be done everytime before using SAM-BA.&lt;br /&gt;
&lt;br /&gt;
[[Image:eir_j1.jpg|300px]]&lt;br /&gt;
&lt;br /&gt;
=== Using SAM-BA ===&lt;br /&gt;
&lt;br /&gt;
[[Image:flashvideo.png|64px]][http://ethernut.de/arc/screencasts/EIR10SAMBA.htm Screencast Part 4]&lt;br /&gt;
&lt;br /&gt;
1. Launch SAM-BA&lt;br /&gt;
&lt;br /&gt;
2. In the popup dialog:&lt;br /&gt;
* Selct the connection should say '''\usb\ARM0'''&lt;br /&gt;
If not, try to deplug and plug the USB cable again. Try to erase the flash again. Then restart SAM-BA&lt;br /&gt;
* Select your board: '''AT91SAM7SE512-EK'''&lt;br /&gt;
* Press: '''Connect'''&lt;br /&gt;
&lt;br /&gt;
3. In the SAM-BA main window&lt;br /&gt;
* In the tab '''Flash'''&lt;br /&gt;
** Send file name: Browse to: [[Image:winpath.png|24px]] C:\ethernut-4.6.4\nutapp_eir10c\testcode\testcode.bin&lt;br /&gt;
** Press: '''Send File''' This initiates the actual uploading process.&lt;br /&gt;
** Press: '''Compare sent file with memory''' to make sure, your file was transfered correctly.&lt;br /&gt;
** In the section: '''Scripts'''&lt;br /&gt;
*** Choose: '''Boot from Flash (GPNVM2)'''&lt;br /&gt;
*** Press: '''Execute'''&lt;br /&gt;
* Quit SAM-BA&lt;br /&gt;
&lt;br /&gt;
4. Reset Your EIR by depressing and releasing the reset switch behind the USB connector.&lt;br /&gt;
&lt;br /&gt;
== Serial Communications / Tera Term ==&lt;br /&gt;
&lt;br /&gt;
[[Image:flashvideo.png|64px]][http://ethernut.de/arc/screencasts/TERATERM.htm Screencast Part 5]&lt;br /&gt;
&lt;br /&gt;
Done. All you have to do now, is to connect the serial cable to the Ethernut's COM Port and start '''TeraTerm''' or any other serial communications tool.&lt;br /&gt;
&lt;br /&gt;
Configure TeraTerm with the follwing settings:&lt;br /&gt;
*Menubar &amp;gt; Setup &amp;gt; Serial port...&lt;br /&gt;
**Baud rate: '''115200'''&lt;br /&gt;
**Data: '''8Bit'''&lt;br /&gt;
**Parity: '''None'''&lt;br /&gt;
**Stop: '''1bit'''&lt;br /&gt;
**Flow control: '''none'''&lt;br /&gt;
**Transmit delay: '''0''';'''0'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now reset your Ethernut board and you will see the output imediately, as the app is stored in flash.&lt;br /&gt;
&lt;br /&gt;
== Repitutorium: Restoring the webradio firmware ==&lt;br /&gt;
&lt;br /&gt;
=== Description ===&lt;br /&gt;
&lt;br /&gt;
This is a brief tutorial on how to restore the original webradio firmware using the methods explained above.&lt;br /&gt;
&lt;br /&gt;
=== Workflow ===&lt;br /&gt;
&lt;br /&gt;
1. Download the most recent '''webradio firmware''' from [http://ethernut.de/en/hardware/eir/index.html http://ethernut.de/en/hardware/eir/index.html] under 'Software'&lt;br /&gt;
&lt;br /&gt;
2. Use the '''Nut/OS Configurator''' to build a Nut/OS for EIR. Also create a sample directory. [ [[#The Nut/OS Configurator|Details]] ]&lt;br /&gt;
&lt;br /&gt;
3. Decompress the webradio .zip file and copy the resulting folder 'webradio' to the application directory. (\nutapp_eir10c\webradio\)&lt;br /&gt;
&lt;br /&gt;
4. Now You have the '''choice'''. The webradio package comes with source code and pre-compiled binaries. So:&lt;br /&gt;
* If you want to use the pre-compiles binaries proceed to step 5.&lt;br /&gt;
'''or'''&lt;br /&gt;
* If you want to compile the '''sources''' (.h, .c) by yourself do the following: (Note, that a Makefile is provided)&lt;br /&gt;
** In a '''command line prompt''':&lt;br /&gt;
*** '''Change to''' the webradio directory&lt;br /&gt;
*** Set the path variable to: '''c:/ethernut-4.6.4/nut/tools/win32;c:/yagarto/bin;''' [ [[#Path environment|Details]] ]&lt;br /&gt;
*** Use the commands &amp;lt;code&amp;gt;make clean&amp;lt;/code&amp;gt; to clean and &amp;lt;code&amp;gt;make all&amp;lt;/code&amp;gt; to '''compile''' the webradio source files. [ [[#Compiling|Details]] ]&lt;br /&gt;
** You should end up with a bunch of files including '''webradio.bin'''&lt;br /&gt;
&lt;br /&gt;
5. Erase the Flash memory and activate SAM-BA bootloader [ [[#Erasing the Flash Storage|Details]] ]&lt;br /&gt;
&lt;br /&gt;
6. Launch SAM-BA&lt;br /&gt;
* Connect to your board via USB&lt;br /&gt;
* Choose '''webradio.bin''' as your file to send.&lt;br /&gt;
* Compare sent file with memory.&lt;br /&gt;
* Execute the script Boot from Flash (GPNVM2).&lt;br /&gt;
[ [[#Using SAM-BA|Details]] ]&lt;br /&gt;
&lt;br /&gt;
== Important things to remember ==&lt;br /&gt;
In order to not get frustrated remember:&lt;br /&gt;
&lt;br /&gt;
* When entering the tool paths in the Configurator, do not forget the semicolon at the end of the line!&lt;br /&gt;
* Make sure, that the setting 'Hide file extensions for unknown file types' is deactivated in you Windows folder options. Otherwise, 'Editor' won't create proper .c or Makefiles.&lt;br /&gt;
* In the Makefile, make sure, that the project name is identical to your &amp;lt;code&amp;gt;.c&amp;lt;/code&amp;gt; file's name!&lt;br /&gt;
* Update the PATH variable every time you open a new command line prompt! Write a bash file for that.&lt;br /&gt;
* You have to build a new sample directory and move 'Makedefs' and 'Makerules' from there to your application's parent directory every time you build a new Nut/OS with the Configurator! &lt;br /&gt;
* Use 'at91sam7se512_rom' as ARM Linker Script (Nut/OS Configurator), when using the SAM-BA method.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Nut/OS Examples]]&lt;br /&gt;
* [[Hello World!]] Example&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
[http://ethernut.de/pdf/eir_um_1_0_6.pdf] EIR 1.0 Hardware Manual (Mai 2008)&lt;br /&gt;
&lt;br /&gt;
[http://ethernut.de/pdf/enswm24e.pdf] Ethernut Software Manual (November 2005)&lt;br /&gt;
&lt;br /&gt;
[http://www.egnite.de/fileadmin/presse/071081-UK_Webradio.pdf] Elektor Article on EIR (April 2008, issue 376) [ [http://www.egnite.de/fileadmin/presse/071081-D_Webradio.pdf GER] ]&lt;br /&gt;
&lt;br /&gt;
[http://ethernut.de/en/hardware/eir/index.html] EIR 1.0 section on ethernut.de&lt;br /&gt;
&lt;br /&gt;
[http://www.myway.de/ElectronicFreak/EIR.html] Christian Schöning created a document about how to use the EIR with Eclipse (German language). &lt;br /&gt;
&lt;br /&gt;
[http://www.yagarto.de/] YAGARTO site with lots of HowTos e.g. debugging.&lt;br /&gt;
&lt;br /&gt;
[http://www.gnuarm.org/] Similar to YAGARTO, but additionally supports Mac OS X. &lt;br /&gt;
&lt;br /&gt;
[http://www.vlsi.fi/] The website of VLSI Solution Oy, who offers the VS1053 audio codec. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Code Snippets]]&lt;br /&gt;
&lt;br /&gt;
{{Languages}}&lt;/div&gt;</summary>
		<author><name>Daniel</name></author>	</entry>

	</feed>