<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>LeafLabs Garden &#187; Topic: How2: Linux no-gui development</title>
		<link>http://forums.leaflabs.com/topic.php?id=21</link>
		<description>A place to share, learn, and grow...</description>
		<language>en-US</language>
		<pubDate>Fri, 22 Jan 2016 00:17:42 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.2</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://forums.leaflabs.com/search.php</link>
		</textInput>
		<atom:link href="http://forums.leaflabs.com/rss.php?topic=21" rel="self" type="application/rss+xml" />

		<item>
			<title>bnewbold on "How2: Linux no-gui development"</title>
			<link>http://forums.leaflabs.com/topic.php?id=21#post-418</link>
			<pubDate>Wed, 30 Jun 2010 00:19:59 +0000</pubDate>
			<dc:creator>bnewbold</dc:creator>
			<guid isPermaLink="false">418@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;FWIW, we have written up a guide to no-gui development at &#60;a href=&#34;http://leaflabs.com/docs/libmaple/unix-toolchain/&#34; rel=&#34;nofollow&#34;&#62;http://leaflabs.com/docs/libmaple/unix-toolchain/&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>importer on "How2: Linux no-gui development"</title>
			<link>http://forums.leaflabs.com/topic.php?id=21#post-95</link>
			<pubDate>Sat, 03 Apr 2010 14:59:14 +0000</pubDate>
			<dc:creator>importer</dc:creator>
			<guid isPermaLink="false">95@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;[on Thu 07 of Jan., 2010 19:34 EST, by poslathian]&#60;/p&#62;
