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.

Frank26080115's Content

There have been 5 items by Frank26080115 (Search limited from 29-March 23)


By content type

See this member's

Sort by                Order  

#52655 Custom Firmware, DFU upload not verifying right

Posted by Frank26080115 on 09 September 2013 - 04:47 AM in Netduino Plus 2 (and Netduino Plus 1)

One workaround is to just use MFDeploy to load ER_FLASH and ER_CONFIG

 

But I'd still like a real answer to my previous question.




#52562 Custom Firmware, DFU upload not verifying right

Posted by Frank26080115 on 05 September 2013 - 04:17 AM in Netduino Plus 2 (and Netduino Plus 1)

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 http://wiki.netduino...to-GCC-4-6.ashx

 

 

 

[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?




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

Posted by Frank26080115 on 25 August 2013 - 05:06 AM in Netduino Plus 2 (and Netduino Plus 1)

So... is "NetduinoSDKSource_V4.2.0SecretLabs.NETMF.Hardware.NetduinoPlusNetduinoPlusHardwareProvider.cs" meant for Netduino Plus or Plus 2? I don't see any other directories indicating "Plus 2"

 

I have a Plus 2, where should I be looking for these numbers? These files are an absolute maze.

 

EDIT: found it,

GPIO_TypeDef* port = Port(pin >> 4);and#define Port(port) ((GPIO_TypeDef *) (GPIOA_BASE + (port << 10)))inside STM32_GPIO_functions.cpp

I'm baking my native code into the firmware first and calling it using [MethodImpl(MethodImplOptions.InternalCall)]




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

Posted by Frank26080115 on 24 August 2013 - 05:37 AM in Netduino Plus 2 (and Netduino Plus 1)

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

 

 




#48251 CyaSSL

Posted by Frank26080115 on 10 April 2013 - 04:48 PM in Netduino Plus 2 (and Netduino Plus 1)

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 (http://mbed.org/user...ka/code/CyaSSL/), 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.