Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.

Howie Goodell's Content

There have been 28 items by Howie Goodell (Search limited from 29-March 23)


By content type

See this member's


Sort by                Order  

#45849 Ethernet, Real-Time Control and DotNetMF Threading

Posted by Howie Goodell on 19 February 2013 - 09:17 PM in Netduino 2 (and Netduino 1)

Hi --

 

Job

Use Netduino Plus2 to make an Ethernet-to-specialized-serial interface for industrial control.  

 

Killer problem

Each round trip takes over 20 milliseconds; it needs to be 1-2.  

 

Analysis

I think the delay comes because my control program is a simple loop running in one thread waiting for Ethernet data.  It sends and receives to the industrial HW on serial in ca. 1 MS; then sends results back on Ethernet.  Tracing shows the TCP/IP stack in a different thread, and I've read that each thread transition waits for a 10-millisecond clock tick.  Hence, the killer problem.

 

Possible solutions?

  • I don't think e.g. making my control code "event-driven" would make a difference, but I'm not an experienced C# programmer.  Any way to get either C# (or all-C++ interop code) into the same thread as the Ethernet I/O?  
  • I am recompiling the whole software just to include my tiny interop changes.  Is there some build option or high-level code switch to disable the multitasker and just have Ethernet and user code wait for each other?
  • If I ping the Netduino Plus2 before the C# program is downloaded, my laptop says it responds in less than a millisecond.  It's that performance I need: 500-1000 packets/second.  I'll happily make a little tweak, but I'll also dump  the whole .Net infrastructure (now that I can use JTAG debug); if that gets the job done quickest.  (For example, just hook the ping code -- the message size is perfect -- directly to my interop control code, and never load a C# program.  
  • Or I'll put completely different software on the board,
  • Go to different hardware.
  • ...

Argument for a tweak (if one is possible) is that bare-metal programming is perishable; in these few months I already had to rewrite my direct hardware control of the Atmel ARM UART in Netduino Plus to the the ST UART in Plus2.  The dotNetMF might be a way to future-proof the application.  However, it first has to work in the present ;-)

 

Suggestions anyone?

 

Howie 




#43564 Netduino Plus 2 Firmware source

Posted by Howie Goodell on 17 January 2013 - 01:17 AM in Beta Firmware and Drivers

Hey, thanks again buddy!

 

I was able to resolve the problem -- all Visual Studio and Secret Labs nonsense.  Once I'd resolved the problems using the official download, then I reloaded the firmware I had built 2 days ago using your additions and procedure.  It compiles and debugs a blinky just fine.   I posted the details here, because it sounded like they were having related problems.

 

I'll let you know if I see any problem with low-level serial port access (the main reason I needed interop) or network.  Otherwise I don't see any more roadblocks.  Whew!

 

Yes, I plan to do JTAG debugging soon; so please send me anything convenient.  I'll be glad to do some writeups, etc. on them if you don't have time; this was a big help to me.

 

Take care!

Howie




#43545 Netduino 2 Plus Porting Rebuilding?

Posted by Howie Goodell on 16 January 2013 - 05:51 PM in Netduino Plus 2 (and Netduino Plus 1)

Edit#3     BLINKY LIVES !!!!

 

When I purged the broken (Release 4.1) SecretLabs libraries that I had somehow acquired, Blinky works including single-stepping from MSVC.  This is running on firmware compiled from the 4.2.1 source using the free GCC compiler (instead of the $5000 one-computer-only RVDS one) following these instructionsposts for context ) from ziggurat29 (monster thanks again, buddy!).

 

Details:

Initially I wasn't able to get any of the SecretLabs assemblies to load except the diagnostic (it complained there was no SecretLabs.NETMF.Hardware; so it refused the SecretLabs.NETMF.Hardware.Netduino DLL I'd imported -- huh?).  So I dumped them, spent a couple minutes with the board schematic and blinked 

Microsoft.SPOT.Hardware.Cpu.Pin.GPIO_Pin10 instead of SecretLabs.NETMF.Hardware.Netduino.Pins.ONBOARD_LED

It worked fine!  Then I switched back to the compiled source (I was debugging with the official download firmware once I realized that had the problem too after I tried to switch back to 4.2 QFE1 SDK and Porting Kit and Netduino SDK) and verified that worked.  Finally, I tried switching to the SecretLabs ONBOARD_LED, and that worked, too.

 

