/var/www/restricted/ssh/stm32/www/stm32circle/ STM CircleOS forum / Increase of the Flash Primer 1

Username:     
Password:     
             

Forum

# 1   2009-06-04 09:06:27 Increase of the Flash Primer 1

Jierre
Member
Registered: 2009-04-21
Posts: 14

Increase of the Flash Primer 1

Hello !

I am sorry because I know this has been asked a lot of times and I have looked at all the topics.

Each time it is answered to modify the size of the Flash in the Circle_App.ld file.
But the problem I have got is the only files I have got in my project are circle.elf, FAT.elf and Application.c.

And I am trying to compile a sprintf telling me => FLASH IS FULL...

Thanks in advance

Offline

 

# 2   2009-06-04 11:49:09 Increase of the Flash Primer 1

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

Re: Increase of the Flash Primer 1

Circle_APP.ld is a part of the project and specified in the linker option as the script file for the linker. It is located by default in the project directory. But it is not (it could be) listed in the project view.  You have to open it with the editor, to modify it and to save it...

Offline

 

# 3   2009-06-04 15:11:21 Increase of the Flash Primer 1

Jierre
Member
Registered: 2009-04-21
Posts: 14

Re: Increase of the Flash Primer 1

Thanks for answering.

I have to say that I have a lot of trouble to begin with the primer.

  First I do not succeed to update my circleOS over 1.7 because the 3.7 make me an overflow... I tried to follow your explanation here: http://www.stm32circle.com/forum/viewtopic.php?id=531 but I got the code size overflow... I have to admot that I dont understand the last step. How to generate the Fat file?

  Then I can not find some file explaining quite simply how thinks works. I mean, usually, I am going to the datasheet of microcontrollers and it is explained how to run a conversion with an ADC for example. I think I miss something here. How did you learn how everythink works? Just looking at already made application ?

Thanks !

Hope to soon be more confortable and hopefully help somebody else!

Offline

 

# 4   2009-06-11 14:28:29 Increase of the Flash Primer 1

Jierre
Member
Registered: 2009-04-21
Posts: 14

Re: Increase of the Flash Primer 1

Hello,

I am sorry to insist but I am still not able to upgrade my CircleOS. I followed exactly this explanation => http://www.stm32circle.com/forum/viewtopic.php?id=449
But then, every project that I want to program I get "Code Size exceeded"... even if there is nothing in the project like if the circle was already bigger than available.

For the modification of the ld file, have you got some step by step explanation because I couldn't do it either...

Thanks a lot !

Offline

 

# 5   2009-06-11 15:45:11 Increase of the Flash Primer 1

matloub
Member
Registered: 2008-02-21
Posts: 98

Re: Increase of the Flash Primer 1

Hi

Lets try to start from the beginning.
1. You might wanna downlad the latest version of our software Ride7 and Rkit-ARM from
    this link: http://www.mcu-raisonance.com/mcu_downloads.html
2. Unistall (RKit-ARM then Ride7 ) the softwares you had and install new ones (Ride7 first).
3. Plug your primer 1 and try to debug the example in
    c:\program files\raisonance\ride\Examples\ARM\Primer\STM32\toggle
4. open a command prompt and use cd go to
    c:\program files\raisonance\ride\Lib\ARM\CircleOS
    and type Restore_Circle_Factory.bat
From your post until no all the steps should have been done without any problem.
It was just to make sure everthing is working.
5. Let me know what you do (command line you run or project you open or un etc.. and also the error message you get so i can understand you issue.)

Regards,
Matloub

Offline

 

# 6   2009-06-12 09:40:01 Increase of the Flash Primer 1

Jierre
Member
Registered: 2009-04-21
Posts: 14

Re: Increase of the Flash Primer 1

Thanks for your detailed answer.

So I have done everything you said in your message and there is indeed no problem.
I now have my primer under circleOS 3.71. The thing was to reinstall the last Ride7.

So now I program project of mine and it is working fine. But I would like to use an sprintf and when I do, I have got the "Flash is full" building failure. So I opened the circle_app.ld file and modified :

FLASH (rx) : ORIGIN = 0x8004000, LENGTH = 16K // before 0x8006000 and 8K
and
_eflash = 0x8004000 + 16K -1;  // before 0x8006000

But it is obviously not enough, because I still get the "Flash is full mistake".
BTW, I don't really care about debugging and anyway I can not because I get the mirrored screen (needs a harware reset so get out of the debug mode), so if there is a way to get over this "Flash is full" without debugging, it is good for me.

Thank you again !

Offline

 

# 7   2009-06-13 16:57:37 Increase of the Flash Primer 1

repzak
Member
Registered: 2008-03-05
Posts: 170

