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

Netduino 2 Firmware v4.3.1 with GCC support


  • Please log in to reply
26 replies to this topic

#21 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 08 April 2014 - 05:01 AM

Hi gismo,

...Is it really that easy? How can I be sure my changes made it's way into the compile firmware?

To add to what CW2 recommended...

When I want to really make sure that I'm running newly-compiled firmware, I do the following:

1. Change the solution description/version (as CW2 mentioned).
2. Delete the entire \MicroFrameworkv#.##\BuildOutput folder.
3. Use the /t:rebuild option when compiling
4. Erase the mainboard using STDFU tester
5. Try to boot the board, if desired, to make sure it's really erased
6. Reflash from the new firmware files

Chris

#22 zeroaviation

zeroaviation

    Member

  • Members
  • PipPip
  • 28 posts

Posted 09 May 2014 - 06:41 PM

@CW2... Thank you very very much for putting this together!!!! 

 

Now if we can get someone to write some managed CAN drivers....... :)

 

-Matt



#23 Aldo Papini

Aldo Papini

    New Member

  • Members
  • Pip
  • 1 posts

Posted 23 May 2014 - 05:09 PM

Hello, i need to compile for ND+2. Someone can help me with a step by step guide?

Thanks



#24 DrDaveM

DrDaveM

    New Member

  • Members
  • Pip
  • 3 posts

Posted 01 June 2014 - 12:20 AM

Hi, I followed the instructions to hopefully fix my "broken" netduino 2... I'm not sure what happend to it but it wont respond anymore... It shows up in device manager under USB devices as "netduino" and the MFDeploy sees it and lists it but says "Pinging... Error: No response from device"

 

Anyway, hoping flashing the firmware would work I did these steps, everything is great up till I run the Netduino Update utility, even though it shows up in MFDeploy and device manager, nothing is listed in the Netduino Update utility....

 

Also, I have tried other things, resetting the gold pin under D0, cant get SAM-BA to see it either... no com ports i think? idk what else to do ...

 

Help?

Attached Files



#25 imabigZ

imabigZ

    New Member

  • Members
  • Pip
  • 2 posts

Posted 28 October 2014 - 03:33 PM

In an attempt to compile a custom firmware for my NP2, I've been doing a lot of reading, and despite my newness to this space, I feel I'm getting close on building 4.3.1 for Netduino Plus 2, but I don't know the first thing about the scatterfile required for NP2's architecture.

 

Based on a comment in this chain, it sounded like they were pretty similar, so as a thought, I used the Nupdate4.3.1's N2 scatterfile as a substitute, and it got the assemblies mostly built, but I fear it's probably not right...

 

With a modified environment script, I'm running VS2013 Premium on Win8.1, with a fresh sdk/pk 4.3.1 code pull (rev 42622) from codeplex, and the Nupdate4.3.1 laid over the top, and I'm using the GCC 4.8.3 compiler.  

 

My command output window is attached.  Any guidance is appreciated, thanks!

 

Hopefully more readable, here is the compilation error I'm receiving:

 

