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

Compiling firmware


  • Please log in to reply
3 replies to this topic

#1 Mike P

Mike P

    Advanced Member

  • Members
  • PipPipPip
  • 41 posts
  • LocationAuckland, New Zealand

Posted 15 September 2011 - 12:55 PM

There are several really good posts buried in the forum on how to compile the Netduino firmware from source code.
I've managed to get as far as this error:

C:\GCC\bin\arm-none-eabi-ld.exe: C:\MicroFrameworkPK_v4_1\BuildOutput\THUMB\GCC4.2\le\FLASH\release\Netduino\bin\tinyclr.axf section ER_FLASH will not fit in region LR_FLASH
 C:\GCC\bin\arm-none-eabi-ld.exe: region LR_FLASH overflowed by 65128 bytes

Now I have read this very helpful post by CW2:
http://forums.netdui...dpost__p__10332

And I understand that I have to adjust the blockrange for the code.

What I am stuck on is where do I find the size of the ER_FLASH file since it does not get created when the build fails.

In CW2's post he says "but our firmware is 0x50ADC bytes" but I don't know where that figure came from.
How do I find the size of the firmware so that I can know how big to make the BlockRange?

#2 CW2

CW2

    Advanced Member

  • Members
  • PipPipPip
  • 1592 posts
  • LocationCzech Republic

Posted 15 September 2011 - 01:18 PM

What I am stuck on is where do I find the size of the ER_FLASH file since it does not get created when the build fails.

The size of firmware is the size of the LR_FLASH region defined in scatterfile_tinyclr_gcc.xml plus the overflow: LR_FLASH Size = %CodeSize% = 0x0015E000 - 0x0011E000 = 0x40000, firmware size = 0x40000 + 65128 = 0x4FE68.

Edit: Fixed values for GCC (were for RVDS)

#3 CW2

CW2

    Advanced Member

  • Members
  • PipPipPip
  • 1592 posts
  • LocationCzech Republic

Posted 15 September 2011 - 01:38 PM

What I am stuck on is where do I find the size of the ER_FLASH file since it does not get created when the build fails.

Another way is to make the LR_FLASH region bigger in the scatter file (i.e. increasing the value of Deploy_BaseAddress), so the build succeeds and ER_FLASH is created. Don't forget to set the value back Posted Image

#4 Mike P

Mike P

    Advanced Member

  • Members
  • PipPipPip
  • 41 posts
  • LocationAuckland, New Zealand

Posted 15 September 2011 - 07:49 PM

Thanks CW2. That makes a lot of sense. Success. I compliled and uploaded firmware from source for the first time.




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.