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.
Photo

Netduino Firmware v4.1.1 ALPHA 1


  • This topic is locked This topic is locked
44 replies to this topic

#1 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 02 September 2010 - 05:59 PM

[replaced by Netduino v4.1.1.0 Alpha 2 firmware]

#2 Bob Cravens

Bob Cravens

    Member

  • Members
  • PipPip
  • 17 posts

Posted 02 September 2010 - 07:13 PM

I followed the instructions above. Then I tried to debug an existing app (one that was working before the update). The debugger starts and I can see Debug.Print lines in the Output window. Then about 10-15 seconds in it exits with the following: Incrementally deploying assemblies to device Deploying assemblies for a total size of 20872 bytes Assemblies successfully deployed to device. The debugging target and the debugger engine failed to initialize because of unspecified device errors. The debugger engine thread has terminated unexpectedly with error 'Could not reconnect to the debugging target after rebooting it.'. If you have questions, please let me know. Bob (bob.cravens at gmail.com)

#3 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 02 September 2010 - 07:19 PM

If you have questions, please let me know.


Hi Bob,

Thanks for testing this, and for the quick feedback...

Three questions:
1. Are you using the original .NET MF 4.1 SDK or the new "QFE1" one?
2. Are you running inside a virtual machine (Parallels/VMWare/VirtualBox) or in a native Windows install?
3. Were you running the v4.1.0.3 alpha firmware before?

Chris

P.S. You can switch back to the production v4.1.0.2 firmware without issue if you need to.

#4 Bob Cravens

Bob Cravens

    Member

  • Members
  • PipPip
  • 17 posts

Posted 02 September 2010 - 09:45 PM

Hi Chris, 1. I assume the original. Is there a way to tell? 2. I am running in a VM (parallels). 3. I was previously running the v4.1.0.2 firmware. It appears to me that the bits are being deployed. I still see the LED indicators working on the board. It looks to me like the debugger just detaches at some point. Bob

#5 Bob Cravens

Bob Cravens

    Member

  • Members
  • PipPip
  • 17 posts

Posted 02 September 2010 - 09:59 PM

After further testing...the bits are not getting deployed. I added a few Debug.Print statements at the top of the code, just to check and I am not seeing those in the Output window. Bob

#6 Bob Cravens

Bob Cravens

    Member

  • Members
  • PipPip
  • 17 posts

Posted 02 September 2010 - 10:06 PM

Sorry for using the board like twitter. I am did find that the code is being deployed. I wrote the following:


string root = "SD_Card";
StorageDevice.MountSD(root, SPI.SPI_module.SPI1, Cpu.Pin.GPIO_Pin12);

string path = Path.Combine(root, "test.txt");
string content = "This is a test";
byte[] bytes = System.Text.Encoding.UTF8.GetBytes(content);
File.WriteAllBytes(path, bytes);



Sure enough, a file named "text.txt" with the content "This is a test" was on the SD card. It appears to me that this is only an issue with the debugger connecting to the device.

I am using the GPS Shield from the ladyada site. It has a 2GB SD card. This is looking very easy to use. Thanks!

Bob

#7 Caffeine

Caffeine

    Member

  • Members
  • PipPip
  • 22 posts
  • LocationSydney, Australia

Posted 03 September 2010 - 01:43 AM

Does this allow us to use cards greater than 2GB?

