/var/www/restricted/ssh/stm32/www/stm32circle/ STM CircleOS forum / Memory layout - What is the correct way of setting up a new project ?

Username:     
Password:     
             

Forum
  • Index
  •  » STM32 primer
  •  » Memory layout - What is the correct way of setting up a new project ?

# 1   2010-03-17 22:07:40 Memory layout - What is the correct way of setting up a new project ?

Snakehand
New member
Registered: 2010-03-12
Posts: 3

Memory layout - What is the correct way of setting up a new project ?

I am pretty new to the Primer2 - and think the learning curve is rather steep.

1) I started with the a Hello world application - no problem.

2) I decided I want to read blocks of data from an SD card for a project, so I drop in the SD code from the mass storage example: Kaboom !!! - the default link file is wrong and reserves to little space for the code, so I have to edit the linker script in several places.

3) I probe an 8GB SD card - and the data is all wrong: The STM example code I worked from simply overflows a 32 unsigned integer - and I have to try and fix the examples.

4)While debugging - I then get thrown out of the debugger - it claims my program is too big: even though Text=17224 , data = 48 and bss=920 so I should be no where near the 32K limit, but still some functions have been orged to > 0x8008000

Now I can't help but think that I must have done something "wrong" from the very outset. So my rather simple question is: How am I supposed to set up a "simple" project in Ride7 without having to wrestle with linker scripts like I am now doing ?

Last edited by Snakehand (2010-03-17 22:08:37)

Offline

 

# 2   2010-03-17 22:19:15 Memory layout - What is the correct way of setting up a new project ?

ntrf.zns
Member
From: Belgorod, Russia
Registered: 2009-11-01
Posts: 134

Re: Memory layout - What is the correct way of setting up a new project ?

By default CircleOS reserves only 8Kb of code space for debugable code. If you want more you need to buy the unlock code or somehow continue without using OS. Read the manual (should be on the CD) for details of memory layout.

Offline

 

# 3   2010-03-17 22:26:46 Memory layout - What is the correct way of setting up a new project ?

Snakehand
New member
Registered: 2010-03-12
Posts: 3

Re: Memory layout - What is the correct way of setting up a new project ?

ntrf.zns :

By default CircleOS reserves only 8Kb of code space for debugable code. If you want more you need to buy the unlock code or somehow continue without using OS. Read the manual (should be on the CD) for details of memory layout.

From the manual you refer to:

Note: The standard STM32-Primer2 is limited to debug in the first 32KB only. A software key can be purchased on http://www.stm32circle.com/ to allow debugging in the whole 512KB of memory.

Edit:
I didn't realize that 24kb has been eaten by CircleOS itself. It would be nice if STM would fix their SD code - since they obviously do not want me to do their work for them tongue

Last edited by Snakehand (2010-03-17 22:35:56)

Offline

 

  • Index
  •  » STM32 primer
  •  » Memory layout - What is the correct way of setting up a new project ?

Board footer