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

#1 yiulsup

yiulsup

    Advanced Member

  • Members
  • PipPipPip
  • 34 posts

Posted 19 July 2012 - 07:00 AM

To Netduino Family. I tried to compile the source code .net mf 4.1 and netduino plus source code 4.1.0.6. After compiling, I tried to fuse the binary code on the flash of sam7x512 for netduino plus. Without any error from compiling and fusing, I happened to meet some huddle for my netduino plus on which .net mf 4.1 and netduino plus binary code is running. My huddle is the ethernet connection can't establish, even if my IP setting with MFDeploy. Where is the hint to solve this problem which I face now. I give some my facts that another program for gpio, led, ADC(analog to digital converter) was working very well. Only ethernet program didn't work for netduino plus.

#2 nakchak

nakchak

    Advanced Member

  • Members
  • PipPipPip
  • 404 posts
  • LocationBristol, UK

Posted 19 July 2012 - 07:20 AM

Hi

Have you read this thread?

Sounds like the issues i was having a while back, you need to include the lwip stack in the build command.

Nak.

#3 yiulsup

yiulsup

    Advanced Member

  • Members
  • PipPipPip
  • 34 posts

Posted 20 July 2012 - 08:36 AM

I have one huddle for compiling the firmware. I could not compile the firmware ND+ 4.1.0.6 with lwip. There is no room or space for flash on SAM7x512 of Netduino Plus. Even if best effort for fitting the size of flash, it is useless for me. Thanks. Kevin

#4 nakchak

nakchak

    Advanced Member

  • Members
  • PipPipPip
  • 404 posts
  • LocationBristol, UK

Posted 20 July 2012 - 10:46 AM

What compiler are you using? GCC produces to large a binary. If you use MDK or RVDS then it will work. Also be sure to fully erase the netduino (gold erase pad) and flash the bootloader that was produced by your compilation. Nak.

#5 yiulsup

yiulsup

    Advanced Member

  • Members
  • PipPipPip
  • 34 posts

Posted 23 July 2012 - 08:31 AM

To Nak. I understand the meaning which you hint at me. But I couldn't compile the ND+ with RVDS 4.1 from ARM Co., Ltd. When compiliation for ND+ with RVDS, There is some error in compiling for RVDS. I have a questions for my compiling with RVDS. 1. Is there any firmware code for RVDS compiler from ARM? 2. Is there RVDS 3.1 or 4.0 compiler for ND+? 3. Pls with step by step, describe or write for me how to compile with RVDS for ND+ Thanks. Kevin

#6 nakchak

nakchak

    Advanced Member

  • Members
  • PipPipPip
  • 404 posts
  • LocationBristol, UK

Posted 23 July 2012 - 10:33 AM

What is your error message?

In a nut shell you need to do the following to get it to compile:
  • Download the NETMF 4.1 porting kit, and install it in a logical place i.e. C:\pk41
  • Download the netduino 4.1 firmware source and copy it to the root of your PK directory
  • Open a Visual Studio Command Prompt
  • Navigate to your Porting Kit directory that you have copied the ND+ firmware too.
  • Call the batch file setenv_RVDS4.0.cmd with the path to your RVDS install i.e.
    setenv_RVDS4.0.cmd c:\rvds\
  • execute the following command
    msbuild solutions\NetduinoPlus\dotnetmf.proj /p:flavor=release;tcp_ip_stack=lwip /t:rebuild /m /v:m
That should kick off the build process...




Nak.

#7 yiulsup

yiulsup

    Advanced Member

  • Members
  • PipPipPip
  • 34 posts

Posted 24 July 2012 - 12:09 AM

Error Message is "Project file contains ToolsVersion="4.0", which is not supported by this version of MSBuild. Treating the project as if it has ToolsVersion="3.5". 'cscript' is not the command to batch or execute. My step are 1. Downloaded the NETMF 4.1 porting kit. and intall it in a c:\pk41 2. Downloaded the netduino 4.1 firmware source and copy it to the root of PK directory. 3. setenv_RVDS4.0.cmd c:\rvdsnetduino 4. executed the command msbuild /p:flavor=release;memory=flash;tcp_ip_stack=lwip /t:rebuild /v:d /m My RVDS compiler version is 4.1 from ARM Co. Ltd. Thanks. Kevin

#8 nakchak

nakchak

    Advanced Member

  • Members
  • PipPipPip
  • 404 posts
  • LocationBristol, UK

Posted 24 July 2012 - 08:15 AM