Re: Increase of the Flash Primer 1

Hello,

I think if Raisonance included my fix in 3.7 the mirrored screen has been fixed? atleast on mine it was fixed at that time??

You remember to change the flash settings in the right section, the first section is commented out i think

Kasper

Offline

 

# 8   2009-06-15 06:36:03 Increase of the Flash Primer 1

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

Re: Increase of the Flash Primer 1

Depending on the 'printf selection' in the linker option, this function could be much more than 16KB. I suggest you replace 16KB by 256KB to be sure that you will not meet this error anymore.

Offline

 

# 9   2009-06-15 08:16:07 Increase of the Flash Primer 1

Jierre
Member
Registered: 2009-04-21
Posts: 14

Re: Increase of the Flash Primer 1

Hi !

Repzak => My primer is now using the 3.7 OS version and I still get this mirrored screen but it is ok, it is not so bad.

I took care about changing in the right section, indeed the first one is commented.

Francis ==> I put 256K as you suggested and it is now different. At least I don't get "Flash is full" anymore. But I get this mistake :

Code:

Building C:\MyDoc\Programing\NewFolderNew\Application0.rapp 
 Running: LD 
 \"C:\Program Files\Raisonance\Ride\arm-gcc\bin\arm-none-eabi-gcc.exe" -mcpu=cortex-m3 -mthumb -Wl,-T -Xlinker "C:\MyDoc\Programing\NewFolderNew\objdebug\Application0.elf.ld" -u _start  -nostartfiles -Wl,-Map -Xlinker "C:\MyDoc\Programing\NewFolderNew\objdebug\Application0.map"   
 c:/program files/raisonance/ride/arm-gcc/bin/../lib/gcc/arm-none-eabi/4.3.2/../../../../arm-none-eabi/lib/thumb2\libc.a(lib_a-sbrkr.o): In function `_sbrk_r':  
 sbrkr.c:(.text+0x12): undefined reference to `_sbrk'  
 c:/program files/raisonance/ride/arm-gcc/bin/../lib/gcc/arm-none-eabi/4.3.2/../../../../arm-none-eabi/lib/thumb2\libc.a(lib_a-writer.o): In function `_write_r':  
 writer.c:(.text+0x16): undefined reference to `_write'  
 c:/program files/raisonance/ride/arm-gcc/bin/../lib/gcc/arm-none-eabi/4.3.2/../../../../arm-none-eabi/lib/thumb2\libc.a(lib_a-closer.o): In function `_close_r':  
 closer.c:(.text+0x12): undefined reference to `_close'  
 c:/program files/raisonance/ride/arm-gcc/bin/../lib/gcc/arm-none-eabi/4.3.2/../../../../arm-none-eabi/lib/thumb2\libc.a(lib_a-fstatr.o): In function `_fstat_r':  
 fstatr.c:(.text+0x14): undefined reference to `_fstat'  
 c:/program files/raisonance/ride/arm-gcc/bin/../lib/gcc/arm-none-eabi/4.3.2/../../../../arm-none-eabi/lib/thumb2\libc.a(lib_a-isattyr.o): In function `_isatty_r':  
 isattyr.c:(.text+0x12): undefined reference to `_isatty'  
 c:/program files/raisonance/ride/arm-gcc/bin/../lib/gcc/arm-none-eabi/4.3.2/../../../../arm-none-eabi/lib/thumb2\libc.a(lib_a-lseekr.o): In function `_lseek_r':  
 lseekr.c:(.text+0x16): undefined reference to `_lseek'  
 c:/program files/raisonance/ride/arm-gcc/bin/../lib/gcc/arm-none-eabi/4.3.2/../../../../arm-none-eabi/lib/thumb2\libc.a(lib_a-readr.o): In function `_read_r':  
 readr.c:(.text+0x16): undefined reference to `_read'  
 collect2: ld returned 1 exit status  
  
Build failed

I tried to touch the project properties about the printf but it does not change anything and actually what I want to do is a sprintf so I dont know if it is similar.

Thanks for your helps !!

Offline

 

# 10   2009-06-18 06:59:52 Increase of the Flash Primer 1

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

Re: Increase of the Flash Primer 1

These errors come when you call (directly or indirectly) the memory allocator. I believe that there are many posts about the same issue (search for "sbrk" on this forum) and Vincent has already answered a few times.
Anyway, we will improve this situation in the future...

Offline

 

# 11   2009-06-18 14:50:47 Increase of the Flash Primer 1

Jierre
Member
Registered: 2009-04-21
Posts: 14

Re: Increase of the Flash Primer 1

Hi !
I had a look on previous messages and the solution for me was to include  the UART0 putchar librairy in the project properties.

Thank you very much for the help !

Offline

 

Board footer