I have a microSD card shield from Sparkfun (http://www.sparkfun....roducts_id=9802) and a Sandisk 8GB microSD card and the code shown by Bob doesn't appear to work.

Further to that, after deploying the following code, the LED doesn't flash (as per the while loop) and I have to use MFDeploy to erase the code before it will allow me to deploy or debug again.

using System;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using System.IO;
using SecretLabs.NETMF.IO;
using SecretLabs.NETMF.Hardware;
using SecretLabs.NETMF.Hardware.Netduino;

namespace SDTest
{
    public class Program
    {
        static OutputPort LED = new OutputPort(Pins.ONBOARD_LED, false);
        static bool LEDstate = false;

        public static void Main()
        {
            string root = "SD_Card";
            StorageDevice.MountSD(root, SPI.SPI_module.SPI1, Cpu.Pin.GPIO_Pin12);

            string path = Path.Combine(root, "test.txt");
            string content = "This is a test";
            byte[] bytes = System.Text.Encoding.UTF8.GetBytes(content);
            File.WriteAllBytes(path, bytes);

            while (true)
            {
                LED.Write(LEDstate = !LEDstate);
                Thread.Sleep(100); 
            }
        }
    }
}

When debugging, the 'StorageDevice,MountSD' line is reached and the debugger exits.

Using the 4.1.1.0 Alpha firmware linked above, and the references are added to VS2010 correctly.

Strange indeed... I'll see if anyone here has a microSD card smaller than 2GB.

#8 amphibian

amphibian

    Member

  • Members
  • PipPip
  • 16 posts

Posted 03 September 2010 - 03:07 AM

I have a microSD card shield from Sparkfun (http://www.sparkfun....roducts_id=9802) and a Sandisk 8GB microSD card and the code shown by Bob doesn't appear to work.


No, it doesn't support SDHC, so nothing over 2gb.

MicroSD is tricky, I've been reading the specs lately. All the other SD standards mandate SPI support, but Micro does not, so it might be hit or miss with getting micro cards working. Probably going to vary by make/model.

#9 amphibian

amphibian

    Member

  • Members
  • PipPip
  • 16 posts

Posted 03 September 2010 - 03:20 AM

I can confirm that I can run the sample sd card code (provided in the other thread) on the seeedstudio sd card shield. I tested it with the switch in the "3.3v" position.

Haven't had much chance to try anything beyond the sample code though.

I was unable to debug this firmware on my mac running parallels 5 + windows 7 64bit. When I tried to debug it would just reboot the netduino and stop. I had this issue with the shipped firmware, as well as the beta firmware, so it's not new. I'll just stick to pure windows for now i guess.

#10 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 03 September 2010 - 04:21 AM

The SD over SPI built into .NET Micro Framework supports SD, but not SDHC. We're looking at ways to expand this to SDHC in future revisions--but v4.1.1 will be SD only. We've had really good luck with most cards that are 2GB or smaller. The SanDisk and Kingston ones we have in the lab work well in particular. Chris

#11 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 03 September 2010 - 04:25 AM

I have a microSD card shield from Sparkfun (http://www.sparkfun....roducts_id=9802) and a Sandisk 8GB microSD card and the code shown by Bob doesn't appear to work.

Further to that, after deploying the following code, the LED doesn't flash (as per the while loop) and I have to use MFDeploy to erase the code before it will allow me to deploy or debug again.


If you try to mount a card that .NET Micro Framework doesn't support, .NET MF may throw an exception or lock up. Exceptions are good; the locking up is something we're seeing if we can fix and contribute back to the .NET MF codebase.

If this happens to you:
1. Unplug your Netduino from USB and any other power source.
2. Start the MFDeploy program on your PC (Start Menu > Programs > .NET Micro Framework 4.1 > Tools > MFDeploy.exe)
3. Select the USB transport in MFDeploy (instead of the default Serial)
4. Hold the pushbutton on your Netduino down and plug it into your computer while still holding down the button. This will put you in "bootloader" mode
5. Press the ERASE button in MFDeploy to erase your Netduino app.

In theory, just taking out the SD card should fix the situation too--but if it doesn't you can always fall back on the bootloader to erase your Netduino app.

Chris

#12 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 03 September 2010 - 04:26 AM

I can confirm that I can run the sample sd card code (provided in the other thread) on the seeedstudio sd card shield. I tested it with the switch in the "3.3v" position.


Woot! Great--another supported SD shield.

I was unable to debug this firmware on my mac running parallels 5 + windows 7 64bit. When I tried to debug it would just reboot the netduino and stop. I had this issue with the shipped firmware, as well as the beta firmware, so it's not new. I'll just stick to pure windows for now i guess.


Parallels seems to work well for some users--but a few are having this issue. It looks like something that needs to be solved within the .NET MF SDK itself--so we're trying to track down a mac we can borrow so we can fix the issue :) Unfortunately, the regular builds work great inside Parallels on our Macs...

Chris

#13 Caffeine

Caffeine

    Member

  • Members
  • PipPip
  • 22 posts
  • LocationSydney, Australia

Posted 03 September 2010 - 07:28 AM

If you try to mount a card that .NET Micro Framework doesn't support, .NET MF may throw an exception or lock up. Exceptions are good; the locking up is something we're seeing if we can fix and contribute back to the .NET MF codebase.


Ahh that would explain some of my symptoms then. I should be able to try it tonight with a 128MB microSD card.

The SparkFun MicroSD shield uses pin D8 for CS, will that need an update to the firmware or should it work with it hardcoded to D10?

#14 Caffeine

Caffeine

    Member

  • Members
  • PipPip
  • 22 posts
  • LocationSydney, Australia

Posted 03 September 2010 - 07:37 AM

Ahh that would explain some of my symptoms then. I should be able to try it tonight with a 128MB microSD card.

The SparkFun MicroSD shield uses pin D8 for CS, will that need an update to the firmware or should it work with it hardcoded to D10?


Got it working as per this post :)

Excellent!

#15 greg

greg

    Advanced Member

  • Members
  • PipPipPip
  • 169 posts
  • LocationChicago, IL

Posted 03 September 2010 - 11:36 AM

Woot! Great--another supported SD shield.



Parallels seems to work well for some users--but a few are having this issue. It looks like something that needs to be solved within the .NET MF SDK itself--so we're trying to track down a mac we can borrow so we can fix the issue :) Unfortunately, the regular builds work great inside Parallels on our Macs...

Chris


I'd let you come use my MacPro but you have to come to Chicago for it - I'm not shipping it! :P

#16 Bob Cravens

Bob Cravens

    Member

  • Members
  • PipPip
  • 17 posts

Posted 03 September 2010 - 05:12 PM

After a bit more playing around (with out a debugger), it seems like the following are true: 1. I was not able to "append" to a file. 2. "Flushing" a stream does not seem to work. 3. After about 15-18 seconds the debugger detaches and the board appears to hang. 4. If the stream is not closed the file does not appear. I think this is normal, but without the ability to flush I am not able to get persistent data. I am trying to open a stream at the beginning of the application and use it throughout. After every write, I was calling flush. This does not appear to be possible with this alpha version. Sorry for not providing more concrete information. Bob

#17 ajcg1973

ajcg1973

    Advanced Member

  • Members
  • PipPipPip
  • 71 posts

Posted 04 September 2010 - 02:30 AM

Version: 4.1.1 ALPHA 1 (version 4.1.1.0 a1)

WARNING: This firmware is pre-release firmware. It may temporarily cause your Netduino to cease functioning properly. If this firmware does not work for you, you will likely need to erase your Netduino completely and re-flash the production v4.1.0.2 bootloader using Atmel SAM-BA tools (on a 32-bit Windows installation) and the production v4.1.0.2 firmware using MFDeploy.

With that warning out of the way, we've added the first new feature to the Netduino: SD card and FAT16/FAT32 file system support. We have also added some debugger enhancements to help with debugger reconnections during deployment.

If you're an early adopter and would like to help us test and refine this new feature, this alpha release may be for you.

This firmware update includes the following updates:
1. SD card support using SPI
2. Visual Studio debugger should connect to Netduino easier during deployment (on non-virtual machines)

You may update to this pre-release firmware using the MFDeploy tool:
1. Download and unzip the attached file to a directory on your computer.
2. Go to the Start Menu > Programs > Microsoft .NET Micro Framework 4.1 > Tools
3. Run MFDeploy.exe. Be careful to run MFDeploy.exe and not MFDeploy.exe.config (as file extensions are hidden by default)
4. Plug your Netduino into your PC using a Micro USB cable. If your Netduino does not connect successfully, try plugging the USB cable into your Netduino first...and then your PC.
5. In the Device section at top, select USB instead of Serial. Your Netduino should appear in the drop-down; if not, select it.
6. Click "Browse..." and select the unzipped files from step #1 (ER_CONFIG and ER_FLASH).
7. Press "Deploy". It will take a few minutes to update your Netduino.

ASSEMBLY NOTE: You will need to manually add the SecretLabs.NETMF.IO assembly as a reference in your project to use the SD feature. You will also need to add the System.IO assembly.

Please let us know if this:
[a] works with your SD card
[b] reduces/eliminates any "could not reboot Netduino" messages in Visual Studio
[c] causes any other errors

Also, please note that some VMs may lose their connection to the Netduino when it reboots. If your VM loses its connection to the Netduino during deployment, it will give you an error that the debugger failed to connect. If this happens to you, please let us know in this thread.

Chris


I'm not sure what you guys did differently with this build but it is the most stable with respect to debugging than any other release that I have been able to try. I initially thought that the 4.1.0.3 Alpha was a great step towards fixing my debug errors ("There was a problem with the hardware", "Rebooting device..." (which doesn't seem to go away until I unplug the Netduino)). It was much better with 4.1.0.3 but with the new 4.1.1 Alpha 1 release. I'm able to stop and restart a debugging session without fail. I'm also able to compile with Visual Studio and go to MFDeploy and connect to the device and actually see the Debug.Print statements in the output window. I have not seen any issues or differences with my existing code. Thank you, thank you, thank you!!

