Quality RTOS & Embedded Software

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


Loading

FreeRTOS problems under Ubuntu OS

Posted by abeltom87 on December 3, 2017

I am trying to run two tasks using FreeRTOS APIs. I followed the Handson Tutorial pdf of FreeRTOS, but my task runs just once and stops.I am using the FreeRTOS kernel on x86 Intel. I am able to compie and run the code.

My OS is Ubuntu, I am using Eclipse Toolchain with GCC. If anyone has experience with this, they could give me some pointers as to how to do it right.

Here is my code:

~~~ static unsigned long uxQueueSendPassedCount = 0;

void vTask1(void *pvParameters) { const char *strtodisplay="This is task1nr"; while(1) { printf("%s",strtodisplay); vTaskDelay(1000);

}

}

void vTask2(void *pvParameters) { const char *strtodisplay="This is task2nr";

while(1)
{
  printf("%s",str_to_display);
  vTaskDelay(1000);
}

}

int main() {

xTaskCreate(vTask1, (signed char *)"Task1",1000,NULL,3,NULL);
xTaskCreate(vTask2,(signed char *)"Task2",100,NULL,1,NULL);

vTaskStartScheduler();
while(1)
{

}
return 0;

} ~~~

Other things i tried : 1. Created just one task, with infinite loop and it runs as expected, 2. Created just one task, added vtaskDelay, and i get an error "Segmentation fault (core dumped)"


FreeRTOS problems under Ubuntu OS

Posted by heinbali01 on December 3, 2017

When using the Windows simulating environment, you can not use Windows' API's, such as printf(). We did provide a safe way to print logging, see demo_logging.c:

~~~ void vLoggingPrintf( const char *pcFormat, ... ); ~~~


FreeRTOS problems under Ubuntu OS

Posted by abeltom87 on December 3, 2017

Thank you for your response Sir, but i am on Linux. And i adapted my software using this as a basis described here.


FreeRTOS problems under Ubuntu OS

Posted by heinbali01 on December 4, 2017

I haven't tried out the simulation under Linux, but I bet that calling printf() is not supported neither.


[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ Sitemap ]    [ ]


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

Latest News

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