I think that indicates that RVDS 4.1 is not supported by the build scripts, i think that you can pretty much copy over the build batch files from 4.2 which do have support for RVDS 4.1 Nak.

#9 yiulsup

yiulsup

    Advanced Member

  • Members
  • PipPipPip
  • 34 posts

Posted 24 July 2012 - 08:53 AM

To Nak. I can't find out where is the batch file for RVDS 4.2. Kevin.

#10 nakchak

nakchak

    Advanced Member

  • Members
  • PipPipPip
  • 404 posts
  • LocationBristol, UK

Posted 24 July 2012 - 09:08 AM

Sorry the porting kit for 4.2 has updated RVDS batch files, you can grab just the build files from netmf.codeplex.com Nak.

#11 CW2

CW2

    Advanced Member

  • Members
  • PipPipPip
  • 1592 posts
  • LocationCzech Republic

Posted 24 July 2012 - 09:11 AM

Error Message is "Project file contains ToolsVersion="4.0", which is not supported by this version of MSBuild. Treating the project as if it has ToolsVersion="3.5".

Do you have Visual Studio 2010 and .NET Framework 4.0 installed?

#12 yiulsup

yiulsup

    Advanced Member

  • Members
  • PipPipPip
  • 34 posts

Posted 24 July 2012 - 09:33 AM

To Nak I installed Visual Studio 2010 and .NET Framework 4.0. Kevin

#13 yiulsup

yiulsup

    Advanced Member

  • Members
  • PipPipPip
  • 34 posts

Posted 25 July 2012 - 01:00 AM

To Nak. cscript Error. There is no command for cscript which I mentioned above. I tried with your recommended are ... 1. Downloaded the .NET MF 4.2 and Porting Kit 4.2. 2. ND+ firmware 4.1 3. setenv_RVDS4.1.cmd c:\rvds 4. msbuild /t:build /p:flavor=release;memory=flash;tcp_ip_stack=lwip /v:d /m I couldn't compile the firmware ND+ for ND+ Binary with above message without effect. Kevin

#14 yiulsup

yiulsup

    Advanced Member

  • Members
  • PipPipPip
  • 34 posts

Posted 25 July 2012 - 01:03 AM

I forgot to say that my RVDS version 4.1 is evaluation from ARM Co. Ltd.

#15 nakchak

nakchak

    Advanced Member

  • Members
  • PipPipPip
  • 404 posts
  • LocationBristol, UK

Posted 26 July 2012 - 07:20 AM

Hi Kevin

I am more than a little stumped as to your issues now, as using the steps above works perfectly for me every time, even using the RVDS evaluation.

To reiterate, are you using a standard command prompt or the visual studio command prompt?

You need to use the visual studio command prompt (Start->Programs->MicroSoft Visual Studio 2010->Visual Studio Tools->Visual Studio Command Prompt (2010) ) as it runs a batch file on loading that sets environment variables to use the correct version of msbuild i.e. if you have .net 2, 3.5 and 4.0 installed on your machine each has its own version of msbuild.

The error message of

Error Message is "Project file contains ToolsVersion="4.0", which is not supported by this version of MSBuild. Treating the project as if it has ToolsVersion="3.5".

indicates (as CW2 eluded to when he asked if you are using visual studio 2010) that you are trying to use the msbuild for .net 3.5 not 4.0 which you need to use to build pk 4.1

You can simplify the build process by using a build batch file, here is a sample of mine, save the following into your pk root folder as build.bat, then run it as an administrator:

::Call the batch file that runs when you open a vs2010 command prompt (you may need to change paths to point to it on your machine)
call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86_amd64
::Call the RVDS build environment file
call setenv_RVDS4.0.cmd C:\rvds
::Call msbuild to compile the pk
msbuild solutions\NetduinoPlus\dotnetmf.proj /p:flavor=release;tcp_ip_stack=lwip /t:rebuild /m /v:m

Nak.

#16 yiulsup

yiulsup

    Advanced Member

  • Members
  • PipPipPip
  • 34 posts

Posted 26 July 2012 - 08:11 AM

To Nak. I have this one for error. C:\MicroFrameworkPK_v4_1\Solutions\NetduinoPlus\TinyBooter\TinyBooter.proj : error MSB4057: The target "BuildSigFiles" does not exist in the project. Kevin.

#17 yiulsup

yiulsup

    Advanced Member

  • Members
  • PipPipPip
  • 34 posts

Posted 27 July 2012 - 02:42 AM

