<?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: Netduino Plus 2 libmaple port</title>
		<link>http://forums.leaflabs.com/topic.php?id=11902</link>
		<description>A place to share, learn, and grow...</description>
		<language>en-US</language>
		<pubDate>Fri, 22 Jan 2016 00:17:53 +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=11902" rel="self" type="application/rss+xml" />

		<item>
			<title>mlundinse on "Netduino Plus 2 libmaple port"</title>
			<link>http://forums.leaflabs.com/topic.php?id=11902#post-26439</link>
			<pubDate>Mon, 03 Jun 2013 20:07:22 +0000</pubDate>
			<dc:creator>mlundinse</dc:creator>
			<guid isPermaLink="false">26439@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;@gbulmer You got a link to that thread on Black magic probe vs. openocd ? Or you tried it yourself ?&#60;/p&#62;
&#60;p&#62;I cannot say that openocd is just easy out of the box, but part of the problem is badly written scripts and gdb trying to read in weird memory locations. I use openocd to connect diretly to STM32F4 Discovery borads using the onboard st-link and to a Netduino plus 2 using a separate J-link debug adapter with a 20 to 10 pin jtag adapter cable. The problem here was soldering the small 10pin male header to the netduino board (I am old with weak eyes)&#60;/p&#62;
&#60;p&#62;Dont want to turn this thread into a openocd for/against argument but with a bit of setup its a useful tool.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "Netduino Plus 2 libmaple port"</title>
			<link>http://forums.leaflabs.com/topic.php?id=11902#post-26437</link>
			<pubDate>Mon, 03 Jun 2013 18:30:56 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">26437@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;slibert - LeafLabs have posted on a thread recommending the black magic probe. It directly understands the gdb remote debug protocol, so &#34;it just works&#34;. They did use OpenOCD before that, and IIRC the post suggested that black magic probe is so much better that you wouldn't go back. &#60;/p&#62;
&#60;p&#62;I, and a friend, have futzed around with configuring OpenOCD. I was not impressed.&#60;/p&#62;
&#60;p&#62;My experience with &#60;a href=&#34;https://github.com/texane/stlink&#34; rel=&#34;nofollow&#34;&#62;https://github.com/texane/stlink&#60;/a&#62; is pretty good. (The only annoyance was the stlink makefile got a bit baroque for my taste in finding the USB library, but that is a matter of taste.).&#60;br /&#62;
Once compiled, run the stlink gdb server, start gdb (with the right connection syntax) and &#34;it just works&#34; (no configuration) with the STM32F4Discovery. Pull the two jumpers out, and wire the debugger on the STM32F4Discovery to the NP2, and that should work fine too.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>slibert on "Netduino Plus 2 libmaple port"</title>
			<link>http://forums.leaflabs.com/topic.php?id=11902#post-26435</link>
			<pubDate>Mon, 03 Jun 2013 18:14:28 +0000</pubDate>
			<dc:creator>slibert</dc:creator>
			<guid isPermaLink="false">26435@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Thanks for the guidance, gbulmer and mlundinse.&#60;/p&#62;
&#60;p&#62;OTG_FS VCP is now up and running on discovery, so for me that's a great stride forward - thanks gbulmer.  mlundinse, I see your point about code structure.  At this stage in the game I'm likely to stick w/ala42's approach, waiting until I have a whole working development environment setup before embarking on that level of reorganization - but I'll keep it in mind.&#60;/p&#62;
&#60;p&#62;Now that leds, buttons and usb serial are breathing on F4 discovery, getting it to work on the NP2 and source-level debugging are my next steps.&#60;/p&#62;
&#60;p&#62;I've seen favorable comments about the black magic probe (has an embedded gdb server in it).  Not sure if it's better to order/wait for that, or just dive into OpenOCD.  If  you have any insight into tradeoffs here, I'd be very grateful.&#60;/p&#62;
&#60;p&#62;Thanks again for your support, hopefully I'll get to the point where I'm giving as much as I'm receiving.  :)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mlundinse on "Netduino Plus 2 libmaple port"</title>
			<link>http://forums.leaflabs.com/topic.php?id=11902#post-26431</link>
			<pubDate>Mon, 03 Jun 2013 16:23:22 +0000</pubDate>
			<dc:creator>mlundinse</dc:creator>
			<guid isPermaLink="false">26431@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;open-ocd works quite well with stm32f4 and st-link/v2 these days also
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "Netduino Plus 2 libmaple port"</title>
			<link>http://forums.leaflabs.com/topic.php?id=11902#post-26430</link>
			<pubDate>Mon, 03 Jun 2013 16:17:31 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">26430@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;slibert - If you haven't already done it, I'd recommend you investigate using the JTAG-SWD for hardware debugging.&#60;/p&#62;
