Quality RTOS & Embedded Software

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


Loading

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()

because

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.

Bernhard

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.

Regards.

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

Bernhard


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)

vPortInitialiseBlocks();

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 */
vTaskStartScheduler();

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 ]    [ Privacy ]    [ Sitemap ]    [ ]


Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

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

Xilinx Microblaze and Zynq partner