Quality RTOS & Embedded Software

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




Loading

SAM7X Demo error in linkerscript (Yagarto)

Posted by Rob Bekkers on February 21, 2012
I discovered something, that is in my humble opinion an error, in the atmel-rom.ld linker script that comes with the FreeRTOS 7.1.0 demo. The original initilises the symbol __data_beg_src__ in the .data segment:
.data :
{
__data_beg__ = .;
__data_beg_src__ = __end_of_text__;
*(.data)
__data_end__ = .;
} >ram AT>flash

This causes however that the value of the symbol will be in the 300xxx range of the address space instead of the 100xxx range. Apparantly the Yagarto linker adds the base value of the segment to the symbol. Therefore the initialisation of the C-variables fails. For the demo it does not seem to be a problem but when using other functions for your own apllications the controller will surely crash. For example my printf hang-up the system. By moving the __data_beg_src__ initialisation to the .text segment the problem is solved:

prog :
{
*(.text)
*(.rodata)
*(.rodata*)
*(.glue_7)
*(.glue_7t)
} >flash

__end_of_text__ = .;
__data_beg_src__ = __end_of_text__;

.data :
{
__data_beg__ = .;
*(.data)
__data_end__ = .;
} >ram AT>flash

I tested this with Yagarto 4.6.2 and after modification everything (also printf) works.

Does anybody have similar experiences?

Rob

RE: SAM7X Demo error in linkerscript (Yagarto)

Posted by Richard on February 21, 2012
Thanks for your feedback. I will look into this.

This particular demo is very, very, old and probably not used that much any more and the SAM3 chips are being pushed more by Atmel. I don't think the linker script has ever been modified. From your post it would appear as if it was originally created from a linker script used to run the code from RAM.

Regards.


[ 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