While Visual Studio 10 was linking, I noticed a message saying it was downloading SecretLabs.NETMF something -- presumably that's why it worked.  That reminded me that I'd seen that message flash up when I first ran MSVS10 after switching back to QFE1.  I'm wondering if that's where my 4.1 SecretLabs assemblies came from that have been messing me up the last day or so.

 

At a programming conference long ago I met a programmer who had named his business "Abracadabra Typesetting" to be first in the Yellow Pages listing (I told you it was long ago).  He'd discovered that name was a big mistake: customers told him it made them afraid his business might go "Poof!".  These automagical downloads are charming when they just work, but now every time I see it, I'll worry what might have broken.  At least give us a way to know what was downloaded if we miss the 5-second popup.

 

Anyway: all's well that ends well.  I can finally make the firmware changes and give my boss what he is clamoring for (just not eager-to-buy-a-$5000-tool-for-what-should-have-been-a-small-project clamoring).  I suspect we aren't the only ones who'll be very happy about this capability.

 

Howie

 

==============  OLDER, FOR BACKGROUND ONLY  =====================

 

Edit#2: In trying to go back to 4.2 QFE1, I clearly have gotten some Netduino 4.1 assemblies somehow.  The version of Microsoft.SPOT.Hardware that two of them ask for (4.1.2821.0) is the exact version in my 4.1 assembly.  I am trying to get the SecretLabs 4.2 references to link properly instead of the 4.1.  Then I should be developing on top of an interop-ready system using the free GCC compiler; yah!

 

Edit #1

Hi --

 

I'm having a related problem.  After uninstalling the QFE2 SDK and PK and installing 4.2 QFE1 versions, a Blinky project created in my MS Visual Studio 10 downloads but refuses to run, not only on the GCC-compiled version that I built following ziggurat29's procedure here , but even on the stock 12/3/2012 firmware download (NetduinoPlus2_Firmware_4.2.1.2.dfu).  Visual Studio apparently is still looking for the wrong version of modules: Debug output at the end of this.  

 

Chris, I think somewhere you mentioned unzipping an update over SecretLabs SDK Visual Studio sources.  Can that work in reverse, or do I need to uninstall and reinstall Secret Labs SDK VS?

 

Thanks!

Howie

================  Debug output on attempted download  ===================

(note cleaning and rebuilding got rid of these errors, but it still failed to initialize after the download)

 

 

Create TS.
 
 Loading start at 806a328, end 808443c
 
Assembly: mscorlib (4.2.0.0)
 
Assembly: Microsoft.SPOT.Native (4.2.0.0)
 
Assembly: Microsoft.SPOT.Hardware (4.2.0.0)
 
Assembly: Microsoft.SPOT.Net (4.2.0.0)
 
Assembly: System (4.2.0.0)
 
Assembly: Microsoft.SPOT.Hardware.SerialPort (4.2.0.0)
 
Assembly: Microsoft.SPOT.IO (4.2.0.0)
 
Assembly: System.IO (4.2.0.0)
 
Assembly: Microsoft.SPOT.Hardware.PWM (4.2.0.1)
 
Assembly: Microsoft.SPOT.Hardware.Usb (4.2.0.0)
 
Assembly: SecretLabs.NETMF.Diagnostics (4.2.0.0)
 
Assembly: SecretLabs.NETMF.Hardware.Netduino (4.2.1.0)
 
Assembly: Microsoft.SPOT.Hardware.OneWire (4.2.0.0)
 
Assembly: Microsoft.SPOT.Time (4.2.0.0)
 
Loading Deployment Assemblies.
 
Attaching deployed file.
 
Assembly: np2Blnk (1.0.0.0)
 
Attaching deployed file.
 
Assembly: SecretLabs.NETMF.Hardware.Netduino (4.1.0.0)
 
Attaching deployed file.
 
Assembly: SecretLabs.NETMF.Hardware (4.1.0.0)
 
Resolving.
 
Link failure: some assembly references cannot be resolved!!
 
 
Assembly: SecretLabs.NETMF.Hardware.Netduino (4.1.0.0) needs assembly 'Microsoft.SPOT.Hardware' (4.1.2821.0)
 
Assembly: SecretLabs.NETMF.Hardware.Netduino (4.1.0.0) needs assembly 'mscorlib' (4.1.2821.0)
 
Assembly: SecretLabs.NETMF.Hardware (4.1.0.0) needs assembly 'mscorlib' (4.1.2821.0)
 
