tag:blogger.com,1999:blog-29746233961658917522024-03-14T10:49:04.891+13:00ChrisChrishttp://www.blogger.com/profile/03826450772833728800noreply@blogger.comBlogger8125tag:blogger.com,1999:blog-2974623396165891752.post-30347065375656265602014-02-04T22:08:00.001+13:002014-02-07T20:28:08.289+13:00Howto setup Eclipse to build and flash Spark-Core firmwareThese instructions are based on "STEP 6: MAKE IT SWEETER!" in <a href="http://rlogiacco.wordpress.com/2014/01/25/the-sparkcore-makers-meet-the-cloud/">this blog post</a>.<br />
<br />
My environment is Windows 7 32-bit.<br />
<br />
It is assumed you have already created a working command line firmware build environment as described <a href="https://github.com/spark/core-firmware">here</a>.<br />
<br />
Set your user PATH variable to contain the ARM tools, make and dfu-util, it should look something like the following:<br />
<br />
<i>C:\Apps\spark\GNU Tools ARM Embedded\4.8 2013q4\bin;</i><br />
<i>C:\Apps\spark\GnuWin32\bin;</i><br />
<i>C:\Apps\spark\dfu-util-0.7-binaries\win32-mingw32</i><br />
<br />
Make sure the ARM path points to the <i>bin</i> directory under <i>arm-none-eabi</i> and that there are no brackets in the path.<br />
<br />
Download and install <a href="http://www.eclipse.org/downloads/packages/eclipse-ide-cc-developers/keplersr1">Eclipse Kepler CPP</a> and start it.<br />
<br />
Import each of the three firmware projects in Eclipse using<br />
<i>Import > Existing Code as Makefile Project</i><br />
<div style="text-align: left;">
<a href="http://3.bp.blogspot.com/-4lQ2n7vFhYo/UvChMEK_VUI/AAAAAAAAApA/3FCV3VAVy4E/s1600/1-import.bmp" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-4lQ2n7vFhYo/UvChMEK_VUI/AAAAAAAAApA/3FCV3VAVy4E/s320/1-import.bmp" height="400" width="381" /></a></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
Select GNU Autotools as Toolchain:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-7vNu9Lmqtkw/UvCibISEUlI/AAAAAAAAApM/5AY7u4JhxMQ/s1600/2-import-project.bmp" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-7vNu9Lmqtkw/UvCibISEUlI/AAAAAAAAApM/5AY7u4JhxMQ/s400/2-import-project.bmp" /></a>
</div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
For the core-firmware project only, from the project contextual menu select:<br />
<i>Make Target > Build…</i><br />
Add target “all”<br />
Add target “clean”
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-V0R3sLiR3sc/UvCoFIUCyJI/AAAAAAAAApk/Z78bB-Dihhw/s1600/4-make-all.bmp" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-V0R3sLiR3sc/UvCoFIUCyJI/AAAAAAAAApk/Z78bB-Dihhw/s400/4-make-all.bmp" /></a></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
For the core-firmware project only, from the project contextual menu select<br />
<i>Properties > C/C++ Build </i><br />
Within the Builder Settings tab set the Build-Directory to<br />
<i>${workspace_loc:/core-firmware}/build
</i><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-3bCaVugWDFw/UvCo22qbZUI/AAAAAAAAAps/u0Kpnks6yb8/s1600/7-build-config.bmp" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-3bCaVugWDFw/UvCo22qbZUI/AAAAAAAAAps/u0Kpnks6yb8/s400/7-build-config.bmp" /></a></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
Within the Environment subsection add a PATH variable pointing at your system environment path:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-N18cQDglmqM/UvCpsj_FlTI/AAAAAAAAAp0/MYJaEPrzVyM/s1600/8-build-config.bmp" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-N18cQDglmqM/UvCpsj_FlTI/AAAAAAAAAp0/MYJaEPrzVyM/s1600/8-build-config.bmp" height="106" width="400" /></a></div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-Z046BQUwOac/UvCp8BiH9II/AAAAAAAAAp8/r2OESkW_Xrc/s1600/9-build-config.bmp" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-Z046BQUwOac/UvCp8BiH9II/AAAAAAAAAp8/r2OESkW_Xrc/s400/9-build-config.bmp" /></a></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
For the core-firmware project only, from the project contextual menu select<br />
<i>Project > Properties > C/C++ General > Paths and Symbols >Includes > GNU C++</i><div>
And add <i>arm-none-eabi\include</i> subfolder</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-a-78_Cq69cA/UvSKzt4XnvI/AAAAAAAAAqY/uCHe3XPzT9E/s1600/10-include-option.bmp" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-a-78_Cq69cA/UvSKzt4XnvI/AAAAAAAAAqY/uCHe3XPzT9E/s1600/10-include-option.bmp" height="171" width="320" /></a></div>
<div>
<br /><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
Add an external run configuration for dfu-util, so that it can be run from within Eclipse:<br />
<i>Run -> External Tools -> External Tools Configurations...</i><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/--v9t53m_wo8/UvCtLD41U8I/AAAAAAAAAqI/hfM2Ob1kCSs/s1600/11-dfu-util.bmp" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/--v9t53m_wo8/UvCtLD41U8I/AAAAAAAAAqI/hfM2Ob1kCSs/s400/11-dfu-util.bmp" /></a></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
Open <i>application.cpp</i> from core-firmware if you see compile errors, from the project contextual menu try:
<i>Index -> Rebuild
</i></div>
Chrishttp://www.blogger.com/profile/03826450772833728800noreply@blogger.com0tag:blogger.com,1999:blog-2974623396165891752.post-82649027318884766062013-06-07T19:42:00.000+12:002013-06-07T19:45:01.158+12:00Another cool Arduino compatible WiFi capable board on KickStarter for a reasonable price. The <a href="http://www.kickstarter.com/projects/digistump/digix-the-ultimate-arduino-compatible-board-with-w">DigiX</a> has an <a href="http://www.atmel.com/devices/sam3x8e.aspx">Atmel Cortex M3 CPU</a>
<div><br><div style="text-align: center;"><iframe frameborder="0" height="380" src="http://www.kickstarter.com/projects/digistump/digix-the-ultimate-arduino-compatible-board-with-w/widget/card.html" width="220"></iframe></div></div>Chrishttp://www.blogger.com/profile/03826450772833728800noreply@blogger.com0tag:blogger.com,1999:blog-2974623396165891752.post-54443379343687798952013-05-17T21:46:00.000+12:002013-05-17T21:48:38.485+12:00Looking forward to getting one of these <a href="http://www.kickstarter.com/projects/sparkdevices/spark-core-wi-fi-for-everything-arduino-compatible">Spark Core</a> modules in September, should be good for my battery operated weather station project, as its going to support the low power modes of both the <a href="http://www.st.com/web/catalog/mmc/FM141/SC1169/SS1031/LN1565/PF189782">ARM Cortex M3</a> and <a href="http://www.ti.com/product/cc3000">CC3000</a> WiFi chips.
<iframe frameborder="0" height="380" src="http://www.kickstarter.com/projects/sparkdevices/spark-core-wi-fi-for-everything-arduino-compatible/widget/card.html" width="220"></iframe>Chrishttp://www.blogger.com/profile/03826450772833728800noreply@blogger.com0tag:blogger.com,1999:blog-2974623396165891752.post-67342446413277255272011-07-07T21:46:00.002+12:002011-07-07T21:46:50.607+12:00Good description of the problems/solutions for legacy code<a href="http://www.dzone.com/links/r/working_with_legacy_code_4.html">http://www.dzone.com/links/r/working_with_legacy_code_4.html</a>Chrishttp://www.blogger.com/profile/03826450772833728800noreply@blogger.com0tag:blogger.com,1999:blog-2974623396165891752.post-55829643448861291042011-06-04T22:48:00.002+12:002011-06-04T22:50:19.880+12:00Installing Apache2 on Ubuntu 11.04 in VirtualBoxInstall with:<br />
<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;">sudo apt-get install apache2</span><br />
<br />
Setup port forwarding so that Apache can be accessed from the host:<br />
<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;">"C:\Program Files\Oracle\VirtualBox\VBoxManage" modifyvm "Ubuntu-11.04" --natpf1 "apache,tcp,,8080,,80"</span><br />
<br />
Then from the host access:<br />
<br />
<a href="http://localhost:8080/">http://localhost:8080/</a>Chrishttp://www.blogger.com/profile/03826450772833728800noreply@blogger.com0tag:blogger.com,1999:blog-2974623396165891752.post-82507659618844776992011-06-04T22:22:00.004+12:002011-06-04T22:51:10.243+12:00Installing Java on Ubuntu 11.04I followed the instructions here:<br />
<br />
<a href="http://oracamp.com/installing-java-ubuntu-1104-natty-narwhal">http://oracamp.com/installing-java-ubuntu-1104-natty-narwhal</a><br />
<br />
java -version<br />
java version "1.6.0_24"<br />
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)<br />
Java HotSpot(TM) Client VM (build 19.1-b02, mixed mode, sharing)Chrishttp://www.blogger.com/profile/03826450772833728800noreply@blogger.com0tag:blogger.com,1999:blog-2974623396165891752.post-83524412239909071292011-06-04T21:46:00.004+12:002011-06-04T22:54:17.508+12:00Installing Oracle XE on Ubuntu 11.04 Desktop in VirtualBoxDownload Oracle XE (oracle-xe_10.2.0.1-1.0_i386.deb) from:<br />
<br />
<a href="http://www.oracle.com/technetwork/database/express-edition/downloads/102xelinsoft-102048.html">http://www.oracle.com/technetwork/database/express-edition/downloads/102xelinsoft-102048.html</a><br />
<br />
<a href="http://www.oracle.com/technetwork/database/express-edition/downloads/102xelinsoft-102048.html"></a>Make sure you have 1GB of swap, or add more as described here:<br />
<br />
<a href="https://help.ubuntu.com/community/SwapFaq">https://help.ubuntu.com/community/SwapFaq</a><br />
<br />
<a href="https://help.ubuntu.com/community/SwapFaq"></a>then:<br />
<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;">wget -c http://oss.oracle.com/debian/dists/unstable/main/binary-i386/libaio_0.3.104-1_i386.deb</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;">sudo dpkg -i libaio_0.3.104-1_i386.deb</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;">sudo dpkg -i oracle-xe_10.2.0.1-1.0_i386.deb</span><br />
<br />
Oracle XE can be silently installed, by creating a file (e.g. xe-install.txt) containing:<br />
<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;">8080</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;">1521</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"><sys password></span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"><system password></span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;">y</span><br />
<div><br />
</div><div>Then executing:</div><div><br />
</div><div><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;">sudo /etc/init.d/oracle-xe configure < xe-install.txt >> xe-install.log</span></div><div><br />
</div><div>Open the database home page at:</div><div><br />
</div><div>http://127.0.0.1:8080/apex<br />
<br />
To access the database from the Windows host, issue the following command to setup port forwarding:<br />
<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;">"C:\Program Files\Oracle\VirtualBox\VBoxManage" modifyvm "Ubuntu-11.04" --natpf1 "oracle,tcp,,2521,,1521"</span><br />
<br />
A JDBC like the following can then connect from the host:<br />
<br />
hr@//localhost:2521/xe</div><div><br />
</div>Chrishttp://www.blogger.com/profile/03826450772833728800noreply@blogger.com0tag:blogger.com,1999:blog-2974623396165891752.post-86925427389337258862011-04-01T20:20:00.000+13:002011-04-01T20:20:12.815+13:00Blog createdNow to host it on my personal domain as described here:<br />
<br />
<a href="http://www.google.com/support/blogger/bin/static.py?page=ts.cs&ts=1233381">http://www.google.com/support/blogger/bin/static.py?page=ts.cs&ts=1233381</a>Chrishttp://www.blogger.com/profile/03826450772833728800noreply@blogger.com0