I solved aboved with followings which Nak adviced me how to compile. But, I can't go further with error as "There is no file as C:\MicroFrameworkPK_v4_1\BuildOutput\THUMB\RVDS4.0\le\FLASH\release\NetduinoPlus\lib\events_pal_stubs.lib" Pls, I need advice from you. Kevin.

#18 yiulsup

yiulsup

    Advanced Member

  • Members
  • PipPipPip
  • 34 posts

Posted 30 July 2012 - 08:25 AM

I solved above problem.

Now I faced followings.

"C:\RVDS\RVCT\Programs\4.1\713\win_32-pentium\armcc.exe" --cpp --diag_suppress 2874,111,161,550,C3011 --diag_suppress 66,161,230,1293 --split_sections --library_interface=aeabi_clib -DARM_V3_1 --feedback C:\MicroFrameworkPK_v4_2\tools\make\Feedback\NetduinoPlus_RVDS4.1.feedback -DTCPIP_LWIP -DTINYCLR_ENABLE_SOURCELEVELDEBUGGING -DCOMPILE_THUMB -DVERSION_MAJOR=4 -DVERSION_MINOR=2 -DVERSION_BUILD=0 -DVERSION_REVISION=0 -DOEMSYSTEMINFOSTRING="\"Netduino Plus by Secret Labs LLC\"" -DPLATFORM_ARM_NetduinoPlus -DTARGETLOCATION_FLASH -DLITTLE_ENDIAN --thumb --fpu softvfp --cpu ARM7TDMI --littleend --no_debug --no_debug_macros -O2 --no_autoinline --inline --dwarf2 --asm --interleave -Ospace -DNDEBUG -IC:\MicroFrameworkPK_v4_2\DeviceCode\pal\COM\sockets -IC:\MicroFrameworkPK_v4_2\DeviceCode\include -IC:\MicroFrameworkPK_v4_2\DeviceCode\Cores\arm -IC:\MicroFrameworkPK_v4_2\Support\Include -IC:\MicroFrameworkPK_v4_2\crypto\inc -IC:\MicroFrameworkPK_v4_2\CLR\Include -IC:\MicroFrameworkPK_v4_2\CLR\Libraries\CorLib -IC:\MicroFrameworkPK_v4_2\CLR\Libraries\SPOT -IC:\MicroFrameworkPK_v4_2\CLR\Libraries\SPOT_Hardware -IC:\MicroFrameworkPK_v4_2\CLR\Libraries\SPOT_Graphics -IC:\MicroFrameworkPK_v4_2\CLR\Libraries\SPOT_Net -IC:\MicroFrameworkPK_v4_2\CLR\Libraries\SPOT_Net_Security -I"C:\RVDS\RVCT\Data\4.1\713\include\windows" -IC:\MicroFrameworkPK_v4_2\Solutions\NetduinoPlus -IC:\MicroFrameworkPK_v4_2\devicecode\Targets\Native\AT91 -IC:\MicroFrameworkPK_v4_2\DeviceCode\Cores\arm -IC:\MicroFrameworkPK_v4_2\DeviceCode\Cores\arm\Include -IC:\MicroFrameworkPK_v4_2\DeviceCode -IC:\MicroFrameworkPK_v4_2\DeviceCode\Include -IC:\MicroFrameworkPK_v4_2\DeviceCode\Targets\Native\AT91\NetduinoPlus -IC:\MicroFrameworkPK_v4_2\Support\Include -IC:\MicroFrameworkPK_v4_2\DeviceCode\include -IC:\MicroFrameworkPK_v4_2\CLR\include -IC:\MicroFrameworkPK_v4_2\Crypto\inc -IC:\MicroFrameworkPK_v4_2\DeviceCode\include --apcs /interwork/noropi/norwpi/noswst -o C:\MicroFrameworkPK_v4_2\BuildOutput\THUMB\RVDS4.1\le\FLASH\release\NetduinoPlus\obj\DeviceCode\pal\COM\sockets\sockets.obj -c C:\MicroFrameworkPK_v4_2\DeviceCode\PAL\COM\sockets\sockets.cpp
EXEC : warning : C9931W: Your license for Compiler (feature compiler) will expire in 23 days [C:\MicroFrameworkPK_v4_2\DeviceCode\PAL\COM\sockets\dotNetMF.proj]

EXEC : warning : C9931W: Your license for Compiler (feature compiler) will expire in 23 days [C:\MicroFrameworkPK_v4_2\DeviceCode\PAL\COM\sockets\dotNetMF.proj]

