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.

CW2

Member Since 04 Aug 2010
Offline Last Active Private
*****

#61573 How to compile the firmware without networking support (plus 2)

Posted by CW2 on 09 February 2015 - 11:42 AM

Alternatively, you could simply build and flash Netduino 2 firmware on your Netduino Plus 2 board.




#60406 Tic Toc

Posted by CW2 on 13 October 2014 - 04:48 PM

I have seen it in the other forum. Impressive, to say the least! Hats off to the electronics team  :P




#60257 Help! I've accidentally bricked my brand-new Netduino 1 when updating...

Posted by CW2 on 27 September 2014 - 09:01 PM

What guide are you following? ST tools do not work with Netduino 1, you have to use Atmel SAM-BA.




#59770 Small update from the .net MF team

Posted by CW2 on 18 August 2014 - 07:51 PM

Fingers crossed  :P




#59395 Netduino Unique ID

Posted by CW2 on 25 July 2014 - 02:04 PM

Yes, that's right - the EEPROM can be changed that way. There is no exact equivalent of the microcontroller Unique ID feature (which cannot be changed, because it is in ROM), so you'd have to use modified firmware.




#57969 Commercial Product using Netduino - not competitive

Posted by CW2 on 06 May 2014 - 04:31 PM

Well, you cannot really compare a $5 PIC with a STM32F Cortex microcontroller - which costs ~$10 - $20 in single quantities, depending on the model and variant. So, you'd need to select an appropriate microcontroller, there are many of them even in STM families and then reduce cost by mass production - but we are talking hundred of thousands here and even then you'd probably have hard time to meet your $10 goal. For example, Netduino 2's STM32F205RFT6 costs ~$7 in 1000 quantity, plus crystal, passives, other components, PCB, assembly, testing etc...




#57392 Adding to Cpu.Pin enumeration

Posted by CW2 on 07 April 2014 - 06:46 AM

You can access those pins via Cpu.Pin enumeration - the ports are treated as consecutive array of pins, so PA is 0 .. 15, PB 16 .. 31, PC 32 .. 47 etc.:

var pa4 = (Cpu.Pin)( 0 + 4);
var pb1 = (Cpu.Pin)(16 + 1);
var pc0 = (Cpu.Pin)(16 + 0);
var pc8 = (Cpu.Pin)(32 + 8);



#57035 Interrupt Port and Input Port Read Values are Wrong on First Interrupt.

Posted by CW2 on 23 March 2014 - 08:44 PM

I have not tried to reproduce the behavior, but there is one fundamental issue with using port.Read() in the interrupt handler: because the interrupts are queued, the handler is executed after a certain period of time, thus port.Read() returns the port state at the time the interrupt handler is being executed, not when the interrupt occurred. This can cause incorrect results, especially when the pulse duration or frequency is close to execution time of the interrupt handler (managed code).

 

I guess a better way is to use two interrupt ports, both set up for falling and rising edge (InterruptEdgeBoth) and use the handler parameters data1 (port number), data2 (port state, 1/0) and timestamp in a state machine (you can reuse one xxx_OnInterrupt handler).




#56883 I2C Bus Problem - Debugging

Posted by CW2 on 17 March 2014 - 10:13 PM

That file lives in two places:

C:\MicroFrameworkPK_v4_3\DeviceCode\Targets\Native\Netduino_STM32\DeviceCode\STM32_I2C\STM32_i2c_functions.cpp

and

C:\MicroFrameworkPK_v4_3\DeviceCode\Targets\Native\STM32\DeviceCode\STM32_I2C\STM32_i2c_functions.cpp

 

(I modified both)

 

For Netduino 2 you need to modify only files in Targets\Native\Netduino_STM32. The STM32 folder contains the original Oberon's implementation, which is not used - Netduino_STM32 is basically STM32 + Secret Labs' modifications.

 

In fact, you could delete all subdirectories in Targets\Native and Solutions that do not have Netduino,Template or Windows in their name - I usually do that to reduce code search result noise...




#56876 Netduino 2 Firmware v4.3.1 with GCC support

Posted by CW2 on 17 March 2014 - 03:57 PM

Does this affect the Netduino build? Do I need to install .Net2.0 framework?

 

No, you can safely ignore this warning. IIRC it is caused by incorrect ToolsVersion attribute value in a few project files, which causes MSBuild 3.5 to be run, instead of 4.0. I have already fixed such issues, but in separate 'cleanup' branch, which will be integrated into a future release...




#56866 Netduino 2 Firmware v4.3.1 with GCC support

Posted by CW2 on 17 March 2014 - 12:39 PM

Prerequisites

 

