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

To compile the source code with .net mf 4.1 for netduino plus


  • Please log in to reply
25 replies to this topic

#21 yiulsup

yiulsup

    Advanced Member

  • Members
  • PipPipPip
  • 34 posts

Posted 31 July 2012 - 07:32 AM

To Nak i have below after compiling the ND+ with your advice when ocurring error for executing application. TinyBooterDecompressor.bin : 42KB TinyBooterDecompressor.hex : 124KB ER_CONFIG : 7KB ER_FLASH : 1,047KB const BlockRange g_SAM7X_BS_BlockRange[] = { // { BlockRange::BLOCKTYPE_BOOTSTRAP , 0, 8 }, { MEMORY_BLOCKTYPE_GCC_SPECIAL_BOOTSTRAP, 9, 52 }, { BlockRange::BLOCKTYPE_CODE , 53, 58 }, { MEMORY_BLOCKTYPE_GCC_SPECIAL_CODE , 59, 59 }, { BlockRange::BLOCKTYPE_DEPLOYMENT , 60, 60 }, { BlockRange::BLOCKTYPE_STORAGE_A , 61, 61 }, { BlockRange::BLOCKTYPE_STORAGE_B , 62, 62 }, { BlockRange::BLOCKTYPE_CONFIG , 63, 63 } }; <!-- ################################################################################ --> <!-- 16KB Stack and 16KB Heap --> <Set Name="Heap_Begin" Value="0x00010000"/> <Set Name="Heap_End" Value="0x00017ff8"/> <Set Name="Stack_Bottom" Value="0x00018000"/> <Set Name="Stack_Top" Value="0x0001FFF8"/> <If Name="TARGETLOCATION" In="FLASH"> <Set Name="Code_BaseAddress" Value="0x00112000"/> <Set Name="Deploy_BaseAddress" Value="0x00176000"/> <Set Name="Code_Size" Value="%Deploy_BaseAddress - Code_BaseAddress%"/> <Set Name="Config_BaseAddress" Value="0x0017E000"/> <Set Name="Config_Size" Value="0x00002000"/> <Set Name="Valid" Value="true"/> </If> <!-- ################################################################################ --> <Set Name="Stack_Bottom" Value="0x00018000"/> <Set Name="Stack_Top" Value="0x0001FFF8"/> <If Name="TARGETLOCATION" In="FLASH"> <!-- MOTE2 has 32MB of 16-bit FLASH at 0x00000000 --> <Set Name="Code_BaseAddress" Value="0x00100000"/> <Set Name="Code_Size" Value="0x00014000"/> <Set Name="Valid" Value="true"/> Kevin

#22 yiulsup

yiulsup

    Advanced Member

  • Members
  • PipPipPip
  • 34 posts

Posted 07 August 2012 - 03:56 AM

I compiled the netduino plus firmware with rvds 4.1, .net mf 4.1, .net mf porting kit 4.1, and netduino plus firmware source 4.1.0.6. Without any error in compiling, the compiler built the binary code for netduino plus 4.1 such as ER_FLASH and ER_CONFIG. To my disappointing, the netduino plus board didn't work after deploying ER_FLASH and ER_CONFIG. In my thinking, the fusing on flash was good without error message. My modification included the followings in compilation. 1. Microsoft.Spot.system.rvds. 2. platform_selector.h 3. lwip_selector.h Thanks. Kevin

#23 CW2

CW2

    Advanced Member

  • Members
  • PipPipPip
  • 1592 posts
  • LocationCzech Republic

Posted 07 August 2012 - 07:05 AM

To my disappointing, the netduino plus board didn't work after deploying ER_FLASH and ER_CONFIG.

Have you flashed TinyBooterDecompressor.bin (via SAM-BA) first? If you use default bootloader, it searches for the runtime at wrong location. What is the output of MFDeploy command "Flash Sector Map" in bootloader mode?

#24 yiulsup

yiulsup

    Advanced Member

  • Members
  • PipPipPip
  • 34 posts

Posted 08 August 2012 - 07:10 AM

To Advanced Member. With lucky to download the rvds 4.0 compiler from ARM distributor in S. Korea for evaluation, i could compile the netduino plus 4.1.0.6 with rvds 4.0 compiler. Using the binary code which was generated with compilation, i could make the netduino board work well without stop in booting up or deployment. Also I checked the led on/off with c# programming and server/client ethernet connection. Thanks. Kevin.

#25 Howie Goodell

Howie Goodell

    Member

  • Members
  • PipPip
  • 28 posts

Posted 10 October 2012 - 04:59 PM

Hi Nak.

1. .Net Micro Framework SDK 4.1 (QFE1)
2. .Net Micro Framework Porting Kit 4.1 (QFE1)
3. ND+ Firmware 4.1.0.6
4. setenv_RVDS4.0.cmd c:\rvds
5. 1st compilation with error which cann't execute command \armcc.exe, which was corrected by deleting letter \ in C:\MicroFrameworkPK_v4_1\tools\targets\Microsoft.SPOT.System.RVDS.targets
6. "C:\MicroFrameworkPK_v4_1\DeviceCode\include\..\Initialization\MasterConfig.h", line 12: Error: #5: cannot open source input file "platform_selector.h": No such file or directory is error for my compilation.
above is also corrected with copying platform_selector.h to the C:\MicroFrameworkPK_v4_1\DeviceCode\include\..\Initialization.
7. Fuse the bootloader on Flash
8. Fuse the .net mf on Flash. No execution in deployment. Error.

Kevin.


Hi Kevin,

I am also trying to compile interop native code changes. Last week I tried to do something similar to what you describe: compile 4.1.0.6 firmware using ARM RVDS 4.1, with similar result: after download, the Netduino Plus was never recognized, and I needed to start again with hard reset and loading TinyBooterDecompressor.

Yesterday I gave up on 4.1 and upgraded to all 4.2 (MF SDK, Porting Kit, Netduino SDK and Netduino firmware). One point I noticed was that the 4.2 Micro Framework SDK "New behavior" includes:
6) Support for RVDS 4.1
-- lack of this support may explain our inability to generate a working configuration on SDK 4.1.