&#60;p&#62;If ever you should find your board not-programming even though it used to, you have likely flashed some code that fools with the interrupts in a way that disrupts the usb peripheral. There are other low level ways to disrupt the bootloader too, like this:&#60;/p&#62;
&#60;p&#62;void setup() {&#60;br /&#62;
int* ram_base=0x2000000;&#60;br /&#62;
while (ram_base &#38;lt; 0x20005000) {&#60;br /&#62;
*ram_base=0x0;&#60;br /&#62;
}&#60;br /&#62;
}&#60;br /&#62;
void loop() {&#60;br /&#62;
never gets here&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;AND....were bricked.&#60;/p&#62;
&#60;p&#62;Thankfully, we expected you might do this (would you?). The bootloader wont jump to user code for a few seconds after a power cycle. Thus, you have those few seconds to upload a less toxic sketch before it takes over. Unfortunately, the IDE is a bit too slow (since it recompiles everything every time, like arduino) to upload the new sketch in this window. Thus the method described above is an excellent rescue resource.&#60;/p&#62;
&#60;p&#62;Im not sure this little blurb was really appropriate here, just thought id share.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>importer on "How2: Linux no-gui development"</title>
			<link>http://forums.leaflabs.com/topic.php?id=21#post-93</link>
			<pubDate>Sat, 03 Apr 2010 14:58:36 +0000</pubDate>
			<dc:creator>importer</dc:creator>
			<guid isPermaLink="false">93@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;[on Thu 07 of Jan., 2010 12:29 EST, by rsbohn]&#60;br /&#62;
&#38;gt; Your program is loaded in RAM, so it won't be there if you cycle the power on the Maple board. If you want to put it in flash you need the following (which I have not yet tried):&#60;br /&#62;
&#38;gt;&#60;br /&#62;
&#38;gt; make LINKER=lanchon-stm32-user-rom.ld DEFFLAGS=VECT_TAB_RAM&#60;/p&#62;
&#60;p&#62;oops, that should be DEFFLAGS=VECT_TAB_ROM if you are writing to the Flash memory.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>importer on "How2: Linux no-gui development"</title>
			<link>http://forums.leaflabs.com/topic.php?id=21#post-92</link>
			<pubDate>Sat, 03 Apr 2010 14:58:16 +0000</pubDate>
			<dc:creator>importer</dc:creator>
			<guid isPermaLink="false">92@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;[on Wed 30 of Dec., 2009 08:58 EST, by rsbohn]&#60;/p&#62;
&#60;p&#62;My host machine is WindowsXP. Here is a summary of what didn't work:&#60;/p&#62;
&#60;p&#62;FAIL: connecting the Maple board to Ubuntu in a QEMU vm. The Windows version will not connect to random USB devices. Might work if your QEMU host is Linux, but then why not just run dfu-util on the host?&#60;/p&#62;
&#60;p&#62;FAIL: running dfu-util on Ubuntu in a VMware vm. I did manage to connect the board to the vm, but dfu-util was never able to put the board into dfuIDLE. I never got it out of Runtime mode. You could try resetting the board just before you run dfu-util, but I couldn't get that to work.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>importer on "How2: Linux no-gui development"</title>
			<link>http://forums.leaflabs.com/topic.php?id=21#post-89</link>
			<pubDate>Sat, 03 Apr 2010 14:57:43 +0000</pubDate>
			<dc:creator>importer</dc:creator>
			<guid isPermaLink="false">89@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;[on Wed 30 of Dec., 2009 08:48 EST, by rsbohn]&#60;/p&#62;
&#60;p&#62;The files in */trunk/library allow you to use the Arduino(Wiring) libraries to program the Maple board. Here is how it worked for me on Ubuntu. You should probably read &#60;a href=&#34;http://leaflabs.com/Blinky&#34; rel=&#34;nofollow&#34;&#62;http://leaflabs.com/Blinky&#60;/a&#62; first, the instructions there are excellent.&#60;/p&#62;
&#60;p&#62;-Install dfu-util&#60;br /&#62;
-Install subversion&#60;br /&#62;
-Fetch a copy of the Leaflabs code from &#60;a href=&#34;http://leaflabs.googlecode.com/svn/&#34; rel=&#34;nofollow&#34;&#62;http://leaflabs.googlecode.com/svn/&#60;/a&#62;&#60;br /&#62;
-Go to */trunk/library&#60;br /&#62;
-Make any changes to src/main.cpp&#60;br /&#62;
-run 'make clean'&#60;br /&#62;
-run the following to build the software as a RAM image&#60;/p&#62;
&#60;p&#62;MAPLE=~/leaflabs-read-only/trunk/maple/build/linux/dist&#60;br /&#62;
ARM_BIN=$DIST/tools/arm/bin&#60;br /&#62;
PATH=$ARM_BIN:$PATH make LINKER=lanchon-stm32-user-ram.ld DEFFLAGS=VECT_TAB_RAM&#60;/p&#62;
&#60;p&#62;(I put that in a script called 'go', then ran 'sh go')&#60;/p&#62;
&#60;p&#62;-Next connect the maple board. You may see a message informing you that&#60;br /&#62;
the Maple is not a modem. (dmesg &#124; tail to see the message) This is expected&#60;br /&#62;
and not a problem.&#60;br /&#62;
-Make sure dfu-util can see the board:&#60;/p&#62;
&#60;p&#62;dfu-util -l&#60;/p&#62;
&#60;p&#62;You should see two lines with the Maple vendor:product id 0x0110:0x1001.&#60;br /&#62;
The alt=0 is the RAM target and the alt=1 is the Flash (ROM) target.&#60;/p&#62;
&#60;p&#62;-Now run 'sudo make program' to transfer the image to the Maple board. dfu-util will connect to the board, put it into dfuIDLE mode, then upload the image. After the upload the board is reset and your program should start running. The default image will blink the blue LED on pin 13. It will send startup messages out Serial2 (pins D0 and D1). It also sends 'blink...\n' on the usb port (Serial1), which you can see if you run 'cat /dev/ttyACM0'.&#60;/p&#62;
&#60;p&#62;Your program is loaded in RAM, so it won't be there if you cycle the power on the Maple board. If you want to put it in flash you need the following (which I have not yet tried):&#60;/p&#62;
&#60;p&#62;make LINKER=lanchon-stm32-user-rom.ld DEFFLAGS=VECT_TAB_RAM
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