How to build the firmware with GCC

  • Install GCC, preferably to short path with no spaces, e.g. C:\GCC
  • Install .NET Micro Framework Porting Kit 4.3 QFE1 (C:\MicroFrameworkPK_v4_3)
  • Copy C:\MicroFrameworkPK_v4_3 to C:\Netduino2
  • Extract Netduino 2 Firmware v4.3.1 source to C:\Netduino2, overwrite all
  • Extract Netduino 2 Firmware v4.3.1 source for GCC to C:\Netduino2, overwrite all
  • Launch cmd.exe
    cd \Netduino2
    setenv_gcc 4.8.3 C:\GCC
    msbuild Solutions\Netduino2\dotnetmf.proj /p:Flavor=Release /v:m
    
  • The build should succeed, with a few warnings
  • Extract NetduinoUpdate_4.3.1.0.zip (C:\NetduinoUpdate_4.3.1.0)
  • Copy the firmware image C:\Netduino2\BuildOutput\THUMB2\GCC4.8\le\FLASH\release\Netduino2\bin\tinyclr.hex\ER_FLASH to C:\NetduinoUpdate_4.3.1.0\Firmware\Netduino2_4_3_1_0\ER_FLASH.s19 (rename - add extension)
  • Open ER_FLASH.s19 in you favorite text editor and delete the first line (starts with S0), save.
  • Launch NetduinoUpdate.exe, plug in your Netduino 2 and update the firmware.

 

Important notes

  • GCC support added and verified only for Netduino 2 (mainly due to resource/time constraints),
  • Other GCC toolchains might work or need only minor changes, but make sure they have support for long-long and long-double (IIRC Yagarto does not have it by default) - otherwise formatted string output for C# long and double does not work,
  • Included are a few bug fixes and modifications from my NETMF Fork project (which will be released probably later this year):
    • Fixed MMP : error MMP0000: 0x80131700 (#221, #2202),
    • Fixed GCC compiler errors in BitConverter.cpp (#2216),
    • Added ABORTS_REDUCESIZE symbol to exclude interactive debugging code (#1908),
    • Added support for recent Keil MDK-ARM toolchain (#1795)

 

Attached Files

 

Edit 2014-03-18 19:30 UTC: Added Visual Studio to prerequisite list




#56639 ND1 - Input is always TRUE

Posted by CW2 on 05 March 2014 - 11:45 AM

Quiz question: What return value do you expect from an unconnected input pin?

 

The thing is that you created input pin with ResistorMode.PullUp, which means the pin is in logic high (returns true), unless it is connected to other logic level (logic low, ground). Thus, if you want your input pin Read() method to return false, you have to wire the pin to GND.

 

If you use a port in output mode, its Read() method basically just returns the current state - i.e. the initial state passed via constructor parameter or what was set in the last call of Write() method.




#56625 Source Control for Porting Kit and netduino

Posted by CW2 on 04 March 2014 - 04:41 PM

There are certainly more ways how to do it, based on personal preferences and development workflow, but you'd probably need to set up a few branches - I usually use something like this: 
master  O-- ...                                                         --[My 1.0]...
         \                                                                   ^
netmf     \--[NETMF4.3]--[NETMF4.3QFE1] ... [NETMF vNext]                   /
                                \                        \  (merge)        /
netduino                         \--[SL 4.3.1] ...    [SL vNext]...       /
                                          \                              /     
my-netduino-changes                        \[Change #1]--[Change #2]... /
This allows me to have complete reference of the official .NET Micro Framework codebase (it would be easier if the Microsoft team decided to use git on CodePlex) and also vendor firmware releases. Every new release is simply added to the appropriate branch, then you can decide what changes will be merged where, if at all. Similarly, development of modifications (features, bug fixes, whatever) happens in a dedicated branch and the finished work will be merged where needed - although it might sound a little bit complicated at first, it is actually very easy to do, especially in git.


#56577 Compiling Custom Netduino Firmware: Step-By-Step Instructions - Help

Posted by CW2 on 02 March 2014 - 12:40 PM

EDIT: the first error seems to happen when building TinyBooter, it says the target CPU doesn't support ARM mode

 
The Cortex-M is not supported in the build files, you'd have to add appropriate -mcpu directive in the Microsoft.Spot.System.GCC.Targets file; plus a few other changes. The easiest way is to download Microsoft.Spot.system.gcc.targets from NicolasG's repository, copy it into \Tools\Targets directory (overwrite the existing one).
 
However, you'll get several other errors, some were introduced in BitConverter.cpp, also there are missing GCC scatterfiles in Netduino2 solutions, which are mandatory for the linker.
 
I am now working on fixing GCC support for Netduino2 solutions, I'll publish the source code with detailed instructions when it's done.


#55955 .NET MF 4.3 QFE1 RTM

Posted by CW2 on 09 February 2014 - 08:35 AM

Just spotted...
https://netmf.codepl...ses/view/118283
  • Work Item: 1874 - Interop compilation fail for project name with dot ('.')
  • Work Item: 509 - Add BitConverter
  • Work Item: 1951 - StringBuilder.Replace Exception
  • Work Item: 2012 - StringBuilder.Replace previous bug resurfaced again
  • Work Item: 1784 - Array.BinarySearch() not accepting null comparer
  • Work Item: 1855 - SDK Installer for 4.3 shows incorrect error message
  • Work Item: 1400 - URI parsing fails when :XX sequence appears and no explicit port is used
  • Work Item: 1738 - var uri = new Uri(value) throws exception if value contains a whitespace at the beginning
  • Work Item: 1904 - System.Uri does not work with "ws" scheme





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.