Quality RTOS & Embedded Software

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


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_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 :
} >flash

__end_of_text__ = .;
__data_beg_src__ = __end_of_text__;

.data :
__data_beg__ = .;
__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?


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.


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

Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.

Free TCP/IP and file system demos for the RTOS

Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

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

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

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

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists