cancel
Showing results for 
Search instead for 
Did you mean: 

RAM overflowed on nucleo32 board (stm32f303k8) board while using FreeRTOS.

neelesh_vish
Associate II

Hi team,

I am trying to implement FreeRTOS on nucleo32 board (stm32f303k8) on building the same with the one FreeRTOS task, I am getting a error that RAM overflowed by 66456 bytes.

It can be resolved or I need to go with some other high memory boards?

Screenshot (12).png

 

1 ACCEPTED SOLUTION

Accepted Solutions

If you increase the size of the FLASH in the linker script, or related dialogs, the linker can get closure, with an unusable image, but you can inspect the .MAP file to see what's allocated to what/whom

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

View solution in original post

10 REPLIES 10

Unless you can make your RAM utilization smaller you'll need a more capable part. Doesn't your current choice only have 12KB SRAM

What are you statically allocating that's going to put you 64KB over the available space?

Got some large 32-bit or float arrays? Too many tasks, too much stack space for each?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
neelesh_vish
Associate II

I'm making just one task that too stack size of 30. I just want to print something as I am just a beginner with RTOS.

Still I don't know where it wants this much space.

Screenshot (15).png

 

If you increase the size of the FLASH in the linker script, or related dialogs, the linker can get closure, with an unusable image, but you can inspect the .MAP file to see what's allocated to what/whom

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
neelesh_vish
Associate II

As you told to increase the size of FLASH in linker script,  I tried that, but the error was still there so I tried to increase the size of RAM (I know it's out of range) the error got resolved here, but I know it won't work for the future. While debugging the project it stuck in the HardFault_Handler.

As I inspected through built analyzer to check memory usage, I got that ucHeap is consuming around 75KB of memory. How can we reduce it?

 

Screenshot (16).png

Andrew Neil
Evangelist III

@neelesh_vish wrote:

I am trying to implement FreeRTOS on nucleo32 board (stm32f303k8) o


Why?

That chip has only 12K of RAM - it seems highly unlikely that any application which will fit into just 12K RAM is going to benefit from an RTOS !

 


@neelesh_vish wrote:

It can be resolved or I need to go with some other high memory boards?


Going with a more appropriately-sized chip would seem like the most sensible way forward.

Maybe an expert could shoe-horn this into such a small processor - but that doesn't seem like a sensible approach for a novice?

Maybe a better learning approach would be to use the Windows Simulator:

https://www.freertos.org/FreeRTOS-Windows-Simulator-Emulator-for-Visual-Studio-and-Eclipse-MingW.html

 

neelesh_vish
Associate II

Actually, I just started learning RTOS and I have only this chip board available with me. So I tried some printing task on this. I don't think the printing of one or two task will consume this much of memory.

Currently I am able to fix the issue, but yeah for the next I will go ahead with some higher memory boards.

 

Thanks @Tesla DeLorean  and @Andrew Neil 


Currently I am able to fix the issue,


Hello @neelesh_vish ,

Could you please tell us how you did fix the issue?

As said by @Andrew Neil, this chip has only 12K of SRAM and there is no sense to increase its size more.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

@neelesh_vish wrote:

Actually, I just started learning RTOS and I have only this chip board available with me.


Again, there's the Windows simulator available precisely for this - this lets you concentrate on learning the RTOS without any of the added complications of real hardware.

In the linker script of the project the total heap size was defined as 75*1024 (#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 75 * 1024 ) )that is because I have copied this FreeRTOSconfig.h linker script from other project. now I change it to (#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 10 * 1024 ) ))  and it started working. 

I will change the board for next, as I just want to print some lines that why I used it.