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


FreeRTOS on ADuC834 using internal 2k XRAM

Posted by Nobody/Anonymous on April 14, 2006
I tried to port FreeRTOS to Analog Devices ADuC834.
Everything is ok when I only run the idle task (no other task) using 2k of external XRAM. When I switch over to internal 2k XRAM ( CFG834 = 0x01; in _sdcc_external_startup() ) the system hangs up in the macro

#define portCOPY_XRAM_TO_STACK()


ucStackBytes = pxXRAMStack[ 0 ];

is not set correctly (value of ucStackBytes is 255).

Is anybody experienced in using FreeRTOS with internal XRAM?
Thank you in advance.


RE: FreeRTOS on ADuC834 using internal 2k XRAM

Posted by Richard on April 16, 2006
Sorry, I'm not familiar with this device. Which compiler are you using? Sounds most likely to be a linker problem.


RE: FreeRTOS on ADuC834 using internal 2k XRA

Posted by Nobody/Anonymous on April 17, 2006
Richard, I'm using SDCC 2.5.0. The ADuC834 is controller with an 8051-based core and instruction set and integrated adc and dac peripherals. It runs with 12.58 MHz and 12 clock periodes per machine cycle.

I must use the function vPortInitialiseBlocks() in the _sdcc_external_startup() to get the variable

static size_t xNextFreeByte = ( size_t ) 0;

in heap_1.c set correctly.

Best regards


This is the whole program:

#include <ADuC834.h>

/* Standard includes. */
#include <stdlib.h>
#include <stdio.h>

/* Scheduler includes. */
#include "FreeRTOS.h"
#include "task.h"

* startup configuration of controller
unsigned char _sdcc_external_startup( void)
// configure core clock
PLLCON = 0;// core clock = 12.582912 MHz
while ( ( PLLCON & 0x40) == 0 ) ; // wait for PLL to lock
// CFG834 = 0x01; // enable 2k internal XRAM
// configure UART
T3CON = 0x85;// configure timer 3...
T3FD = 0x12;// ...for 9600 baud
SCON = 0x52;// configure UART (using timer 3)


return 0;

* use the idle task hook for toggling the LED on port P1.1
void vApplicationIdleHook( void )
P1 ^= 0x01;

* Starts blink task, then starts the scheduler.
void main( void)
char ch;

ch = getchar(); // wait for keypress to continue
printf( "\nFreeRTOS Blink Demo\n" );

/* Finally kick off the scheduler. This function should never return. */
/* only use the idle task for tests */

printf( "Should never reach here!!!\n" );

/* Should never reach here as the tasks will now be executing under control
of the scheduler. */

[ 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