D:\NetMFPortKit\tools\targets\Microsoft.SPOT.System.GCC.targets(331,5): 
error MSB3073: 
The command "
"D:\GCC\bin\..\arm-none-eabi\bin\ld.exe"  
  -static 
  --gc-sections 
  --no-warn-mismatch 
  --library-path=D:\NetMFPortKit\BuildOutput\THUMB2\GCC4.8\le\FLASH\release\NetduinoPlus2\lib 
  --library-path=D:\NetMFPortKit\BuildOutput\THUMB2\GCC4.8\le\ANY_MEDIA\release\lib  -u ARM_Vectors  -u _start 
  --Map D:\NetMFPortKit\BuildOutput\THUMB2\GCC4.8\le\FLASH\release\NetduinoPlus2\bin\tinyclr.map 
  --output=D:\NetMFPortKit\BuildOutput\THUMB2\GCC4.8\le\FLASH\release\NetduinoPlus2\bin\tinyclr.axf 
  --script=D:\NetMFPortKit\BuildOutput\THUMB2\GCC4.8\le\FLASH\release\NetduinoPlus2\bin\tinyclr_scatterfile.ldf 
    D:\NetMFPortKit\BuildOutput\THUMB2\GCC4.8\le\FLASH\release\NetduinoPlus2\obj\Solutions\NetduinoPlus2\TinyCLR\tinyclr_dat.obj 
    D:\NetMFPortKit\BuildOutput\THUMB2\GCC4.8\le\FLASH\release\NetduinoPlus2\obj\Solutions\NetduinoPlus2\TinyCLR\allocator.obj 
    D:\NetMFPortKit\BuildOutput\THUMB2\GCC4.8\le\FLASH\release\NetduinoPlus2\obj\Solutions\NetduinoPlus2\TinyCLR\tinyclr.obj 
    -( 
      D:\NetMFPortKit\BuildOutput\THUMB2\GCC4.8\le\ANY_MEDIA\release\lib\Core.lib 
      D:\NetMFPortKit\BuildOutput\THUMB2\GCC4.8\le\ANY_MEDIA\release\lib\Hardware.lib 
      D:\NetMFPortKit\BuildOutput\THUMB2\GCC4.8\le\ANY_MEDIA\release\lib\InterruptHandler.lib 
      D:\NetMFPortKit\BuildOutput\THUMB2\GCC4.8\le\ANY_MEDIA\release\lib\IOPort.lib 
      D:\NetMFPortKit\BuildOutput\THUMB2\GCC4.8\le\ANY_MEDIA\release\lib\RPC_stub.lib 
      D:\NetMFPortKit\BuildOutput\THUMB2\GCC4.8\le\ANY_MEDIA\release\lib\SPOT_Serialization_stub.lib 
      D:\NetMFPortKit\BuildOutput\THUMB2\GCC4.8\le\ANY_MEDIA\release\lib\Serialization_stub.lib 
      D:\NetMFPortKit\BuildOutput\THUMB2\GCC4.8\le\ANY_MEDIA\release\lib\Debugger.lib 
      D:\NetMFPortKit\BuildOutput\THUMB2\GCC4.8\le\ANY_MEDIA\release\lib\Debugger_full.lib 
      D:\NetMFPortKit\BuildOutput\THUMB2\GCC4.8\le\ANY_MEDIA\release\lib\Graphics_stub.lib 
      D:\NetMFPortKit\BuildOutput\THUMB2\GCC4.8\le\ANY_MEDIA\release\lib\CorLib.lib 
      D:\NetMFPortKit\BuildOutput\THUMB2\GCC4.8\le\ANY_MEDIA\release\lib\SPOT.lib 
      D:\NetMFPortKit\BuildOutput\THUMB2\GCC4.8\le\ANY_MEDIA\release\lib\SPOT_Messaging_stub.lib 
      D:\NetMFPortKit\BuildOutput\THUMB2\GCC4.8\le\ANY_MEDIA\release\lib\SPOT_Hardware.lib 
      D:\NetMFPortKit\BuildOutput\THUMB2\GCC4.8\le\ANY_MEDIA\release\lib\SPOT_Net.lib 
      D:\NetMFPortKit\BuildOutput\THUMB2\GCC4.8\le\ANY_MEDIA\release\lib\Messaging.lib 
      D:\NetMFPortKit\BuildOutput\THUMB2\GCC4.8\le\ANY_MEDIA\release\lib\CLRStartup.lib 
      D:\NetMFPortKit\BuildOutput\THUMB2\GCC4.8\le\ANY_MEDIA\release\lib\CRC.lib 
      D:\NetMFPortKit\BuildOutput\THUMB2\GCC4.8\le\ANY_MEDIA\release\lib\WireProtocol.lib 
      D:\NetMFPortKit\BuildOutput\THUMB2\GCC4.8\le\ANY_MEDIA\release\lib\SPOT_TimeService.lib 
      D:\NetMFPortKit\BuildOutput\THUMB2\GCC4.8\le\ANY_MEDIA\release\lib\Diagnostics.lib 
      D:\NetMFPortKit\BuildOutput\THUMB2\GCC4.8\le\ANY_MEDIA\release\lib\Stream.lib 
      D:\NetMFPortKit\BuildOutput\THUMB2\GCC4.8\le\ANY_MEDIA\release\lib\SPOT_IO.lib 
      D:\NetMFPortKit\BuildOutput\THUMB2\GCC4.8\le\ANY_MEDIA\release\lib\HeapPersistence.lib 
      D:\NetMFPortKit\BuildOutput\THUMB2\GCC4.8\le\ANY_MEDIA\release\lib\I2C.lib 
      D:\NetMFPortKit\BuildOutput\THUMB2\GCC4.8\le\ANY_MEDIA\release\lib\SPOT_Hardware_SerialPort.lib 
      D:\NetMFPortKit\BuildOutput\THUMB2\GCC4.8\le\ANY_MEDIA\release\lib\SPOT_Hardware_PWM.lib 
      D:\NetMFPortKit\BuildOutput\THUMB2\GCC4.8\le\ANY_MEDIA\release\lib\SPOT_Hardware_Usb.lib 
      D:\NetMFPortKit\BuildOutput\THUMB2\GCC4.8\le\ANY_MEDIA\release\lib\SPOT_Hardware_OneWire.lib 
      D:\NetMFPortKit\BuildOutput\THUMB2\GCC4.8\le\FLASH\release\NetduinoPlus2\lib\tmp_tinyclr.lib 
      D:\NetMFPortKit\BuildOutput\THUMB2\GCC4.8\le\FLASH\release\NetduinoPlus2\lib\InteropAssembliesTable.lib 
    -) 
    -( 
      "D:\GCC\arm-none-eabi\lib\armv7-m\libm.a" 
      "D:\GCC\arm-none-eabi\lib\armv7-m\libc.a" 
      "D:\GCC\lib\gcc\arm-none-eabi\4.8.3\armv7-m\libgcc.a" 
    -) 
    -(  
    -)" exited with code 1. 
    