Now I can compile and deploy the Netduino 4.2 sources from the download page http://www.netduino.com/downloads/ . This is the procedure that worked for me; change to fit your config:

One-time upgrade:
  • (Ensure you have an ARM compiler; I did the 1-month trial of ARM RVDS to avoid issues with code size initially. Note I let it compile at the default C:\Program Files; probably less problematic to use a directory with no spaces in the name. Also use your disk and not network card for the license -- my network config changed on my company laptop and the compiles stopped working; good chance of at least a day delay getting support from England.)
  • Download and install/upgrade to the 4.2 environment as described in the pinned forum post http://forums.netdui...-v420-update-1/ .
  • Download and deploy the new firmware on your Netduino Plus (or whatever) as described at http://wiki.netduino...ep-by-step.ashx -- just to verify the precompiled 4.2 has no issues before you try your own version.
  • For Interop, you also need to download and install the 4.2 Porting Kit (under "Other Available Downloads" at http://netmf.codeple...ases/view/91594 )
  • (Optional: source-control the directory to keep track of SecretLabs and your changes. In my case, git init, git add *, git commit -m"Initial download" -- available at http://git-scm.com/downloads .)
  • Download and unzip the Netduino 4.2 sources from the download page http://www.netduino.com/downloads/ . Copy to the root of the 4.2 Porting Kit; i.e. C:\MicroFrameworkPK_v4_2\ and overwrite all conflicts. (See why I wanted version control?)
  • From a command window (I ran as admin; not sure if needed), initialize your msbuild by typing:
  • setenv_rvds.cmd 4.1 "C:\Program Files\ARM"
  • msbuild dotNetMF.proj >logs\dotNetMF.log
(Note I created a "logs" directory and do all my output to log files there -- consider doing the same unless you are a
very fast reader ;)
Every time:
  • setenv_rvds.cmd 4.1 "C:\Program Files\ARM"
  • msbuild solutions\NetduinoPlus\dotnetmf.proj /p:flavor=release;tcp_ip_stack=lwip /t:rebuild >logs\np20121010_1.log
  • View output to ensure no errors -- I use Chrome: file:///C:/MicroFrameworkPK_v4_2/logs/np20121010_1.log
  • Restart N+ into TinyBooter (reconnect USB/power while holding button down)
  • Start MFDeploy and follow the instructions at http://wiki.netduino...ep-by-step.ashx to deploy the two hex files created by your compile from the Platform Kit output directory: in my case C:\MicroFrameworkPK_v4_2\BuildOutput\THUMB\RVDS4.1\le\FLASH\release\NetduinoPlus\bin\tinyclr.hex
  • Unplug and reconnect the Netduino and view the config with MFDeploy.
  • Close MFDeploy and open Visual Studio etc. to verify your C# projects compile.

Let me know if these work; I'll make a wiki page soon.

Two requests for whoever can:
  • SecretLabs post 4.2.0.1 source.
  • Explain how to ensure that our interop project gets flashed as part of Solutions\NetduinoPlus, OR how to do an incremental download we can access using what look like new options in MF 4.2. Last year, Chris Walker suggested this old post from Ardeneo: http://adeneo-embedd...-framework.html -- it says to create your own Solution -- I'm fuzzy on how that gets downloaded.

Thanks!
Howie

#26 CW2

CW2

    Advanced Member

  • Members
  • PipPipPip
  • 1592 posts
  • LocationCzech Republic

Posted 10 October 2012 - 05:40 PM

Explain how to ensure that our interop project gets flashed as part of Solutions\NetduinoPlus, OR how to do an incremental download we can access using what look like new options in MF 4.2

I am not sure I completely understand the question, but if you want to add your interop project to NetduinoPlus solution, you can either copy your.featureproj to Framework\Features directory and use SolutionWizard to modify the existing NetduinoPlus solution (*), or you can manually add it to Solutions\NetduinoPlus\TinyCLR\TinyCLR.proj - e.g. duplicate <Import Project.../> and <ItemGroup.../> of an existing SecretLabs feature and replace the file names.

If you don't want to include your managed assembly in the firmware image, comment out <MMP_DAT_CreateDatabase .../> tag in your.featureproj file, the assembly will be included in the application deployment (if referenced).

(*) There is a little change needed to workaround SolutionWizard's limited parser, replace DEFAULT_DEPLOYMENT_PORT with the actual value in platform_selector.h, so instead of #define DEBUG_TEXT_PORT DEFAULT_DEPLOYMENT_PORT there is #define DEFAULT_TEXT_PORT USB1 etc.




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.