Netduino home hardware projects downloads community

Jump to content

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


Member Since 03 Dec 2010
Offline Last Active Sep 19 2013 07:54 PM

Topics I've Started

Custom Firmware, DFU upload not verifying right

05 September 2013 - 04:17 AM

I've created an interop method that's been added to the NetduinoPlus2 firmware. It builds correctly, I have the generated binary files.


I am trying to follow the instructions from




[color=rgb(51,51,51);font-family:Verdana, Arial, Helvetica, sans-serif;]The build system will create a subtree 'BuildOutput' will contain the various build products. The firmware pieces of interest are in .BuildOutputTHUMB2GCC4.6leFLASHreleaseNetduinoPlus2bin and are   * Tinybooter.bin   * tinyclr.bin/ER_CONFIG   * tinyclr.bin/ER_FLASH[/color]

[color=rgb(51,51,51);font-family:Verdana, Arial, Helvetica, sans-serif;]Use the 'DFU File Manager' from the 'DfuSe Demo' apps, to extract a binary from a dfu, to extract the pieces of the official firmware (we only need the Tinybooter). I.e. NetduinoPlus2_Firmware_4.2.2.0_00_08000000.bin[/color]

[color=rgb(51,51,51);font-family:Verdana, Arial, Helvetica, sans-serif;]Use the 'DFU File Manager' from the 'DfuSe Demo' apps, to generate a dfu from multiple bin files. Since these are bin file, you will need to specify their location in flash. The locations to use are:   08000000 for NetduinoPlus2_Firmware_4.2.2.0_00_08000000.bin   0800c000 for ER_CONFIG   08020000 for ER_FLASH[/color]


Can somebody please rephrase that bit for me? I do not have the file "NetduinoPlus2_Firmware_4.2.2.0_00_08000000.bin" inside "BuildOutput" and I don't know what address to put "Tinybooter.bin" at.


I tried putting Tinybooter.bin at 08000000 (along with the ER_FLASH and ER_CONFIG, placed at the addresses suggested in the wiki), generated a DFU file, erased the chip using DFU Tester, and then attempted to upgrade using DfuSe Demo. I got the error that the first verification mismatch occurred at 0x0800C000. I am unsure if this is my mistake or not because this memory region is considered "config" region, and might be protected.


I have attempted to erase this config region but I got an unknown error without explaination.


After the attempted upgrade, my NetduinoPlus2 does not enumerate when plugged into the USB port, so it is not working with Visual Studio anymore. I am not panicking, because I can still access the bootloader, and I also own several J-Links and ST-Links.


What exactly is wrong? Did I build a malfunctioning firmware? Did I mess up the DFU file? Is the configuration region to blame?

How to get GPIOx address from Cpu.Pin for Interop?

24 August 2013 - 05:37 AM

I am trying to write native C++ code, used interop, to do something with a pin.


I am very familiar with STM32's internal peripherals, and I need to map Cpu.Pin to a GPIOx port address so I can manipulate the pin directly


I have downloaded and extracted everything, .net mf source code, porting kit, netduino sdk, netduino sdk source, netduino plus firmware, netduino plus firmware source, everything.


I can't find any files that reference STM32 internal peripheral registers at all. But I did find NetduinoPlusHardwareProvider, which had some code like

internal const Cpu.Pin GPIO_PIN_A_18 = (Cpu.Pin)18; // PA18/SPI0_SPCKpublic const Cpu.Pin GPIO_PIN_D13 = GPIO_PIN_A_18; // PA18/SPI0_SPCKinternal const Cpu.Pin GPIO_PIN_B_30 = (Cpu.Pin)62; // PB30/PCK2/PWM3/AD3public const Cpu.Pin GPIO_PIN_A3 = GPIO_PIN_B_30; // PB30/PCK2/PWM3/AD3

Does the Cpu.Pin numbers map to this formula?


(letter_in_alphabet_of_port - 1) * 32 + bit_number


Where for example, GPIO_PIN_D13 maps to GPIO_PIN_A_18, which means Cpu.Pin is


(1 - 1) * 32 + 18 = 18


and GPIO_PIN_B_30 is


(2 - 1) * 32 + 30 = 62


Am I right? From this, I might be able to calculate the addresses of the registers I need to manipulate, right?


Where is native interop support anyways? You talked about it in 2011 and mentioned it should be supported in firmware v4.2 but I haven't heard about it since...




10 April 2013 - 04:48 PM

I am interested in using SSL with the Netduino Plus 2. I have done some research and apparently OpenSSL is too big for the Netduino. But I have also found CyaSSL, which claims to be a SSL library designed specifically for small embedded platforms. Supposedly, it uses 100kB of flash and 50kB of RAM at most.


CyaSSL has already been ported to mbed (, so Netduino Plus has some competition in this area.


I would like to see CyaSSL ported to .NET MF or built into the firmware


Of course, it'll be easier to code with FreeRTOS since it'll be much easier to add in CyaSSL since it's C, but I want to see if I can stick with .NET MF first.


I did look at the firmware source code and I can make guesses as to where to place the CyaSSL files (probably something like "netduino2firmwareDeviceCodepalcyassl", right?). But I am not sure on how to create a class similar to System.Net.Socket that interops with the CyaSSL C code.


There are other ways of doing this, I can just merge it into lwIP__Sockets.cpp itself, but it'll feel like a dirty hack.


I can also just do application layer security instead of transport layer, but that feels dirty as well and takes more work on the server.

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.