/var/www/restricted/ssh/stm32/www/stm32circle/ STM CircleOS forum / FAQ needed: on Primer2 we have 512K ... or 128K .... or what?

Username:     
Password:     
             

Forum
  • Index
  •  » STM32 primer
  •  » FAQ needed: on Primer2 we have 512K ... or 128K .... or what?

# 1   2009-01-31 09:04:39 FAQ needed: on Primer2 we have 512K ... or 128K .... or what?

dzingoni
Member
Registered: 2008-12-16
Posts: 13

FAQ needed: on Primer2 we have 512K ... or 128K .... or what?

Hi everybody, I'm a lot confused about the available flash memory for programming, the amount that is available after CircleOS is installed, what can be debugged , what files can / must be manually edited ....

I spent a whole day figuring out how to compile the "PrimerMouse 1.1" demo program on a Primer2. Although it's supposed to be updated and to contain a project for the primer 2, it was indeed quite difficult to compile it, and took a lot of:
- understanding why the Ride ide often complainted about "FLASH IS FULL" or Flashb1 full
- searching through the forums
- manyally modifying the project, creating a new one (it was impossible to use circle_mgs with mouseLib.lib) , and ...
- manually tweaking the Circle_app.ld file.

I finally ended up with the program running ... but with lots of doubts. Can someone explain why ....

1) Circle_app.ld file must be manually modified?
2) it contains references to STM32F103_128K_20K_DEF.ld ... in the primer 2 we have a 512k flas device, right? So why 128K?
3) why we have to modify manually the amount of flash? I saw a lot of answers on the forum stating that the memory section must be modified like this:
MEMORY
{
  RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 16K
  FLASH (rx) : ORIGIN = 0x8006000, LENGTH = 128K-0x6000
  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
}

with a reference to 128k - 0x6000, that is 128k - 24k?
4) Is 24k the size of CircleOS ? I suppose it WAS the size of CircleOS some version ago, but now with version 3.3 it has increased and so these numbers are inaccurate ....
5) Finally, what can be debugged? Is there a 32K limit? Is it 32k with or without CircleOS? Is it 32k with or without debugging information?
6) P.S: and what it the setting that must be somewhere about a "develop limitation"?

So ... a little clarification, a FAQ about these subjects would be really welcome....
Thank you.

Offline

 

# 2   2009-01-31 16:31:15 FAQ needed: on Primer2 we have 512K ... or 128K .... or what?

argv
New member
Registered: 2009-01-30
Posts: 3

Re: FAQ needed: on Primer2 we have 512K ... or 128K .... or what?

http://www.st.com/mcu/contentid-105-110 … RIMER.html

the STM32 Primer 2 features an STM3210E microcontroller (512 Kbytes Flash), 128x160 touch screen color TFT display, codec-based audio record and playback, Micro SD card, IrDA transceiver, a 20-pin connector with SPI, I2C, USART, CAN and I/Os, a Li-Ion battery with smart loading control for improved current management and extended battery life

Offline

 

# 3   2009-02-01 12:58:48 FAQ needed: on Primer2 we have 512K ... or 128K .... or what?

dzingoni
Member
Registered: 2008-12-16
Posts: 13

Re: FAQ needed: on Primer2 we have 512K ... or 128K .... or what?

Thank you, but I knew all these things ... the problem is with the Ride development tools, that seem to forget that a lot of things have changes from Primer to Primer 2, and still use definition files talking about 128K that probably date back to the first Primer board ... here a clarification is needed, or an update to the development tools.

Offline

 

# 4   2009-02-02 08:33:45 FAQ needed: on Primer2 we have 512K ... or 128K .... or what?

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

Re: FAQ needed: on Primer2 we have 512K ... or 128K .... or what?

To your questions:

Offline

 

# 5   2009-02-02 08:47:05 FAQ needed: on Primer2 we have 512K ... or 128K .... or what?

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

Re: FAQ needed: on Primer2 we have 512K ... or 128K .... or what?

To your questions:

1. Circle_app.ld file must be manually modified?
Yes. By default, the ld file is set to allow debugging. Therefore, the FKASH size is limited up to 8KB. You can extend if you want to discard this limitation (at least for linking). 
For 'CircleOS applications', the LD file is used only for debugging (only the relocatable object files are managed by Circle_Mgr) and the FLASH size is not so important .

2. it contains references to STM32F103_128K_20K_DEF.ld ...
Most of the applications should work as well with one primer or the other (as long as they don't use the Primer2 specific advanced features such as audio or touchscreen...)

3. and 4.
Yes, 24KB used to be the code size reserved for both CircleOS and the FAT. Since version 3.0, 128KB is reserved at the top of the FLASH in Primer2, and 16KB for Primer1. But 24KB is still the space reserved in the 'debuggable area'.

5. Yes, only the first 32KB can be debugged. The upper memory used by CircleOS is not debuggable, but is used only
during the initialization stage and it contains also the const data (sound, images,...) that don't need to be debugged.

6. Yes, we should improved the documentation (the latest 'Getting Started' contains more information and we will publish this week a new document  about  the design of CircleOS.

Offline

 

  • Index
  •  » STM32 primer
  •  » FAQ needed: on Primer2 we have 512K ... or 128K .... or what?

Board footer