EXEC : warning : C3052E: couldn't read file 'C:\MicroFrameworkPK_v4_2\tools\make\Feedback\NetduinoPlus_RVDS4.1.feedback': No such file or directory [C:\MicroFrameworkPK_v4_2\DeviceCode\PAL\COM\sockets\dotNetMF.proj]
"C:\MicroFrameworkPK_v4_2\DeviceCode\PAL\COM\sockets\sockets.h", line 15: Error: #20: identifier "NETWORK_CONFIG" is undefined
extern NETWORK_CONFIG g_NetworkConfig;
^
"C:\MicroFrameworkPK_v4_2\DeviceCode\PAL\COM\sockets\sockets.h", line 16: Error: #20: identifier "WIRELESS_CONFIG" is undefined
extern WIRELESS_CONFIG g_WirelessConfig;
^
"C:\MicroFrameworkPK_v4_2\DeviceCode\PAL\COM\sockets\sockets.h", line 192: Error: #20: identifier "SOCKETS_MAX_COUNT" is undefined
struct SocketRegisterMap m_socketHandles[SOCKETS_MAX_COUNT];
^
"C:\MicroFrameworkPK_v4_2\DeviceCode\PAL\COM\sockets\sockets.cpp", line 287: Error: #20: identifier "WIRELESS_INTERFACE_COUNT" is undefined
if (interfaceIndex >= WIRELESS_INTERFACE_COUNT)
^
"C:\MicroFrameworkPK_v4_2\DeviceCode\PAL\COM\sockets\sockets.cpp", line 297: Error: #70: incomplete type is not allowed
memcpy( wirelessConfig, &g_WirelessConfig.WirelessInterfaces[interfaceIndex], sizeof(SOCK_WirelessConfiguration) );
^
"C:\MicroFrameworkPK_v4_2\DeviceCode\PAL\COM\sockets\sockets.cpp", line 307: Error: #20: identifier "WIRELESS_INTERFACE_COUNT" is undefined
if (interfaceIndex >= WIRELESS_INTERFACE_COUNT)
^
"C:\MicroFrameworkPK_v4_2\DeviceCode\PAL\COM\sockets\sockets.cpp", line 312: Error: #70: incomplete type is not allowed
memcpy( &g_WirelessConfig.WirelessInterfaces[interfaceIndex], wirelessConfig, sizeof(SOCK_WirelessConfiguration) );
^
"C:\MicroFrameworkPK_v4_2\DeviceCode\PAL\COM\sockets\sockets.cpp", line 662: Error: #70: incomplete type is not allowed
SOCK_NetworkConfiguration current;
^
"C:\MicroFrameworkPK_v4_2\DeviceCode\PAL\COM\sockets\sockets.cpp", line 938: Error: #70: incomplete type is not allowed
memcpy( &g_NetworkConfig.NetworkInterfaces[index], cfg, sizeof(SOCK_NetworkConfiguration) );
^
"C:\MicroFrameworkPK_v4_2\DeviceCode\PAL\COM\sockets\sockets.cpp", line 971: Error: #20: identifier "WIRELESS_INTERFACE_COUNT" is undefined
if(index >= WIRELESS_INTERFACE_COUNT) return;
^
"C:\MicroFrameworkPK_v4_2\DeviceCode\PAL\COM\sockets\sockets.cpp", line 975: Error: #70: incomplete type is not allowed
memcpy( &g_WirelessConfig.WirelessInterfaces[index], cfg, sizeof(SOCK_WirelessConfiguration) );

Thanks.

Kevin.

Refernece

I recommend that the compilation of firmware ND+ 4.2 will be better than 4.1 with followings.

1. Downloaded .net mf 4.2
2. Downloaded .net mf porting kit 4.2
3. Downloaded ND+ firmware 4.1.
4. Downloaded RVDS 4.1 Evaluation from ARM Co., Ltd.
5. call "c:\C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall x86_amd64"
6. setenv_RVDS4.1.cmd c:\rvds
7. msbuild solutions\NetduinoPlus\dotnetmf.proj /p:flavor=release;tcp_ip_stack=lwip /t:rebuild /m /v:m

#19 nakchak

nakchak

    Advanced Member

  • Members
  • PipPipPip
  • 404 posts
  • LocationBristol, UK

Posted 30 July 2012 - 09:06 AM

are you mixing the 4.2 pk with the 4.1 firmware source? If so that wont work due to the changes between 4.1 and 4.2 of the FW. You need to use pk 4.1 with the 4.1.0.6 firmware source. Nak.

#20 yiulsup

yiulsup

    Advanced Member

  • Members
  • PipPipPip
  • 34 posts

Posted 31 July 2012 - 04:14 AM

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.




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.