[D:\NetMFPortKit\Solutions\NetduinoPlus2\TinyCLR\TinyCLR.proj]

 

 

 

Attached File  Compile001.jpg   241.56KB   0 downloads

Attached File  Compile002.jpg   234.34KB   0 downloads

Attached File  Compile003.jpg   155.1KB   0 downloads

Attached File  Compile004.jpg   242.18KB   0 downloads 



#26 Andrei Gorlov

Andrei Gorlov

    New Member

  • Members
  • Pip
  • 1 posts

Posted 05 November 2014 - 04:57 PM

I've succesfully built firmware for NP2. As mentioned above, a proper scatterfile_bootloader_gcc.xml & scatterfile_tinyclr_gcc.xml required. You can obtain these files from http://wiki.netduino...to-GCC-4-6.ashx(see attachments on wiki page).



#27 NameOfTheDragon

NameOfTheDragon

    Advanced Member

  • Members
  • PipPipPip
  • 112 posts
  • LocationCanterbury, Kent, UK

Posted 05 January 2015 - 10:07 PM

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.

 

I was trying to build this under VS2013, as it is what I have installed, and made the edits to setenv_base.cmd as suggested above.

 

It all starts well and then in the middle of the build spews out pages of similar error messages, of the form:

D:\ND2\tools\targets\Microsoft.SPOT.System.GCC.targets(293,5): error MSB3073: The command " "c:\GCC-ARM\bin\arm-none-eabi-gcc.exe" -xc++ -Wno-invalid-offsetof -fcheck-new  -fno-de
fault-inline  -mabi=aapcs -ffunction-sections -fomit-frame-pointer -mlong-calls -fdollars-in-identifiers -fshort-wchar -fno-exceptions  -funsigned-char -mstructure-size-boundary=8
-DTCPIP_LWIP -DTINYCLR_ENABLE_SOURCELEVELDEBUGGING  -DCOMPILE_THUMB2  -DVERSION_MAJOR=4 -DVERSION_MINOR=3 -DVERSION_BUILD=1 -DVERSION_REVISION=0 -DOEMSYSTEMINFOSTRING="\"Netduino
Plus 2 (v4.3.1.0) by Secret Labs LLC\"" -DPLATFORM_ARM_STM32 -DPLATFORM_ARM_NetduinoPlus2 -DTARGETLOCATION_FLASH -DLITTLE_ENDIAN -DGCC  -DPLATFORM_DEPENDENT_HEAP_SIZE_THRESHOLD=1
0240 -DPLATFORM_DEPENDENT_HEAP_SIZE_THRESHOLD_UPPER=131072 -DPLATFORM_NO_CLR_TRACE=1 -DTINYCLR_NO_IL_INLINE=1    -mfloat-abi=soft   -mcpu=cortex-m3 -mlittle-endian  -g1 -Os -DNDEB
UG  -ID:\ND2\Solutions\NetduinoPlus2\DeviceCode\SD_Config_HAL -ID:\ND2\DeviceCode\include -ID:\ND2\DeviceCode\Cores\arm -ID:\ND2\Support\Include   -ID:\ND2\crypto\inc  -ID:\ND2\CL
R\Include -ID:\ND2\CLR\Libraries\CorLib -ID:\ND2\CLR\Libraries\SPOT -ID:\ND2\CLR\Libraries\SPOT_Hardware -ID:\ND2\CLR\Libraries\SPOT_Graphics -ID:\ND2\CLR\Libraries\SPOT_Net -Ic:\
GCC-ARM\lib\gcc\arm-none-eabi\4.8.3\include -ID:\ND2\Solutions\NetduinoPlus2 -ID:\ND2\devicecode\Targets\Native\Netduino_STM32 -ID:\ND2\DeviceCode\Cores\arm -ID:\ND2\DeviceCode\Co
res\arm\Include -ID:\ND2\DeviceCode -ID:\ND2\DeviceCode\Include -ID:\ND2\CLR\Include -ID:\ND2\DeviceCode\Targets\Native\STM32\NetduinoPlus2 -ID:\ND2\Support\Include -ID:\ND2\Devic
eCode\include -ID:\ND2\CLR\include -ID:\ND2\Crypto\inc -ID:\ND2\BuildOutput\THUMB2\GCC4.8\le\ANY_MEDIA\release\lib   -Wabi   -o D:\ND2\BuildOutput\THUMB2\GCC4.8\le\FLASH\release\N
etduinoPlus2\obj\Solutions\NetduinoPlus2\DeviceCode\SD_Config_HAL\sdconfig_NetduinoPlus2.obj -c D:\ND2\Solutions\NetduinoPlus2\DeviceCode\SD_Config_HAL\sdconfig_NetduinoPlus2.cpp
" exited with code 1. [D:\ND2\Solutions\NetduinoPlus2\DeviceCode\SD_Config_HAL\dotNetMF.proj]
  Could Not Find D:\ND2\BuildOutput\THUMB2\GCC4.8\le\FLASH\release\NetduinoPlus2\lib\Network_Config_HAL_NetduinoPlus2.lib
  Could Not Find D:\ND2\BuildOutput\THUMB2\GCC4.8\le\FLASH\release\NetduinoPlus2\lib\Network_Config_HAL_NetduinoPlus2.lib.manifest
  D:\ND2\Solutions\NetduinoPlus2\DeviceCode\Network_Config_HAL\Network_config_NetduinoPlus2.cpp:1:0: error: target CPU does not support ARM mode
   ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  ////////////////////////
   ^

Is that something anyone has seen before? The error doesn't really hint at what's going wrong, at least not to me.

 

Just in case, I made sure my source was in a directory with a really short name - D:\ND2

 

Regards,

Tim Long






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.