CW2's Content - Netduino Forums - Page 6
   
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's Content

There have been 148 items by CW2 (Search limited from 17-June 23)


By content type

See this member's


Sort by                Order  

#59902 Convert Arduino Library To Netduino

Posted by CW2 on 26 August 2014 - 06:32 AM in General Discussion

The name 'B01111110' does not exist in the current context

 

C# does not support binary literals - you'd have to either define those Bxxx constants like

 

const byte B01111110 = 0x7E;

const byte B00110000 = 0x30;

...

 

or use the hex literals directly, i.e. instead of B01111110 write 0x7E.




#59907 Convert Arduino Library To Netduino

Posted by CW2 on 26 August 2014 - 04:18 PM in General Discussion

Now I am getting a bunch of "the name ______ does not exist in the current context."

 

Well, those are Arduino library function calls and some constants - the good news is you don't need to convert that, just implement spiTransfer() function to call .NET Micro Framework SPI.Write() method and delete all pinMode(), digitalWrite() etc. calls, which are not needed (because SPI class does that internally; including the ChipSelect pin if you set it in the configuration).




#59870 Convert Arduino Library To Netduino

Posted by CW2 on 24 August 2014 - 03:15 PM in General Discussion

OK, got LedControl.cs to pass compile, except for 12 errors. They are:

Type 'Dome_Controller_Arduino_Port.LedControl' already defines a member called 'LedControl' with the same parameter types

 

You have left empty function declarations in your C# class - this is valid in C/C++, where you can have empty function declaration (in .h) and then implement in at different place (.cpp), but not allowed in C#. Delete all empty functions at the beginning of the C# file, where you have the class declaration from C++ header.




#58049 how to set external REF voltage for ADC & REF voltage min and max values

Posted by CW2 on 11 May 2014 - 05:06 PM in Netduino Plus 2 (and Netduino Plus 1)

According to STM32F405RG datasheet page 388 (table.65), It says

...

How can I set reference voltage value on the Netduino side?

 

The LQFP64 package does not have VREF pins exposed, you'd need a bigger package (e.g. LQFP100).




#57050 Adafruit Ultimate GPS with N+2. Any experiences?

Posted by CW2 on 24 March 2014 - 07:47 AM in Netduino Plus 2 (and Netduino Plus 1)

I´m pretty sure that the (my?) Netduino brings some kind of noice to it´s 3,3V and 5V outputs used to power the GPS. And this is obviously not noice from the mains voltage since the battery powered Netduino/GPS combination also behaves very strange.

 
Thanks for all the information. IMHO the other options has been ruled out and power noise is what remains. There is a switching regulator (ST1S12GR, datasheet) on board and also the microcontroller itself is source of high frequency noise, so it seems some connection is picking that up. The GPS module datasheet states "The VCC ripple must be controlled under 50 mVPP", which should be within the ST1S12GR specification (*). 
 
(*) Reference load regulation typ. 0.0025 %VO/mA, for VO = 3.3V and IO = 170 mA it is 0.0025*170 % of 3.3V = 14 mV.
 

An oscilloscope would be helpful. I´m trying to get one...


EEVblog #594 – How To Measure Power Supply Ripple & Noise  ;)




#57039 Adafruit Ultimate GPS with N+2. Any experiences?

Posted by CW2 on 23 March 2014 - 10:20 PM in Netduino Plus 2 (and Netduino Plus 1)

I taped the GPS breakout right into my roof-light powered by 3 AA batteries and not connected to the Netduino board. It got a sat fix after about 2-3 mins (rainy weather outside).

 
Was Netduino running during that time?
 

Next I used a 9V battery to power the Netduino and connected the GPS breakout to the Netduino´s 5V and GND to power it.


How far is Netduino from the GPS module?

Have you tried adding some shielding to Netduino? If not, try placing a grounded metal sheet between Netduino and the GPS module, or carefully wrap Netduino in aluminium foil and connect it to ground - but make sure it does not short out the pins on the bottom, better to place some paper or tape there.



