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


Noted potetntial issue with ARM7 port

Posted by Robert Warner on November 5, 2008
On switching back and forth between Thumb mode and ARM mode there is a potential stack issue. I'm attempting to narrow it down further but have a question of the FreeRTOS port for the ARM7. Can FreeRTOS port run purely in ARM mode for the AT91SAM7xxxx cores? This would help the debug effort such that i can rule out the ARM to Thumb back to ARM switching (if it is in fact not the issue).

I am using the ARM7_AT91SAM7X256_Eclipse FreeRTOS demo as my base. And using the Yagarto tool chain as the compiler/linker etc.

The driver i'm debugging is using the SSC port on the AT91SAM7SE256 (similar to the AT91SAM7 in the port). It is DMA'ing a set piece of data over and over and approximately after 2000 transmissions is when the data becomes corrupted (looking both on an oscope and the data copied into the buffer prior to transmission via DMA. I can tell it's the ~2000th piece of data due to count value i have in the data being transmitted.

If i get the system to build purely in ARM mode i would rerun these tests to see if it something related with the SSC and DMA. So just to reiterate the question, can FreeRTOS port run purely in ARM mode for the AT91SAM7xxxx cores?


RE: Noted potetntial issue with ARM7 port

Posted by Richard on November 5, 2008
I have co-incidentally written an application that uses THUMB mode and the SSC port with DMA (along with numerous other peripherals with DMA) on a SAM7, if there were issues I'm sure the customer would have let me know by now :o)

Take a look at the batch files in the FreeRTOS/Demo/ARM7_LPC2106_GCC directory, these together with the makefile show you how two switch between ARM only and ARM/THUMB interworked builds albeit for an LPC2000. I'm not sure however if I have ever run the SAM7 purely in ARM mode as the device is optimised for THUMB operation.

From memory - remove the -DTHUMB_INTERWORK compile time option, and probably a couple of more GCC specifics like -mthumb-interwork and -mthumb flags.


RE: Noted potetntial issue with ARM7 port

Posted by Robert Warner on November 5, 2008
Ok, have it compiled for ARM mode and the issues is still present. I'm sure it's something with the my SSC driver.

RE: Noted potetntial issue with ARM7 port

Posted by Robert Warner on November 7, 2008
Forgot __attribute__ ((naked)); on my ISR Wrapper .... :/

[ 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