You are viewing an older revision! See the latest version
easy_mbed_offline_compiler_with_eclipse
<html>
<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta name=Generator content="Microsoft Word 14 (filtered)">
<style>
<!
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin-top:0in;
margin-right:0in;
margin-bottom:10.0pt;
margin-left:0in;
line-height:115%;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{margin-top:0in;
margin-right:0in;
margin-bottom:10.0pt;
margin-left:.5in;
line-height:115%;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst
{margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
line-height:115%;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle
{margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
line-height:115%;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast
{margin-top:0in;
margin-right:0in;
margin-bottom:10.0pt;
margin-left:.5in;
line-height:115%;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
.MsoChpDefault
{font-family:"Calibri","sans-serif";}
.MsoPapDefault
{margin-bottom:10.0pt;
line-height:115%;}
@page WordSection1
{size:8.5in 11.0in;
margin:.5in .5in .5in .5in;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
>
</style>
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=WordSection1>
<p class=MsoNormal>EASY MBED OFFLINE COMPILER WITH ECLIPSE</p>
<p class=MsoNormal>Hi folks!</p>
<p class=MsoNormal>This HOWTO is specially dedicated to all my friends who studying Computer Engineering at University of Sherbrooke. YESSSS for you guys!</p>
<p class=MsoNormal>So, here are the steps:</p>
<p class=MsoListParagraphCxSpFirst style='text-indent:-.25in'>1-<span style='font:7.0pt "Times New Roman"'> </span>The most important step, get WINDOWS</p>
<p class=MsoListParagraphCxSpMiddle style='text-indent:-.25in'>2-<span style='font:7.0pt "Times New Roman"'> </span>Download gcc4med at https://github.com/adamgreen/gcc4mbed/zipball/master</p>
<p class=MsoListParagraphCxSpMiddle style='text-indent:-.25in'>3-<span style='font:7.0pt "Times New Roman"'> </span> (this is a GCC ARM mbed + libraries port for win/mac/*nix.) Before I discovered it I did the tutorial here: http://mbed.org/cookbook/Using-mbed-with-gcc-and-eclipse but these steps are not anymore required since someone did this great and useful portable package. Thanks Adam Green.</p>
<p class=MsoListParagraphCxSpMiddle style='text-indent:-.25in'>4-<span style='font:7.0pt "Times New Roman"'> </span>Extract it in C:\mbed-dev</p>
<p class=MsoListParagraphCxSpMiddle style='text-indent:-.25in'>5-<span style='font:7.0pt "Times New Roman"'> </span>Run as admin C:\mbed-dev\win_install.cmd (this gonna build the required dev env)</p>
<p class=MsoListParagraphCxSpMiddle style='text-indent:-.25in'>6-<span style='font:7.0pt "Times New Roman"'> </span>Copy C:\mbed-dev\samples\HelloWorld to C:\mbed-dev\samples\default-ide</p>
<p class=MsoListParagraphCxSpMiddle style='text-indent:-.25in'>7-<span style='font:7.0pt "Times New Roman"'> </span>Download, extract, and run Eclipse C/C++ IDE Indigo SR2 (32-bit) http://www.eclipse.org/downloads/packages/eclipse-ide-cc-developers-includes-incubating-components/indigosr2</p>
<p class=MsoListParagraphCxSpMiddle style='text-indent:-.25in'>8-<span style='font:7.0pt "Times New Roman"'> </span>File/New/Makefile Project with Existing Code, Browse to C:\mbed-dev\samples\default-ide, Finish</p>
<p class=MsoListParagraphCxSpMiddle style='text-indent:-.25in'>9-<span style='font:7.0pt "Times New Roman"'> </span>Right click on default-ide projet and Properties, C/C++ Build, Environment, Add<br> Name: PATH<br> VALUE: C:\mbed-dev\gcc-arm-none-eabi\bin\;C:\mbed-dev\gcc-arm-none-eabi\bin\..\..\external\win32<br> Add to all configs, Done</p>
<p class=MsoListParagraphCxSpMiddle style='text-indent:-.25in'>10-<span style='font:7.0pt "Times New Roman"'> </span>In the same Properties window, C/C++ General, Paths and Symbols, GNU C++, Add<br> Directory: C:\mbed-dev\external\mbed<br> Add to all configs, Done, Yes rebuild.</p>
<p class=MsoListParagraphCxSpMiddle style='text-indent:-.25in'>11-<span style='font:7.0pt "Times New Roman"'> </span>Open makefile in the project, rename PROJECT=HelloWorld to PROJECT=default-ide , under it one add line <br> MBED_DRIVE=E (E is the drive of your mbed device)</p>
<p class=MsoListParagraphCxSpMiddle style='text-indent:-.25in'>12-<span style='font:7.0pt "Times New Roman"'> </span>Edit (with a unix compatible editor) c:\mbed-dev\build\ gcc4mbed.mk<br> Under line 261 add: $(Q) $(OBJCOPY) -O binary $(PROJECT).elf $(MBED_DRIVE):\$(PROJECT).bin</p>
<p class=MsoListParagraphCxSpMiddle style='text-indent:-.25in'>13-<span style='font:7.0pt "Times New Roman"'> </span>Edit for main.cpp, save and build. You gonna have your new file into your mbed.</p>
<p class=MsoListParagraphCxSpLast style='text-indent:-.25in'>14-<span style='font:7.0pt "Times New Roman"'> </span>Have fun!</p>
</div>
</body>
</html>