Assembly: SecretLabs.NETMF.Hardware (4.1.0.0) needs assembly 'Microsoft.SPOT.Hardware' (4.1.2821.0)
 
Error: a3000000
 
Waiting for debug commands...
 
The program '[0x1] Micro Framework application: Managed' has exited with code 0 (0x0).



#43541 Netduino Plus 2 Firmware source

Posted by Howie Goodell on 16 January 2013 - 04:52 PM in Beta Firmware and Drivers

Hi --

 

I'm still working through confusing errors trying to get a Visual Studio project to run.

 

(Removed this, because I just found similar problems with the official download.  So it's apparently some mis-configuration of MSVS10 when I went back to QF1.  Will pursue -- sorry for crying wolf again.  Problem is: if I investigate for hours to be sure, I may be missing something that would be obvious to someone else.)

 

(Keeping this, because inquiring minds want to know):

If nothing obvious surfaces, I'll probably try JTAG debug.  ziggurat29 (I thought you signed one post "dave"), I notice you said you use GDB with OpenOCD (still waiting for membership approval at the latter forum; so I can download).  Is this now command-line, or through Eclipse as you'd said before?
 
Howie
 
 



#43499 Netduino Plus 2 Firmware source

Posted by Howie Goodell on 15 January 2013 - 10:35 PM in Beta Firmware and Drivers

Dave,

 

Fortunately I'm a harmless idiot.  I rechecked everything and found that I had copied the wrong block of the release version into the TinyBooter slot.  As you diagnose, failure to return anything to the ping points straight at the boot code.  With the correct version, it pings TinyCLR.  Excellent!

 

I am trying to get MSVS 10 to deploy now; may be back with a question or two about configuration or setting up hardware debug shortly.  However, I am seeing how much work  you did to get this toolchain running, and I really appreciate it.  I think the price point and free-as-in-speech nature of GCC will open up interop on this board to a lot more people.  

 

Thanks!

Howie




#43474 Netduino Plus 2 Firmware source

Posted by Howie Goodell on 15 January 2013 - 07:43 PM in Beta Firmware and Drivers

I'm concerned about the two compile errors, should should be none (unless they are 'can't include file xxx' because of the version number issue)

 

FYI Dave, changing the YAGARTO version didn't fix it, but the change to set_base_env.cmd did.  I now get 20 warnings and no errors, same as you.  Yippee!  And thanks a bunch for your hard work!

 

Now to see if it boots....

 

Howie

 

Hmmn -- I made a DFU image following the wiki instructions, but it doesn't ping in MFDeploy.  Reflashing the release one (from wlhich I extracted TinyBooter) does.  What to do?

 

I have the ST-LINK/V2 dongle and adapter Chris recommended; verified I can see program memory and registers with JTAG ifc using STM's utility.  I also set up Eclipse and verified I could build a test ARM program; just have to get those together; good idea anyway.  Dave, I'll go look at your posts from earlier and start debugging this in hardware, unless you can suggest something obvious I might have missed here.  Anybody have ideas?

 

Thanks!

Howie




#43420 Netduino Plus 2 Firmware source

Posted by Howie Goodell on 15 January 2013 - 01:05 AM in Beta Firmware and Drivers

Dave, many thanks for the clear instructions!

 

One little nit is that saying GCC4.6 or 4.7 returns a stupid error -- the script setenv_base.cmd has all the sophistication of a 1985 DOS script and throws me out if I say anything other than GCC 4.2:

 

C:MicroFrameworkPK_v4_2>setenv_base.cmd GCC4.6 PORT C:yagarto
Setting environment for using Microsoft Visual Studio 2010 x86 tools.
 
Error: Invalid Arguments!
 
Usage: setenv_base COMPILER_TOOL_VERSION
    where COMPILER_TOOL_VERSION is ADI5.0, GCC4.2, ADS1.2, RVDS3.0, RVDS3.1, 
RVDS4.0,  RVDS4.1, MDK3.1, MDK3.80a, MDK4.12, MDK4.13, SHC9.2, VS9, VS10
 
Idiots!  However, just tell it you want 4.2 and it's happy:
 
C:MicroFrameworkPK_v4_2>setenv_base.cmd GCC4.2 PORT C:yagarto
Setting environment for using Microsoft Visual Studio 2010 x86 tools.
setting vars for GCC compiler
 
Is this legitimate?  Also wondering why you don't have the error.  Is it possible you still have the QE2 script executing?  I think the nonsense about versions was fixed there.
 