&#60;p&#62;The STM32F4Discovery has a JTAG-SWD (two-wire JTAG) hardware debugger built-in which can also be used on your Netduino Plus 2.&#60;br /&#62;
The JTAG-SWD debugger is a subset of the ST-LINK/V2 (quite low-cost, and supports both of ARM's Cortex-M JTAG interfaces)&#60;br /&#62;
&#60;a href=&#34;http://www.st.com/web/catalog/tools/FM146/CL1984/SC720/SS1450/PF251168?s_searchtype=partnumber&#34; rel=&#34;nofollow&#34;&#62;http://www.st.com/web/catalog/tools/FM146/CL1984/SC720/SS1450/PF251168?s_searchtype=partnumber&#60;/a&#62;&#60;br /&#62;
It supports the usual debugging features, e.g. setting breakpoints, watching for a variables value to change, single stepping, etc.&#60;/p&#62;
&#60;p&#62;There are a bunch of tools which can help you debug code, including gdb (in the toolchain). The ST-LINK/V2-based  JTAG-SWD needs a gdb server, and one which folks use is at &#60;a href=&#34;https://github.com/texane/stlink&#34; rel=&#34;nofollow&#34;&#62;https://github.com/texane/stlink&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mlundinse on "Netduino Plus 2 libmaple port"</title>
			<link>http://forums.leaflabs.com/topic.php?id=11902#post-26429</link>
			<pubDate>Mon, 03 Jun 2013 15:52:07 +0000</pubDate>
			<dc:creator>mlundinse</dc:creator>
			<guid isPermaLink="false">26429@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I have looked at ala42's stuff, and I find its great, but its not from me.&#60;br /&#62;
I want a nice clean usb implementation that can easily be mapped to the USB&#60;br /&#62;
protocol without a multilayer of spagetti fuction calls where configuration and dependencies are almost impossible to trace, but thats just me.&#60;/p&#62;
&#60;p&#62;For other periperials I have libmaple gpio, uart, i2c and spi working on a DisvoveryF4 board by simply reusing the STMF2 stuff from the main repo.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>slibert on "Netduino Plus 2 libmaple port"</title>
			<link>http://forums.leaflabs.com/topic.php?id=11902#post-26427</link>
			<pubDate>Mon, 03 Jun 2013 14:01:44 +0000</pubDate>
			<dc:creator>slibert</dc:creator>
			<guid isPermaLink="false">26427@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;gbulmer's tip (above) to look at ala42's STM32F4Discovery libmaple port was helpful - this port appears to have libmaple SerialUSB mapped onto the F4's OTG_FS.  mlundinse, if you haven't already, you might want to take a look at this.&#60;/p&#62;
&#60;p&#62;Source is in a zip file, at &#60;a href=&#34;http://code.google.com/p/stm32f4discovery-libmaple/downloads/list&#34; rel=&#34;nofollow&#34;&#62;http://code.google.com/p/stm32f4discovery-libmaple/downloads/list&#60;/a&#62;.&#60;/p&#62;
&#60;p&#62;Click on the libmaple.zip.&#60;/p&#62;
&#60;p&#62;Like you, I find the process a bit daunting, but I think the goal of getting libmaple running on the more recent STM32 MCUs (which IMHO look to be some of the best out there in the MCU class) is worth it.&#60;/p&#62;
&#60;p&#62;I'm new to the ARM, so learning curve will be steep - so if you have any tips or pointers, please let me know.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mlundinse on "Netduino Plus 2 libmaple port"</title>
			<link>http://forums.leaflabs.com/topic.php?id=11902#post-26425</link>
			<pubDate>Mon, 03 Jun 2013 13:53:01 +0000</pubDate>
			<dc:creator>mlundinse</dc:creator>
			<guid isPermaLink="false">26425@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;There is quite some work done on perhipherials in the stm32f2 directories of the official branch, and their periherials are real close to stm32f4.&#60;/p&#62;
&#60;p&#62;I am also looking into adapting USB to use OTG_FS. I have looked at the ST Driver and USB lib but, perhaps foolishly, this messy library makes me just tirerd to look at, so instead I am trying to get to grips with both the present USB code and the documentation of the OTG_FS hardware. ( so much for beeing tired and wasting time ) &#60;/p&#62;
&#60;p&#62;These driver libraries are overby their wish to wrap everthing up in some general function, which makes finding out to make even simples things almost as hard as reading their reference manuals. And in order to know whats happening you still must read the reference manuals.&#60;/p&#62;
&#60;p&#62;There are some stm32f1 specific stuff in header files that are not stored in stmf32f1 folders. So making the old work nice with the new needs a careful touch.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "Netduino Plus 2 libmaple port"</title>
			<link>http://forums.leaflabs.com/topic.php?id=11902#post-26420</link>
			<pubDate>Mon, 03 Jun 2013 11:30:24 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">26420@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;silbert - &#60;em&#62;&#34;I'm starting work on a Netduino Plus 2 libmaple port.&#34;&#60;/em&#62;&#60;br /&#62;
Kudos!&#60;/p&#62;
&#60;p&#62;&#60;em&#62;&#34;I've decided to start w/the openstm32sw as a base.&#34;&#60;/em&#62;&#60;br /&#62;
I haven't got the link to hand, but you might want to track down ala42's code, which I believe has progressed further than the old github openstm32sw, unless that is the one you are using.&#60;/p&#62;
&#60;p&#62;You say &#60;em&#62;&#34;2) In general, the ... and F406 (STM32F4Discovery) have&#34;&#60;/em&#62;&#60;br /&#62;
Did you mean STM32F407?&#60;/p&#62;
&#60;p&#62;&#60;em&#62;&#34;...  Seems like some sort of new symbol (like F405, or F4_DENSITY or something (?) more reasonable) should be used ...&#34;&#60;/em&#62;&#60;br /&#62;
Agreed. The extra peripherals and interrupts are dependant on the MCU no matter what board the chip is on. I'd define something like STM32F405, or STM32F407, and use &#60;code&#62;#if defined&#60;/code&#62; with those.  &#60;/p&#62;
&#60;p&#62;Best of luck.&#60;/p&#62;
&#60;p&#62;(Full disclosure: I am not a member of LeafLabs staff.)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>slibert on "Netduino Plus 2 libmaple port"</title>
			<link>http://forums.leaflabs.com/topic.php?id=11902#post-26408</link>
			<pubDate>Sun, 02 Jun 2013 23:47:16 +0000</pubDate>
			<dc:creator>slibert</dc:creator>
			<guid isPermaLink="false">26408@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I'm starting work on a Netduino Plus 2 libmaple port.  &#60;/p&#62;
&#60;p&#62;My ultimate goal is to get Arduino-like code (esp. w/support for ENC28J60, SD card, XBEE and also to get the excellent I2C Device Library ported over and running on these targets:&#60;/p&#62;
&#60;p&#62;- STM32F4DISCOVERY&#60;br /&#62;
- Netduino Plus 2&#60;/p&#62;
&#60;p&#62;After poking around the forums and reviewing the different branches, I've decided to start w/the openstm32sw as a base.&#60;/p&#62;
&#60;p&#62;Here's what I've encountered so far, if any of the experts have any insight on best practices, please let me know:&#60;/p&#62;
&#60;p&#62;1) The USB OTG is not supported in the F2/F4 libmaple branches.  I can see why, it's a pretty big change.  I'd really like to get CDC working, but DFU would be nice too.  I'm thinking of tackling this, but not until 2) is resolved.  For what I can tell, ala42 has considered something like this but I haven't found anything concrete yet.&#60;/p&#62;
&#60;p&#62;2) In general, the F405 (Netduino Plus 2) and F406 (STM32F4Discovery) have:&#60;/p&#62;
&#60;p&#62;- More peripherals.  Specifically, there's a USART6 that the Netduino Plus 2 really needs.&#60;br /&#62;
- More Interrupt Vectors.  Includes USART6, ETH, More DMA 2 Channels, USB OTG and I2C3.&#60;/p&#62;
&#60;p&#62;So here's the immediate question on 2).  I'm starting to extend the existing STM32F4 (F2) code, changes appear reasonably minimal to get USART6 and the additional interrupt vectors added in.  However, my current approach is to add some more kludgy #if defined (BOARD_netduinoplus2) statements while extending usart.h/.c, and nvic.h/.c.  Seems like some sort of new symbol (like F405, or F4_DENSITY or something (?) more reasonable) should be used, otherwise we'll have BOARDxxx littered all over the place.  &#60;/p&#62;
&#60;p&#62;So my primary question here: does anyone have any recommendations for an approach to add USART6 and associated interrupts (and ultimately other details that are F405/F406 specific)?&#60;/p&#62;
&#60;p&#62;I'd like to think I'd be following a standard and that would make it easier to potentially merge this into the main libmaple stream.  I think the netduinoplus2 hardware support, and also the port of the i2cdevlib (www.i2cdevlib) would be helpful not only to me but others.&#60;/p&#62;
&#60;p&#62;Thanks for any input you may have,&#60;/p&#62;
&#60;p&#62;Cheers,&#60;/p&#62;
&#60;p&#62;- scott
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
