Quality RTOS & Embedded Software

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




Loading

Adapting FreeRTOS demo to SAM7-P64

Posted by Bart on June 1, 2010
Hi,

For 2 days now i have been struggling with adapting the FreeRTOS demo from SAM7X256-Eclipse to my Olimex SAM7-P64 board. I managed to compile the project, but when I try to change the Flash and Ram sizes in the linker script, I get two errors that say Ram and Flash are overflowed and certain sections won't fit inside them. I tried to get rid of every task in the project, because I just want to have a simple pure blank project for future use. Can anyone help me with porting the demo application? I would be very grateful. I started with changing the mem sizes of ram and flash in the ld file, and tried to comment all the tasks from main, and after that deleting some object files from the linker script. But it doesn't work. I'm running out of mana. Please help.

RE: Adapting FreeRTOS demo to SAM7-P64

Posted by Dave on June 2, 2010
Look for configTOTAL_HEAP_SIZE in FreeRTOSConfig.h. What is it set to? You will probably have to make it much smaller to switch to a chip with less RAM.

RE: Adapting FreeRTOS demo to SAM7-P64

Posted by Bart on June 2, 2010
It is set to
#define configTOTAL_HEAP_SIZE( ( size_t ) ( 24 * 1024 ) )


Is there some reference where I can find the meaning of all the #define's? I would really appreciate some help with this. So what should I set it to?

RE: Adapting FreeRTOS demo to SAM7-P64

Posted by Richard on June 2, 2010
Search for configTOTAL_HEAP_SIZE on http://www.freertos.org/a00110.html

Regards.

RE: Adapting FreeRTOS demo to SAM7-P64

Posted by Bart on June 2, 2010
Thanks very much I aprreciate your help, I changed the heap size to 1024 for now and managed to remove all the tasks from the demo succesfully. I can build the .bin now. But I am not sure if I have to change the values here:

;------------------------------------------------------------------------------
;- Top of Stack Definition
;-------------------------
;- Interrupt and Supervisor Stack are located at the top of internal memory in
;- order to speed the exception handling context saving and restoring.
;- ARM_MODE_SVC (Application, C) Stack is located at the top of the external memory.
;------------------------------------------------------------------------------

IRQ_STACK_SIZE EQU 300

ARM_MODE_FIQ EQU 0x11
ARM_MODE_IRQ EQU 0x12
ARM_MODE_SVC EQU 0x13

I_BIT EQU 0x80
F_BIT EQU 0x40


Is it ok if I leave it just like that or should i change it?

RE: Adapting FreeRTOS demo to SAM7-P64

Posted by Dave on June 2, 2010
The IRQ stack is separate and allocated by the linker. You can leave that value unmodified.

I suspect you will have to increase configTOTAL_HEAP_SIZE again when you start trying to create tasks.

RE: Adapting FreeRTOS demo to SAM7-P64

Posted by Dorian Gray on June 9, 2010
I have made this for me.
http://rapidshare.com/files/397026535/freertosAT91.zip.html


[ 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