Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT




Loading

Running FreeRTOS on Basys3 Board (Artix-7 FPGA) with MicroBlaze

Posted by droz on October 27, 2017

I'm trying to run FreeRTOS on the Basys3 board, which features the Artix-7 FPGA, with the MicroBlaze soft processor, but I've had issues with the lack of enough ILMB memory. The Basys3 has 1800Kb of BRAM on it, so the MicroBlaze can only have a maximum 128 KB memory configuration. When I try making a new FreeRTOS "Hello World" application in Xilinx SDK, gives me the error: "lab8bf.elf section .bss' will not fit in regionmicroblaze0localmemoryilmbbramifcntlrMemmicroblaze0localmemorydlmbbramifcntlrMem'" `microblaze0localmemoryilmbbramifcntlrMemmicroblaze0localmemorydlmbbramifcntlrMem' overflowed by 61744 bytes

My question is: how much memory does a basic FreeRTOS application need? Is there any way to decrease the size of the .bss region of a FreeRTOS .elf, or to allow MicroBlaze to increase its ILMB size further?


Running FreeRTOS on Basys3 Board (Artix-7 FPGA) with MicroBlaze

Posted by rtel on October 27, 2017

My question is: how much memory does a basic FreeRTOS application need?

If you are talking about the application that uses FreeRTOS, then I have no idea, as its not my application and I've never seen it. If you mean to ask how much RAM does FreeRTOS need then in itself it is very little (about 200 bytes), but you also need RAM for the stack of each task created. The RAM for task stacks comes from the FreeRTOS heap, and the size of the FreeRTOS heap is set by the linker script if you are using heap3.c, or configTOTALHEAP_SIZE if you are using any of the other four heap implementations. I would recommend trying to reduce the heap size.

http://www.freertos.org/a00111.html


Running FreeRTOS on Basys3 Board (Artix-7 FPGA) with MicroBlaze

Posted by rocco-matano on October 29, 2017

The standard projects that the Xilinx SDK (version 2017) creates request a heap size of 64k. That is done by creating a FreeRTOSConfig.h with the line #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 65536 ) ) I think this can be changed by editing the properties of the generated BSP.

While 64k is more than a simple application needs, you still need some heap space. Since the linker reports 61744 missing bytes, just reducing the heap size probably won't be the only thing you have to change in order to fit your application into 128k.


Running FreeRTOS on Basys3 Board (Artix-7 FPGA) with MicroBlaze

Posted by droz on November 5, 2017

Thanks for the additional information. I have a follow-up question, then. I'm willing to use any FreeRTOS application for a class example. What is the smallest possible application that I can make that uses FreeRTOS on the MicroBlaze processor? For now, I'm willing to use any sample program that will build in this 128 KB space. If the "FreeRTOS Hello World" application built into Xilinx SDK is too large, what could I do to bring it down to a more reasonable size?


Running FreeRTOS on Basys3 Board (Artix-7 FPGA) with MicroBlaze

Posted by rtel on November 5, 2017

I would be very surprised if a 'hello world' application that just sat in a loop, delaying and toggling an LED every second, or whatever, would not fit. It must be building something else too.


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]




Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

FreeRTOS kernel V10 is available for immediate download. Now MIT licensed.


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS