building RTOS in arty board

haydoiday228 wrote on Wednesday, November 09, 2016:

Hello Admin,
I want build a system runing RTOS in microblaze. Can you help me? please
and i have a question: How much RAM for system runing RTOS?
Thanks.

rtel wrote on Wednesday, November 09, 2016:

You should be able to use the following as a base for your project, but
will need to change the hardware project, which defines the Microblaze
configuration, to be correct for your hardware:
http://www.freertos.org/RTOS-Xilinx-Microblaze-KC705.html

On a Microblaze you should expect a MINIMUM of about 170 words (so 170*4
bytes) of RAM per task for use by the task as its stack. If the task is
doing something complex, or calling functions like printf(), then it
will need a bigger stack.

haydoiday228 wrote on Wednesday, November 09, 2016:

Thanks you for respone.
I was builded a project with 64KB Ram on microblaze but it overflowed by 127344 bytes.
My system include : a Microblze, Uart, 4 GPIOs, clock 80Mhz.

rtel wrote on Wednesday, November 09, 2016:

Look forward to hearing your reply.

Did you ask a question?

edwards3 wrote on Wednesday, November 09, 2016:

look at the map file output by GCC to see where the RAM is used and check you dont have configTOTAL_HEAP_SIZE set too high http://www.freertos.org/a00111.html

haydoiday228 wrote on Wednesday, November 09, 2016:

I am sorry.
if 70 words of RAM per task, while microblaze have 64KB RAM, but sdk respone error overflowed by 127344 bytes.

rtel wrote on Wednesday, November 09, 2016:

When does it overflow? If it is when you compile then it's not a FreeRTOS issue, you are just trying to use more RAM than the linker script is telling the compiler you have available. Unless you are using a completely statically allocate system the stacks will no be allocated from the RAM you have available until you create the tasks at run time.

Which heap memory allocated are you using? Heap_1, 2, 3, 4 or 5 (refer to the link in the post above).

haydoiday228 wrote on Wednesday, November 09, 2016:

thanks

rtel wrote on Wednesday, November 09, 2016:

I’m afraid this is a question on how to use the tools, not how to use
FreeRTOS (for example, does your linker script know about the DDR RAM?),
and this is a FreeRTOS forum - and you have not answered any of the
questions already asked either.

However, the first thing you need to do, as has already been said in
this thread, it to check the map file if one has been output (maybe the
linker didn’t output one if the build was not successful) to see where
the RAM is being used. Also, as mentioned in the thread already, pay
particular attention to the configTOTAL_HEAP_SIZE unless you are using
heap_3.