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


posix simulator

Posted by alpha86 on March 25, 2011
Hi will appreciate if you guys could enlighten me on some doubts:

1) the windows and posix simulator runs expected on my computer (win7/linux) but when i run on debian (arm9) the freeRTOS does run but timing is weird. a delay of (500/ portTICK_RATE_MS) will only be waken again after 2-3 sec instead of 500 milisec. any suggestion which part of the code/configuration to look out for? the settings are all default as the freertos posix demo. fyi, i'm cross compiling for the gnu arm.

2) I have used the AsyncIO on the demo and it looks good. will like to know if it will be a good way to call read(2) from ISR(which is what the demo is doing) or wake a task from ISR where the task will do the read(2). I'm assuming reading lots of bytes.

3) related to q2, to do a posix write(2) to a uart device (baud 57600), is it okay to issue the write(2) command from a normal task? i'm assuming context switch will happen during a long write but the OS will takes care of it?

4) i'm thinking of modifying the AsyncIO UDP example to TCP. is there any consideration needed ?

thanks! any info will be of help.

RE: posix simulator

Posted by William Davy on April 4, 2011
Hi Alpha86,

Which Simulator are you using, I wrote the first one.

1. The tick is driven by ITIMER_REAL which is setup to generate a SIGALRM at the desired frequency. If the process doesn't get enough time, then it is feasible to miss ticks and so lose time. There are a couple of things that can be done to change that. If you look at the comments (if they are still there) at the top of prvSetupSignalsAndSchedulerPolicy() then there is a little bit of code related to pthread_setschedparam() that may help. Or you could renice -1 the process.

2. There shouldn't be a problem doing this though I would suggest that it is better to use the ISR to give a semaphore to a task which does it instead.

3. I believe so, just don't let it be re-entrant.

4. Should be straight-forward.

Sorry for the slow reply.

[ 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