PS I'm using Win 7 Ultimate x64, Visual Studio 2010 Ultimate, .Net MF 4.1 QFE 1 and now the v4.1.1 Alpha 1 firmware all without being in a virtual environment.

#18 Bob Cravens

Bob Cravens

    Member

  • Members
  • PipPip
  • 17 posts

Posted 05 September 2010 - 09:02 PM

I tried this alpha release on my Win7 (32 bit) netbook and everything I have tried works. The code is deployed, the debugger attaches, break points work, the .flush does work, and files are being generated. It appears that my main setup Win7 (64 bit) running in Parallels on a Mac is causing the above issues. Looks like you guys have a good reason to buy a MBP ;-) Bob

#19 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 05 September 2010 - 09:10 PM

Looks like you guys have a good reason to buy a MBP ;-)


Which MacBook Pro are you using? We have an aluminum MacBook here which we use for testing...

#20 Bob Cravens

Bob Cravens

    Member

  • Members
  • PipPip
  • 17 posts

Posted 05 September 2010 - 09:20 PM

I have a a 15'' MBP with 8GB RAM 2.66GHz Intel Core i7 8GB 1066MHz DDR3 SDRAM - 2x4GB 500GB Serial ATA Drive @ 7200 rpm SuperDrive 8x (DVD±R DL/DVD±RW/CD-RW) MacBook Pro 15-inch Hi-Res Glossy Widescreen Display Backlit Keyboard (English) & User's Guide I am running Parallels 5.0.9370 with Windows 7 64 bit. Bob




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

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.