/var/www/restricted/ssh/stm32/www/stm32circle/ STM CircleOS forum / section .text will not fit in region FLASH

Username:     
Password:     
             

Forum

# 1   2007-11-17 13:30:01 section .text will not fit in region FLASH

tybos
Member
Registered: 2007-08-07
Posts: 22

section .text will not fit in region FLASH

Hi everyone,

I started to try to make something fun from the Primer but I won't tell you what !!
My problem is that when I try to build my project, build fails because "section .text will not fit in region FLASH" and "region FLASH overflowed by 28 bytes" whereas my project takes "only" less than 6000 bytes for text section, 3100 for data ...
My Primer is a Pro one, so I'm far from the 128KB ...
My project uses CircleOS 1.6 so this only takes less than 40 KB ...
Are there some compiling options or anything else that could genrate such error ?

Thank you by advance ...

Thibaut

Offline

 

# 2   2007-11-17 13:52:21 section .text will not fit in region FLASH

Francis
Administrator
From: France-Grenoble
Registered: 2007-07-09
Posts: 890

Re: section .text will not fit in region FLASH

Open the circle_App.ld file in your project directory. Look at the memory spaces definitions.
One (128KB-16KB for Flash) is commented, and the second (only 8KB for the FLASH) is enabled. If you activate the first definition, you will remove the limitation in the linker.

Offline

 

# 3   2007-11-17 14:08:52 section .text will not fit in region FLASH

tybos
Member
Registered: 2007-08-07
Posts: 22

Re: section .text will not fit in region FLASH

Thank you for your quick answer !!
I wasn't expected any answer before monday !
Don't tell me you're working on Saturday ...
Anyway, have a nice week end.
Thibaut

Offline

 

# 4   2008-07-09 12:16:58 section .text will not fit in region FLASH

lmm
New member
Registered: 2008-06-24
Posts: 5

Re: section .text will not fit in region FLASH

I'm having this same problem, and both options seem to only allocate 8K for flash?

What seems to be the relevant part of the .ld file:

/* Memory Spaces Definitions */
/*
MEMORY
{
  RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 16K
  FLASH (rx) : ORIGIN = 0x8006000, LENGTH = 8K
  FLASHB1 (rx) : ORIGIN = 0x00000000, LENGTH = 0
  EXTMEMB0 (rx) : ORIGIN = 0x00000000, LENGTH = 0
  EXTMEMB1 (rx) : ORIGIN = 0x00000000, LENGTH = 0
  EXTMEMB2 (rx) : ORIGIN = 0x00000000, LENGTH = 0
  EXTMEMB3 (rx) : ORIGIN = 0x00000000, LENGTH = 0
}
*/
MEMORY
{
  RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 16K
  FLASHB1 (r) : ORIGIN = 0x8000000, LENGTH = 0x0006000
  FLASH (rx) : ORIGIN = 0x8006000, LENGTH = 8K
  EXTMEMB0 (rx) : ORIGIN = 0x00000000, LENGTH = 0
  EXTMEMB1 (rx) : ORIGIN = 0x00000000, LENGTH = 0
  EXTMEMB2 (rx) : ORIGIN = 0x00000000, LENGTH = 0
  EXTMEMB3 (rx) : ORIGIN = 0x00000000, LENGTH = 0
}

Thanks for any help.

Offline

 

# 5   2008-07-09 16:41:08 section .text will not fit in region FLASH

Francis
Administrator
From: France-Grenoble
Registered: 2007-07-09
Posts: 890

Re: section .text will not fit in region FLASH

In the second part:
FLASH (rx) : ORIGIN = 0x8006000, LENGTH = 8K
you should replace 8K by 104K  (128-24):
FLASH (rx) : ORIGIN = 0x8006000, LENGTH = 104K

Offline

 

Board footer