#59616 High Resolution Quad Encoder Problem

Posted by CW2 on 08 August 2014 - 07:19 PM in General Discussion

... the Netduinos cant really depend on accurate timing.

 

They cant, but some of them (gen 2) have [hardware] timers with quadrature encoder inputs  :P




#59621 High Resolution Quad Encoder Problem

Posted by CW2 on 08 August 2014 - 08:40 PM in General Discussion

I know nothing about that. So, cant use or comment on something I do not know about. Apparently it is a secret?

 

If you are referring to quadrature encoder inputs then no, it is not a secret. It is described in the STM32 datasheet, in fact many [modern] microcontrollers have such interface. For STM32F4 there is firmware with QuadratureEncoder class by NicolasG (for FEZ Cerberus, but it should not require too much work to port it over to Netduino gen 2).




#56866 Netduino 2 Firmware v4.3.1 with GCC support

Posted by CW2 on 17 March 2014 - 12:39 PM in Beta Firmware and Drivers

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




#56874 Netduino 2 Firmware v4.3.1 with GCC support

Posted by CW2 on 17 March 2014 - 03:46 PM in Beta Firmware and Drivers

So it appears there are some more Prerequisites that should be in the top list. I've got Visual Studio 2013 Ultimate installed, and it contains Visual C++.


According to .NET Micro Framework Porting Kit 4.3 ReleaseNotes.txt "Either Visual Studio 2012 (Express edition or greater) or both .NET Framework 3.5 and Windows SDK for Windows" is required.
 
In order to get Visual Studio 2013 working, you'd have to modify setenv_base.cmd - add %VS120COMNTOOLS% to the block of conditions, or simply change the existing %VS110COMNTOOLS% to 12. However, I am not sure this would be enough, due to the MSBuild 2013 changes and several project files having incorrect and/or missing ToolsVersion attribute.




#56879 Netduino 2 Firmware v4.3.1 with GCC support

Posted by CW2 on 17 March 2014 - 04:58 PM in Beta Firmware and Drivers

Those are libraries and stubs for tools and Windows2 solution, which do not need to be rebuilt when you make changes to a particular solution (your firmware).

 

There are a few 'clean' targets, you can display them for example by launching

msbuild Solutions\Netduino2\dotnetmf.proj /t:Help 

For a 'complete clean' build, delete the build output directory

rmdir /s /q BuildOutput



#57323 Netduino 2 Firmware v4.3.1 with GCC support

Posted by CW2 on 03 April 2014 - 10:20 AM in Beta Firmware and Drivers

Don't get me wrong but can maybe also explain the advantages, why I should use that? What's the benefits or what problem is solved? Just have no clue and ask myself if I should take a look at it ;-)

 

Well, you don't have to use that (if you mean the firmware source). Adding GCC support allows you to use free GCC-based toolchains to compile the firmware - otherwise, you have to pay several thousand dollars for commercial ARM toolchains (such as Keil MDK).




#56884 Netduino 2 Firmware v4.3.1 with GCC support

Posted by CW2 on 17 March 2014 - 10:42 PM in Beta Firmware and Drivers