I also still have 2 compile errors, but I just realized I had installed the latest GCC (4.7) instead of 4.6.0 (2l0111124) as you instructed.  I'll correct that before whining further ;-)
 
Thanks much, again!
Howie



#43401 Netduino Plus 2 Firmware source

Posted by Howie Goodell on 14 January 2013 - 06:16 PM in Beta Firmware and Drivers

<blockquote class="ipsBlockquote" data-author="Chris Walker" data-cid="41271" data-time="1355067270">Hi Dave,<br /> <br /> <br /> The Netduino Plus 2 firmware is based off of .NET MF 4.2 QFE1 so be sure to copy it over the 4.2 QFE1 PK (instead of 4.2 QFE2).<br /> <br /> Chris</blockquote> <p>Hi guys,</p> <p>&nbsp;</p> <p>Kind of sad, because one of the additions in QFE2 was GCC support :-( &nbsp;</p> <p>I am trying to build some small interop additions with GCC on N+2 (I used a 30-day RVDS trial to build the previous version on Netduino Plus, but that's expired). &nbsp;I will follow through ziggurat29's procedures (I see they were just updated yesterday); just wanted to know if there's a change to that one.</p> <p>&nbsp;</p> <p>Happy Monday!</p> <p>Howie</p>



#41754 Introducing Netduino Plus 2

Posted by Howie Goodell on 18 December 2012 - 06:00 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi Paolo,

It's a standard MiniJTAG port (Cortex Debug Port to be exact).

You can debug using the STLink/V2 and TI MDL-ADA2 JTAG to MiniJTAG adapter. $41.25 for the set, which is ridiculously inexpensive.

We use these instead of our $2000+ ARM RVICE hardware. It works beautifully and supports quite a few breakpoints. We debug C# code, step into native code (alt+tab) and back and forth. It's pretty awesome.

And for those who want a really really nice Cortex-M4F devboard for C/C++ code...Netduino Plus 2 does that really well too. Arduino shield compatibility is a big bonus there too.

Chris


Hi Chris,

What's the IDE you are referring to that steps from C# in and out of native code? Is it IAR (that you mentioned in another post)? Their free "Kickstart Edition" is limited to 32 KB, which won't compile your platform.
(I was using MS Visual Studio 2010 for .NET MF C#, but I don't think that would support interop native code on ARM.)

Thanks!
Howie



#41213 Netduino Plus 2 Firmware v4.2.1

Posted by Howie Goodell on 08 December 2012 - 02:33 AM in Netduino Plus 2 (and Netduino Plus 1)

Hi Howie,


No problem, we've posted it on the downloads page. :)

Enjoy!

Chris


Chris,
I just downloaded "netduino plus 2 firmware v4.2.1 source" at http://www.netduino.com/downloads/ . Thanks much!
Howie



#41212 Netduino Plus 2 Firmware v4.2.1

Posted by Howie Goodell on 08 December 2012 - 02:28 AM in Netduino Plus 2 (and Netduino Plus 1)

Hi -- One more question now that the source is out: what IDEs do you suggest using? You mentioned one that lets you drop down from C# to C++ interop debugging -- that sounds very cool; is it expensive? Have a good weekend! Howie



#41211 N+2 and (not so) TinyCore

Posted by Howie Goodell on 08 December 2012 - 02:14 AM in Netduino Plus 2 (and Netduino Plus 1)

...
I wonder who's bright idea it was to name that assembly "TinyCore"? Whoever it was, I'm sure they're still giggling.

Mark


George Orwell's. Right after he wrote http://en.wikipedia....een_Eighty-Four where the "Ministry of Truth" wrote propaganda and changed records to match the current Party line, and the "Ministry of Love" tortured and brainwashed you ;-)

Have a good weekend!
Howie



#40874 Netduino Plus 2 Firmware v4.2.1

Posted by Howie Goodell on 03 December 2012 - 08:45 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi Howie,

I'll make sure we get the source code posted this week. We're working on 4.2.1.1, so we'll have another source update around the end of next week.

Chris


Hi Chris,

I know you've had your hands full, but please do post the Netduino source when you can. I could care less about I2C ;-)

Thanks!
Howie



#40385 Introducing Netduino Plus 2

Posted by Howie Goodell on 28 November 2012 - 07:19 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi Paolo,

It's a standard MiniJTAG port (Cortex Debug Port to be exact).

You can debug using the STLink/V2 and TI MDL-ADA2 JTAG to MiniJTAG adapter. $41.25 for the set, which is ridiculously inexpensive.

We use these instead of our $2000+ ARM RVICE hardware. It works beautifully and supports quite a few breakpoints. We debug C# code, step into native code (alt+tab) and back and forth. It's pretty awesome.
...


Hi Chris:

What IDE are you describing here?

Thanks!
Howie



#40263 Introducing Netduino Plus 2

Posted by Howie Goodell on 26 November 2012 - 09:38 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi Paolo,

It's a standard MiniJTAG port (Cortex Debug Port to be exact).

You can debug using the STLink/V2 and TI MDL-ADA2 JTAG to MiniJTAG adapter. $41.25 for the set, which is ridiculously inexpensive.

We use these instead of our $2000+ ARM RVICE hardware. It works beautifully and supports quite a few breakpoints. We debug C# code, step into native code (alt+tab) and back and forth. It's pretty awesome.

And for those who want a really really nice Cortex-M4F devboard for C/C++ code...Netduino Plus 2 does that really well too. Arduino shield compatibility is a big bonus there too.

Chris


Hi Chris,

All purchased and on my desk. However, there is a teensy problem. The mini JTAG cable Mouser sent us with the TI MDL-ADA2 JTAG to MiniJTAG adapter is female-to-female, but the mini-JTAG connection on the Netduino Plus 2 requires pins on the connector. Are your mini-JTAG connectors male-to-female, or are you doing something else you didn't mention in your post? Two possibilities:
  • You bought a male-to-male mini-JTAG adapter.
  • If the orientation of the pins works, you removed the RESET button from the mini-JTAG adapter and pushed its pins through the board with no cable.
Example of #1: in Mouser's "customers also purchased" box, I found a 20-pin male-to-male connector that might work sawed in half. Let us know!

Thanks!
Howie



#40244 Netduino Plus 2 Pinout Reference Sheet

Posted by Howie Goodell on 26 November 2012 - 05:39 PM in Netduino Plus 2 (and Netduino Plus 1)

I am really excited about getting my Netduino Plus 2. So I thought that in order to pass the insane long wait of 2 day shipping, that I would create a pinout reference sheet.
...


Great help -- thanks!

Two more minor points for the next revision:
* Ethernet is 10/100 Mbps
* You might want to say "available" or "free" by the flash and RAM sizes. (Flash has 384 KB free out of 1 MB total; RAM has 100 KB free out of 192 total.)

Thanks again!
Howie



#39748 Netduino Plus 2 Firmware v4.2.1

Posted by Howie Goodell on 20 November 2012 - 05:29 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi Howie,

I'll make sure we get the source code posted this week. We're working on 4.2.1.1, so we'll have another source update around the end of next week.

Chris


Hi Chris,

Have you posted it? I don't see anything yet on the downloads page (Netduino firmware still has 10/9 for Solutions/NetduinoPlus. Just got my board; debug cables hopefully tomorrow. We Yanks have our Thanksgiving holiday this week; I was hoping to take it home and play after the turkey coma wears off ;-) .

Take care!
Howie



#39273 Netduino Plus 2 Firmware v4.2.1

Posted by Howie Goodell on 13 November 2012 - 07:35 PM in Netduino Plus 2 (and Netduino Plus 1)

Indeed awesome! Question: when do you expect to release the source code for the firmware? Happy to beta-test; about to order the JTAG ICE you suggest. IMHO a decent interop development environment will open a lot of embedded applications for this board; usually they need a few specific things to be fast and/or a little different than the generic functions. Howie Goodell



#36976 To compile the source code with .net mf 4.1 for netduino plus

Posted by Howie Goodell on 10 October 2012 - 04:59 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi Nak.

1. .Net Micro Framework SDK 4.1 (QFE1)
2. .Net Micro Framework Porting Kit 4.1 (QFE1)
3. ND+ Firmware 4.1.0.6
4. setenv_RVDS4.0.cmd c:\rvds
5. 1st compilation with error which cann't execute command \armcc.exe, which was corrected by deleting letter \ in C:\MicroFrameworkPK_v4_1\tools\targets\Microsoft.SPOT.System.RVDS.targets
6. "C:\MicroFrameworkPK_v4_1\DeviceCode\include\..\Initialization\MasterConfig.h", line 12: Error: #5: cannot open source input file "platform_selector.h": No such file or directory is error for my compilation.
above is also corrected with copying platform_selector.h to the C:\MicroFrameworkPK_v4_1\DeviceCode\include\..\Initialization.
7. Fuse the bootloader on Flash
8. Fuse the .net mf on Flash. No execution in deployment. Error.

Kevin.


Hi Kevin,

I am also trying to compile interop native code changes. Last week I tried to do something similar to what you describe: compile 4.1.0.6 firmware using ARM RVDS 4.1, with similar result: after download, the Netduino Plus was never recognized, and I needed to start again with hard reset and loading TinyBooterDecompressor.

Yesterday I gave up on 4.1 and upgraded to all 4.2 (MF SDK, Porting Kit, Netduino SDK and Netduino firmware). One point I noticed was that the 4.2 Micro Framework SDK "New behavior" includes:
6) Support for RVDS 4.1
-- lack of this support may explain our inability to generate a working configuration on SDK 4.1.

Now I can compile and deploy the Netduino 4.2 sources from the download page http://www.netduino.com/downloads/ . This is the procedure that worked for me; change to fit your config:

One-time upgrade:
  • (Ensure you have an ARM compiler; I did the 1-month trial of ARM RVDS to avoid issues with code size initially. Note I let it compile at the default C:\Program Files; probably less problematic to use a directory with no spaces in the name. Also use your disk and not network card for the license -- my network config changed on my company laptop and the compiles stopped working; good chance of at least a day delay getting support from England.)
  • Download and install/upgrade to the 4.2 environment as described in the pinned forum post http://forums.netdui...-v420-update-1/ .
  • Download and deploy the new firmware on your Netduino Plus (or whatever) as described at http://wiki.netduino...ep-by-step.ashx -- just to verify the precompiled 4.2 has no issues before you try your own version.
  • For Interop, you also need to download and install the 4.2 Porting Kit (under "Other Available Downloads" at http://netmf.codeple...ases/view/91594 )
  • (Optional: source-control the directory to keep track of SecretLabs and your changes. In my case, git init, git add *, git commit -m"Initial download" -- available at http://git-scm.com/downloads .)
  • Download and unzip the Netduino 4.2 sources from the download page http://www.netduino.com/downloads/ . Copy to the root of the 4.2 Porting Kit; i.e. C:\MicroFrameworkPK_v4_2\ and overwrite all conflicts. (See why I wanted version control?)
  • From a command window (I ran as admin; not sure if needed), initialize your msbuild by typing:
  • setenv_rvds.cmd 4.1 "C:\Program Files\ARM"
  • msbuild dotNetMF.proj >logs\dotNetMF.log
(Note I created a "logs" directory and do all my output to log files there -- consider doing the same unless you are a
very fast reader ;)
Every time:
  • setenv_rvds.cmd 4.1 "C:\Program Files\ARM"
  • msbuild solutions\NetduinoPlus\dotnetmf.proj /p:flavor=release;tcp_ip_stack=lwip /t:rebuild >logs\np20121010_1.log
  • View output to ensure no errors -- I use Chrome: file:///C:/MicroFrameworkPK_v4_2/logs/np20121010_1.log
  • Restart N+ into TinyBooter (reconnect USB/power while holding button down)
  • Start MFDeploy and follow the instructions at http://wiki.netduino...ep-by-step.ashx to deploy the two hex files created by your compile from the Platform Kit output directory: in my case C:\MicroFrameworkPK_v4_2\BuildOutput\THUMB\RVDS4.1\le\FLASH\release\NetduinoPlus\bin\tinyclr.hex
  • Unplug and reconnect the Netduino and view the config with MFDeploy.
  • Close MFDeploy and open Visual Studio etc. to verify your C# projects compile.

Let me know if these work; I'll make a wiki page soon.

Two requests for whoever can:
  • SecretLabs post 4.2.0.1 source.
  • Explain how to ensure that our interop project gets flashed as part of Solutions\NetduinoPlus, OR how to do an incremental download we can access using what look like new options in MF 4.2. Last year, Chris Walker suggested this old post from Ardeneo: http://adeneo-embedd...-framework.html -- it says to create your own Solution -- I'm fuzzy on how that gets downloaded.

Thanks!
Howie



#36901 Netduino Plus 1 Firmware v4.2.0 (update 1)

Posted by Howie Goodell on 09 October 2012 - 08:00 PM in Netduino Plus 2 (and Netduino Plus 1)

One more question: the source link on the Downloads page gives me 8/12 sources. Chris, for those who want to compile interop changes, where can we get the sources that correspond with Update 1 firmware? Thanks! Howie



#36896 Netduino Plus 1 Firmware v4.2.0 (update 1)

Posted by Howie Goodell on 09 October 2012 - 07:08 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi Chris,

I finally am trying to upgrade my Netduino plus to this version, after encountering various problems trying to compile and deploy the 4.1.0.6 firmware.


My goal in switching to the latest version was to make my mistakes where they would be more useful. It seems I am already succeeding.

When I ran the Atmel SAM-BA utility and looked for the TinyBooterDecompressor.bin file, it was already selected. Gullible me: I thought by un-installing all the 4.1 SDKs etc. and re-installing 4.2 versions, it had selected the new version. Nope -- it was showing me the 4.1 version I had compiled yesterday, deep in the hierarchy of the 4.1 Porting Kit output directories (which uninstalling doesn't remove). Turkey!

I flashed the new version downloaded with the 4.2.0.1 firmware using SAM-BA. Now I can deploy the firmware, and it pings -- TinyCLR. Yah!

Howie



#36894 Netduino Plus 1 Firmware v4.2.0 (update 1)

Posted by Howie Goodell on 09 October 2012 - 06:51 PM in Netduino Plus 2 (and Netduino Plus 1)

Version: 4.2.0 Update 1 (version 4.2.0.1)

This firmware requires use of the .NET Micro Framework v4.2 SDK (QFE2) and Netduino 4.2.0.1 SDK.
...
To flash this firmware:
1. Detach your Netduino
2. Press and hold your Netduino's pushbutton while plugging it in via USB; this will put it in TinyBooter mode.
3. Flash TinyCLR using MFDeploy v4.2+
a. Click "Browse..." and select the TinyCLR files (ER_CONFIG and ER_FLASH).
b. Press "Deploy". It will take a few minutes to update your Netduino.
c. Detach and reattach your Netduino (power cycle)

...
Enjoy, and please let us know if you run into any troubles.

Chris


Hi Chris,

I finally am trying to upgrade my Netduino plus to this version, after encountering various problems trying to compile and deploy the 4.1.0.6 firmware. I installed TinyBooterDecompressor
http://wiki.netduino...ep-by-step.ashx
and tried 5x to download this firmware
NetduinoPlus_Firmware_4.2.0.1\tinyclr.hex\ER_FLASH and ER_CONFIG
following the instructions at
http://wiki.netduino...ep-by-step.ashx
Usually I first hit Erase for the Deployment and User Storage; once I also erased Firmware. Repeatedly disconnected and reconnected with the button down.

Each time, near the end of the progress bar to deploy ER_FLASH, I get a pop-up:
"Error: Unable to deploy to device"
Power cycle: comes back to Tiny Booter.

I didn't see exactly this problem in other forum posts. Anybody else have it?

Howie



#36785 4.1: SerialPort.dll System.ArgumentException

Posted by Howie Goodell on 08 October 2012 - 05:29 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi --

Just a minor point: trying to compile 4.1 firmware using the ARM RVDS compiler -- by coincidence that's also version 4.1. Unfortunately, the set_context scripts only support RVDS4.0. Here's an attempt to add an RVDS4.1 target, but I'm not sure it's correct. The compile is still giving errors that could relate to incorrect variables OR to the fact I let ARM install to Program Files -- the quotes may be what's screwing up the batch files. Chris, any suggestions? As I promised about the serial, I'll add a wiki page explaining this -- once it's working for me.

Notes about setconf_base.cmd:
  • Comparing labels :SET_RVDS_V40_VARS and my new :SET_RVDS_V41_VARS, notice my environment has ARMCC41BIN/INC/LIB set, where the 4.0 version sets RVCT40/BIN/INC/LIB -- I assume that's a change between those ARM compiler versions.
  • There is no PK directory tools\ads_v4_1 in the PK directories to match the RVDS_EXT set here -- however, there's also no tools\ads_v4_0 (just tools\ads_v3_1); so I assume it's not needed?
  • Note I created a setenv_RVDS4.0.cmd also, but that's trivial (and you can only add one file per post).

Howie

Attached Files




#36394 4.1: SerialPort.dll System.ArgumentException

Posted by Howie Goodell on 01 October 2012 - 11:15 PM in Netduino Plus 2 (and Netduino Plus 1)


...

I will test a modified Initialize and also add functions to set the 9th bit for certain characters, etc., and contribute them back for anybody else who has similar requirements.

BTW, have you created a solution for loading unmanaged code at runtime as you suggested in this 2010-2011-2012 thread? http://forums.netdui...28-native-code/

Thanks much!
Howie


Hello again,

I'm trying to add just a half-dozen functions to do specific things with serial and other hardware; think I can get adequate speed just using C# for the overall framework. Chris, the Adeneo interop post you linked to last year seems to get me tantalizingly close:
http://adeneo-embedd...-framework.html
However, I'm still stuck in a few places.

1. Question: he suggested creating the Visual Studio project in
"PortingKit\Solutions\[Your Solution]\ManagedCode\",
-- so I just created that directory: in my case C:\MicroFrameworkPK_v4_1\Solutions\Serial9\
However, as I worked through his procedure, I found I needed to manually copy over various top-level files like dotnetmf.proj and folders like TinyCLR from another solution. I assumed the Template solution was correct, but he didn't say where they should come from. Do you think he assumes we initially created the solution with the MS SolutionManager he called "flimsy"??

2. A detail about his procedure: he says to edit the .featureproj file to point to the .pe (Portable Executable) file from the Library project -- but in VS2010 at least, there are TWO versions of .pe and other binary files, in two directories named:
bin/Debug/le and
bin/Debug/be .
Googling wasn't too helpful -- I mostly found "le" on French pages ;-) It turns out the choice matters: be is Big-Endian and le is Little-Endian. The ARM defaults to Little-Endian, (though initialization could change it, I'm sure yours doesn't). If you are using a Big-Endian processor, you also need to use Template_be as your model instead of Template, apparently.

3. A request for Chris: would it be possible to post a link to the 4.1 firmware sources again? I only see 4.2 on your Downloads page. Because I had trouble with the USB drivers for the boot re-flash that 4.2 firmware requires, I'd rather not mess with all that just to make these small changes. However, I can't create an image for 4.1 without them, unless perhaps I link to the downloaded object as someone suggested -- but I'd rather have all source.

4. Finally, just to clarify: although MFDeploy says it can do incremental downloads, I haven't found any procedure for that. I'd love to just deploy my small changes linked against the existing image, with or without GUI niceties. However, at this point I plan to link and compile the whole thing; then re-flash following this procedure in the wiki:
http://wiki.netduino...ep-by-step.ashx
If there is an incremental deployment procedure, I'll gladly add a wiki page explaining it, once someone explains it to me ;-)

Cheers!
Howie



#36020 4.1: SerialPort.dll System.ArgumentException

Posted by Howie Goodell on 26 September 2012 - 05:05 PM in Netduino Plus 2 (and Netduino Plus 1)

Hmm, it could also be the requested baud rate...or the combination of even parity with 9 data bits.

The USART code for Netduino Plus is in:
C:\MicroFrameworkPK_v4_2\DeviceCode\Targets\Native\AT91\DeviceCode\AT91_USART

If it's a setting that the microcontroller can support and we don't support it yet, that's something we can also address in an update. [Or if you make the change, please consider contributing it--and everyone can have the update.]

Chris


Hi Chris,

Here's where the exception comes from in the 4.1 code (that matches the firmware I still have on the board):

C:\MicroFrameworkPK_v4_1\DeviceCode\Targets\Native\AT91\DeviceCode\AT91_USART\ATI91_USART.cpp
in the function AT91_USART_Driver::Initialize (the version finally called by the code in the folder you mentioned in the case of the Netduino Plus's AT91 processor):

Lines 98-115:
switch(DataBits)
{
case 5:
USMR |= AT91_USART::US_CHRL_5_BITS;
break;
case 6:
USMR |= AT91_USART::US_CHRL_6_BITS;
break;
case 7:
USMR |= AT91_USART::US_CHRL_7_BITS;
break;
default: // not supported
fRet = FALSE;
//fall through for default
case 8:
USMR |= AT91_USART::US_CHRL_8_BITS;
break;
}

9 data bits will hit the default: case and return false, generating the exception I saw.

I will test a modified Initialize and also add functions to set the 9th bit for certain characters, etc., and contribute them back for anybody else who has similar requirements.

BTW, have you created a solution for loading unmanaged code at runtime as you suggested in this 2010-2011-2012 thread? http://forums.netdui...28-native-code/

Thanks much!
Howie




home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.