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




Loading

Code of task does not get started

Posted by pajk on February 15, 2009
Hi to you all,

Let the code speak for her self:

MAIN:

int main()
{
xTaskCreate( vTestTask, "TST_TSK", configMINIMAL_STACK_SIZE, NULL, TEST_TASK_PRIORITY, NULL );
vTaskStartScheduler();

return 0;
}

TASK:
void vTestTask(void * parameters)
{
while(1)
{
/*can be any simple indicator that task has been started */
IO0SET = LED_PIN;
}
}

I am using rowley compiler(1.7 vesion) and arch is ARM 7 -TDMI using kernel 4.8.0.

With leds-debugs i saw that i get in vTaskStartScheduler() function but task does not get started not even once
(LED have mercy and light up plz). Is something missing in the code?

I use only 1 task so priorities should not be the problem. I don use UART or other timers.

What can be wrong?
Does any body has any clue?

PS. how can i use version 4.8 traceing (goal : not to introduce other problems with tracing)



RE: Code of task does not get started

Posted by MEdwards on February 15, 2009
Try stepping thru in the debugger to see what goes wrong. My guess is you are not calling main from Supervisor mode. Rowley requires SUPERVISOR_START to be defined.

RE: Code of task does not get started

Posted by Colin Tan on February 16, 2009
You could test to see if the pins are properly configured.

In Partest.c ensure that the pins are initialised correctly by:

void vParTestInitialise( void )

and set the pins to high this should light up the leds.

Of course disable all tasks first. Once the LEDs are lit up you know it is the task and not the config.

Hope this helps

RE: Code of task does not get started

Posted by pajk on February 16, 2009
Hi,

first thanks for replays.

I started demo project (ARM7_LPC2138_Rowley) with above defined task and it run as it should.
So conclusion is that my code is ok, but project settings are not.

When I defined SUPERVISOR_START in crt0.s it it worked.


Very much thanks MEdwards. Do you use rowley, sir ?


Pajk


[ 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