Well, assuming that you don't have JTAG/SWD in-circuit debugger, the options are... ...challenging  ;)

  • At first, modify the value of <OEMSystemInfoString/> in Solutions\Netduino2\Netduino2.settings - you can then verify (e.g. in MFDeploy) that the device is running your updated firmware,
  • For diagnostic output that appears in the debugger (Visual Studio or MFDeploy) use CLR_Debug::Printf(...) (#include <TinyCLR_Debugging.h> or #include <TinyCLR_Runtime.h>).
  • For low-level diagnostic output you could use hal_printf or debug_printf; it is usually better to reconfigure STDIO and DEBUG_TEXT_PORT to serial port (e.g. COM1) instead of USB (default).
  • The above functions significantly affect code timing and might not be available/should not be called in a particular context (such as interrupt handler) - there you are left with pin toggling (LED blinking, logic analyzer).



#57195 Netduino 2 Firmware v4.3.1 with GCC support

Posted by CW2 on 28 March 2014 - 11:06 PM in Beta Firmware and Drivers

One clarification please. When you say Netduino 2 only - do you mean that no support for ND Plus 2?

 

Yes, the GCC-related modifications have been made for Netduino 2 firmware only. But the most-important ones were made in the core .NET Micro Framework source code and are shared by Netduino Plus 2 firmware too - basically, adding a proper scatterfile and fixing possible GCC compiler errors in the additional libraries the Plus 2 firmware uses (network etc.) should be all that is needed to make GCC built firmware for the Plus 2.

 

Any thoughts on how to keep this work up to date as new versions of the MF and SL firmware are released over time?

 

Well, the modifications are available under Apache 2.0 license, so both Microsoft .NET Framework and Secret Labs teams can easily integrate them into their respective code  ;)  And there are always alternative ways  :P




#56876 Netduino 2 Firmware v4.3.1 with GCC support

Posted by CW2 on 17 March 2014 - 03:57 PM in Beta Firmware and Drivers

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




#56883 I2C Bus Problem - Debugging

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

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




#58446 Netduino Fritzing part

Posted by CW2 on 28 May 2014 - 06:37 AM in General Discussion

Would it be possible to add the mini-jtag for the Netduino (Plus) 2?

 
I have Netduino Go! socket (through-hole and SMD version) in my Fritzing repository, which has the same pin pitch. It should not be hard to modify the svg file to fit your needs ;)




#59997 Windows on Devices? When?

Posted by CW2 on 05 September 2014 - 06:09 AM in General Discussion

Well arduino still doesn't have RTOS, Threading or whatever...

 

Not from my own experience, as I don't use RTOS on any Arduino, but quick check reveals that ChibiOS, BeRTOS, FreeRTOS support AVR (and there is about 40 more in the Wikipedia list that mentions AVR).




#58907 Windows on Devices? When?

Posted by CW2 on 26 June 2014 - 11:31 AM in General Discussion

In the dotnetConf 2014 session New Innovations in .NET Runtime Andrew Pardoe said:
 

38:45 "It is a full x86 computer... and it boots Windows..."
...
"The IoT team is working closely with .NET team..." ... "The IoT team of course has .NET Micro Framework..." "We also work closely with IoT team to make sure that the .NET Framework will work on devices like the Intel Galileo..."




#59798 Windows on Devices? When?

Posted by CW2 on 20 August 2014 - 03:50 PM in General Discussion

Running a simple .NET console app on the Intel Galileo with Windows by Pete Brown




#59469 Windows on Devices? When?

Posted by CW2 on 30 July 2014 - 03:49 PM in General Discussion

Good news is coming.....

 

  1. ... "soon"
  2. ... "likely in the next few weeks"
  3. ... "in the coming weeks and months"
  4. ... "in the future"

:P




#59249 Beta: Visual Studio 2013 support

Posted by CW2 on 16 July 2014 - 12:35 PM in Visual Studio

I think the most recent is comment by Sal Ramirez on the official .NET Micro Framework blog (posted on 7/11/2014):
 

Yes, we are working on Visual Studio 2013 support and we should have preview bits to release to the community soon, likely in the next few weeks.




#56736 Netduino Plus 2 Firmware v4.3.1

Posted by CW2 on 10 March 2014 - 11:17 AM in Netduino Plus 2 (and Netduino Plus 1)

Finally, I succeeded compilation. TinyBooter is working. But TinyCLR doesn't. It wasn't detected on MF deploy.
 
What should I do?

 

I guess you have not set the proper cpu architecture - I think without it the compiler generates some ARM code, which is not supported on Cortex-M cores and TinyCLR is stuck in an fault handler. You'd need to add <DEVICE_TYPE>cortex-m3</DEVICE_TYPE> to Netduino2.settings; and also Microsoft.Spot.system.MDK.Targets might need some additional changes.





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.