FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [April 2006 Threads] FreeRTOS on ADuC834 using internal 2k XRAMPosted 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 XRAMPosted 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 XRAPosted 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. */ } /*-----------------------------------------------------------*/
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|