/var/www/restricted/ssh/stm32/www/stm32circle/ STM CircleOS forum / Trying to build simple project - Linker error "Flash is full"

Username:     
Password:     
             

Forum
  • Index
  •  » circleOS
  •  » Trying to build simple project - Linker error "Flash is full"

# 1   2010-12-16 12:41:53 Trying to build simple project - Linker error "Flash is full"

mikepo
Member
From: USA
Registered: 2010-12-03
Posts: 36

Trying to build simple project - Linker error "Flash is full"

Hi All,
I am trying to build a simple CircleOS 4.1 project for the EvoPrimer (STM32E target board) that uses USART in Ride7. I started out with the simple "Hello World" application template.
So far I have just added:

Code:

#include "stm32f10x_gpio.h"
#include "circle_api.h"

I also copied the ST library source files and included them in my project as suggested here in the forums:
stm32f10x_gpio.c
stm32f10x_rcc.c
stm32f10x_usart.c

I used the ST version 3.1 files, the same as used in CircleOS to avoid any conflicts there.

When I try to do Project -> Build Project I get the following linker error:

Code:

c:/program files/raisonance/ride/arm-gcc/bin/../lib/gcc/arm-none-eabi/4.5.1/../../../../arm-none-eabi/bin/ld.exe: C:\Personal\Electronics\STM32EvoPrimer\MyProjects\Serial_USART\objdebug\Serial_USART2.elf section `.text' will not fit in region `FLASH'  
 C:\Personal\Electronics\STM32EvoPrimer\MyProjects\Serial_USART\objdebug\Serial_USART2.elf.ld:25: undefined symbol `!!!!!!!!! FLASH IS FULL !!!!!!!!!' referenced in expression  
 collect2: ld returned 1 exit status

I haven't even added any other code yet, how can this already be too big to fit in Flash.
If I do not include stm32f10x_usart.c the project builds, but I assume I will need that file for the USART functionality...
Is there a sample project for USART in CircleOS 4.1. I searched through all the posts and projects and couldn't find a complete working sample.
In some other posts I found some reference to look at "LD Linker/Libraires/Use OLD Precompiled", but that option doesn't exist in the Ride version I have (7.30.10.0159).
Thanks for any pointers here, I am kind of stuck.
Mike

Last edited by mikepo (2010-12-16 13:27:41)

Offline

 

# 2   2010-12-17 08:01:55 Trying to build simple project - Linker error "Flash is full"

yrt
Administrator
From: Grenoble-France
Registered: 2008-06-11
Posts: 520
Website

Re: Trying to build simple project - Linker error "Flash is full"

Hi Mike,

By default, the EvoPrimer CircleOS applications size is limited to 16Kb. If you need more Flash, modify the linker script ("Circle_App_OP4.ld" in your case) at these two lines :
FLASH (rx) : ORIGIN = 0x800C000, LENGTH = 16K
_eflash = 0x800C000 + 16K -1;

However, it is strange that you already overrun the limit.



Yves

Offline

 

# 3   2010-12-17 14:21:32 Trying to build simple project - Linker error "Flash is full"

mikepo
Member
From: USA
Registered: 2010-12-03
Posts: 36

Re: Trying to build simple project - Linker error "Flash is full"

Hello Yves,
thank you for the tip.
Also, what I found is by default in Ride7 for a new EvoPrimer project the setting
"LD Linker" -> "General" -> "Remove unused sections" was set to "No".
Once I switched that to "Yes" I did not get the "Flash is Full" message anymore and it compiles/links fine now.

So now I think I can go up to the 16 KB you mentioned.
But it is really good to know how to increase the app size.

How can you tell in Ride7 how big your compiled code will be?
How much flash does CircleOS 4.1 take up?

Mike

Offline

 

# 4   2010-12-20 07:41:58 Trying to build simple project - Linker error "Flash is full"

yrt
Administrator
From: Grenoble-France
Registered: 2008-06-11
Posts: 520
Website

Re: Trying to build simple project - Linker error "Flash is full"

Hi Mike,

Thank you for the report, the option should be set to yes by default.
Information about CircleOS flash size is available in the conception document, located on the CircleOS project description, in Resources pages.

Yves

Offline

 

  • Index
  •  » circleOS
  •  » Trying to build simple project - Linker error "Flash is full"

Board footer