aboutsummaryrefslogtreecommitdiffstats
path: root/src/FreeRTOS-Sim-master/POSIX
diff options
context:
space:
mode:
Diffstat (limited to 'src/FreeRTOS-Sim-master/POSIX')
-rw-r--r--src/FreeRTOS-Sim-master/POSIX/FileIO/fileIO.c127
-rw-r--r--src/FreeRTOS-Sim-master/POSIX/FileIO/fileIO.h78
-rw-r--r--src/FreeRTOS-Sim-master/POSIX/FreeRTOSConfig.h82
-rw-r--r--src/FreeRTOS-Sim-master/POSIX/ParTest/ParTest.c158
-rw-r--r--src/FreeRTOS-Sim-master/POSIX/ParTest/partest.h80
-rw-r--r--src/FreeRTOS-Sim-master/POSIX/main.c132
6 files changed, 657 insertions, 0 deletions
diff --git a/src/FreeRTOS-Sim-master/POSIX/FileIO/fileIO.c b/src/FreeRTOS-Sim-master/POSIX/FileIO/fileIO.c
new file mode 100644
index 0000000..9f22300
--- /dev/null
+++ b/src/FreeRTOS-Sim-master/POSIX/FileIO/fileIO.c
@@ -0,0 +1,127 @@
+/*
+ FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.
+ All rights reserved
+
+ VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
+
+ This file is part of the FreeRTOS distribution.
+
+ FreeRTOS is free software; you can redistribute it and/or modify it under
+ the terms of the GNU General Public License (version 2) as published by the
+ Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.
+
+ ***************************************************************************
+ >>! NOTE: The modification to the GPL is included to allow you to !<<
+ >>! distribute a combined work that includes FreeRTOS without being !<<
+ >>! obliged to provide the source code for proprietary components !<<
+ >>! outside of the FreeRTOS kernel. !<<
+ ***************************************************************************
+
+ FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ FOR A PARTICULAR PURPOSE. Full license text is available on the following
+ link: http://www.freertos.org/a00114.html
+
+ ***************************************************************************
+ * *
+ * FreeRTOS provides completely free yet professionally developed, *
+ * robust, strictly quality controlled, supported, and cross *
+ * platform software that is more than just the market leader, it *
+ * is the industry's de facto standard. *
+ * *
+ * Help yourself get started quickly while simultaneously helping *
+ * to support the FreeRTOS project by purchasing a FreeRTOS *
+ * tutorial book, reference manual, or both: *
+ * http://www.FreeRTOS.org/Documentation *
+ * *
+ ***************************************************************************
+
+ http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading
+ the FAQ page "My application does not run, what could be wrong?". Have you
+ defined configASSERT()?
+
+ http://www.FreeRTOS.org/support - In return for receiving this top quality
+ embedded software for free we request you assist our global community by
+ participating in the support forum.
+
+ http://www.FreeRTOS.org/training - Investing in training allows your team to
+ be as productive as possible as early as possible. Now you can receive
+ FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers
+ Ltd, and the world's leading authority on the world's leading RTOS.
+
+ http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
+ including FreeRTOS+Trace - an indispensable productivity tool, a DOS
+ compatible FAT file system, and our tiny thread aware UDP/IP stack.
+
+ http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.
+ Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.
+
+ http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High
+ Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS
+ licenses offer ticketed support, indemnification and commercial middleware.
+
+ http://www.SafeRTOS.com - High Integrity Systems also provide a safety
+ engineered and independently SIL3 certified version for use in safety and
+ mission critical applications that require provable dependability.
+
+ 1 tab == 4 spaces!
+*/
+
+#include <stdio.h>
+#include <string.h>
+
+/* Scheduler include files. */
+#include "FreeRTOS.h"
+#include "task.h"
+
+/* Demo program include files. */
+#include "fileIO.h"
+
+void vDisplayMessage( const char * const pcMessageToPrint )
+{
+ vTaskSuspendAll();
+ {
+ printf( "%s", pcMessageToPrint );
+ fflush( stdout );
+ }
+ xTaskResumeAll();
+}
+/*-----------------------------------------------------------*/
+
+void vWriteMessageToDisk( const char * const pcMessage )
+{
+const portCHAR * const pcFileName = "RTOSlog.txt";
+const portCHAR * const pcSeparator = "\r\n-----------------------\r\n";
+FILE *pf;
+
+ vTaskSuspendAll();
+ {
+ pf = fopen( pcFileName, "a" );
+ if( pf != NULL )
+ {
+ fwrite( pcMessage, strlen( pcMessage ), ( unsigned portSHORT ) 1, pf );
+ fwrite( pcSeparator, strlen( pcSeparator ), ( unsigned portSHORT ) 1, pf );
+ fclose( pf );
+ }
+ }
+ xTaskResumeAll();
+}
+/*-----------------------------------------------------------*/
+
+void vWriteBufferToDisk( const char * const pcBuffer, uint32_t ulBufferLength )
+{
+const portCHAR * const pcFileName = "trace.bin";
+FILE *pf;
+
+ vTaskSuspendAll();
+ {
+ pf = fopen( pcFileName, "wb" );
+ if( pf )
+ {
+ fwrite( pcBuffer, ( size_t ) ulBufferLength, ( unsigned portSHORT ) 1, pf );
+ fclose( pf );
+ }
+ }
+ xTaskResumeAll();
+}
+
diff --git a/src/FreeRTOS-Sim-master/POSIX/FileIO/fileIO.h b/src/FreeRTOS-Sim-master/POSIX/FileIO/fileIO.h
new file mode 100644
index 0000000..4feb795
--- /dev/null
+++ b/src/FreeRTOS-Sim-master/POSIX/FileIO/fileIO.h
@@ -0,0 +1,78 @@
+/*
+ FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.
+ All rights reserved
+
+ VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
+
+ This file is part of the FreeRTOS distribution.
+
+ FreeRTOS is free software; you can redistribute it and/or modify it under
+ the terms of the GNU General Public License (version 2) as published by the
+ Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.
+
+ ***************************************************************************
+ >>! NOTE: The modification to the GPL is included to allow you to !<<
+ >>! distribute a combined work that includes FreeRTOS without being !<<
+ >>! obliged to provide the source code for proprietary components !<<
+ >>! outside of the FreeRTOS kernel. !<<
+ ***************************************************************************
+
+ FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ FOR A PARTICULAR PURPOSE. Full license text is available on the following
+ link: http://www.freertos.org/a00114.html
+
+ ***************************************************************************
+ * *
+ * FreeRTOS provides completely free yet professionally developed, *
+ * robust, strictly quality controlled, supported, and cross *
+ * platform software that is more than just the market leader, it *
+ * is the industry's de facto standard. *
+ * *
+ * Help yourself get started quickly while simultaneously helping *
+ * to support the FreeRTOS project by purchasing a FreeRTOS *
+ * tutorial book, reference manual, or both: *
+ * http://www.FreeRTOS.org/Documentation *
+ * *
+ ***************************************************************************
+
+ http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading
+ the FAQ page "My application does not run, what could be wrong?". Have you
+ defined configASSERT()?
+
+ http://www.FreeRTOS.org/support - In return for receiving this top quality
+ embedded software for free we request you assist our global community by
+ participating in the support forum.
+
+ http://www.FreeRTOS.org/training - Investing in training allows your team to
+ be as productive as possible as early as possible. Now you can receive
+ FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers
+ Ltd, and the world's leading authority on the world's leading RTOS.
+
+ http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
+ including FreeRTOS+Trace - an indispensable productivity tool, a DOS
+ compatible FAT file system, and our tiny thread aware UDP/IP stack.
+
+ http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.
+ Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.
+
+ http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High
+ Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS
+ licenses offer ticketed support, indemnification and commercial middleware.
+
+ http://www.SafeRTOS.com - High Integrity Systems also provide a safety
+ engineered and independently SIL3 certified version for use in safety and
+ mission critical applications that require provable dependability.
+
+ 1 tab == 4 spaces!
+*/
+
+#ifndef FILE_IO_H
+#define FILE_IO_H
+
+void vDisplayMessage( const char * const pcMessageToPrint );
+void vWriteMessageToDisk( const char * const pcMessage );
+void vWriteBufferToDisk( const char * const pcBuffer, uint32_t ulBufferLength );
+
+#endif
+
diff --git a/src/FreeRTOS-Sim-master/POSIX/FreeRTOSConfig.h b/src/FreeRTOS-Sim-master/POSIX/FreeRTOSConfig.h
new file mode 100644
index 0000000..a4f2e47
--- /dev/null
+++ b/src/FreeRTOS-Sim-master/POSIX/FreeRTOSConfig.h
@@ -0,0 +1,82 @@
+#ifndef FREERTOS_CONFIG_H
+#define FREERTOS_CONFIG_H
+
+/*-----------------------------------------------------------
+ * Application specific definitions.
+ *
+ * These definitions should be adjusted for your particular hardware and
+ * application requirements.
+ *
+ * THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
+ * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
+ *
+ * See http://www.freertos.org/a00110.html.
+ *----------------------------------------------------------*/
+
+#define configUSE_PREEMPTION 1
+#define configUSE_IDLE_HOOK 0
+#define configUSE_TICK_HOOK 0
+#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
+#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 4 ) /* This can be made smaller if required. */
+#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 32 * 1024 ) )
+#define configMAX_TASK_NAME_LEN ( 16 )
+#define configUSE_TRACE_FACILITY 0
+#define configUSE_16_BIT_TICKS 0
+#define configIDLE_SHOULD_YIELD 1
+#define configUSE_MUTEXES 1
+#define configCHECK_FOR_STACK_OVERFLOW 0 /* Do not use this option on the PC port. */
+#define configUSE_RECURSIVE_MUTEXES 1
+//#define configQUEUE_REGISTRY_SIZE 0
+#define configQUEUE_REGISTRY_SIZE 20
+#define configUSE_MALLOC_FAILED_HOOK 0
+
+#define configUSE_APPLICATION_TASK_TAG 1
+#define configUSE_COUNTING_SEMAPHORES 1
+#define configUSE_ALTERNATIVE_API 0
+#define configMAX_SYSCALL_INTERRUPT_PRIORITY 1
+
+#define configUSE_QUEUE_SETS 1
+#define configUSE_TASK_NOTIFICATIONS 1
+
+/* Software timer related configuration options. */
+#define configUSE_TIMERS 1
+#define configTIMER_TASK_PRIORITY ( configMAX_PRIORITIES - 1 )
+#define configTIMER_QUEUE_LENGTH 20
+#define configTIMER_TASK_STACK_DEPTH ( configMINIMAL_STACK_SIZE * 2 )
+
+#define configMAX_PRIORITIES ( 10 )
+
+#define configGENERATE_RUN_TIME_STATS 1
+
+/* Co-routine related configuration options. */
+#define configUSE_CO_ROUTINES 1
+#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
+
+
+/* Set the following definitions to 1 to include the API function, or zero
+to exclude the API function. */
+
+/* Set the following definitions to 1 to include the API function, or zero
+to exclude the API function. In most cases the linker will remove unused
+functions anyway. */
+#define INCLUDE_vTaskPrioritySet 1
+#define INCLUDE_uxTaskPriorityGet 1
+#define INCLUDE_vTaskDelete 1
+#define INCLUDE_vTaskCleanUpResources 1
+#define INCLUDE_vTaskSuspend 1
+#define INCLUDE_vTaskDelayUntil 1
+#define INCLUDE_vTaskDelay 1
+#define INCLUDE_uxTaskGetStackHighWaterMark 0 /* Do not use this option on the PC port. */
+#define INCLUDE_xTaskGetSchedulerState 1
+
+#define INCLUDE_xTimerGetTimerDaemonTaskHandle 1
+#define INCLUDE_xTaskGetIdleTaskHandle 1
+#define INCLUDE_pcTaskGetTaskName 1
+#define INCLUDE_eTaskGetState 1
+#define INCLUDE_xSemaphoreGetMutexHolder 1
+#define INCLUDE_xTimerPendFunctionCall 1
+
+/* An example "task switched in" hook macro definition. */
+#define traceTASK_SWITCHED_IN() xTaskCallApplicationTaskHook( NULL, ( void * ) 0xabcd )
+
+#endif /* FREERTOS_CONFIG_H */
diff --git a/src/FreeRTOS-Sim-master/POSIX/ParTest/ParTest.c b/src/FreeRTOS-Sim-master/POSIX/ParTest/ParTest.c
new file mode 100644
index 0000000..a1fc77b
--- /dev/null
+++ b/src/FreeRTOS-Sim-master/POSIX/ParTest/ParTest.c
@@ -0,0 +1,158 @@
+/*
+ FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.
+ All rights reserved
+
+ VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
+
+ This file is part of the FreeRTOS distribution.
+
+ FreeRTOS is free software; you can redistribute it and/or modify it under
+ the terms of the GNU General Public License (version 2) as published by the
+ Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.
+
+ ***************************************************************************
+ >>! NOTE: The modification to the GPL is included to allow you to !<<
+ >>! distribute a combined work that includes FreeRTOS without being !<<
+ >>! obliged to provide the source code for proprietary components !<<
+ >>! outside of the FreeRTOS kernel. !<<
+ ***************************************************************************
+
+ FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ FOR A PARTICULAR PURPOSE. Full license text is available on the following
+ link: http://www.freertos.org/a00114.html
+
+ ***************************************************************************
+ * *
+ * FreeRTOS provides completely free yet professionally developed, *
+ * robust, strictly quality controlled, supported, and cross *
+ * platform software that is more than just the market leader, it *
+ * is the industry's de facto standard. *
+ * *
+ * Help yourself get started quickly while simultaneously helping *
+ * to support the FreeRTOS project by purchasing a FreeRTOS *
+ * tutorial book, reference manual, or both: *
+ * http://www.FreeRTOS.org/Documentation *
+ * *
+ ***************************************************************************
+
+ http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading
+ the FAQ page "My application does not run, what could be wrong?". Have you
+ defined configASSERT()?
+
+ http://www.FreeRTOS.org/support - In return for receiving this top quality
+ embedded software for free we request you assist our global community by
+ participating in the support forum.
+
+ http://www.FreeRTOS.org/training - Investing in training allows your team to
+ be as productive as possible as early as possible. Now you can receive
+ FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers
+ Ltd, and the world's leading authority on the world's leading RTOS.
+
+ http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
+ including FreeRTOS+Trace - an indispensable productivity tool, a DOS
+ compatible FAT file system, and our tiny thread aware UDP/IP stack.
+
+ http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.
+ Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.
+
+ http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High
+ Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS
+ licenses offer ticketed support, indemnification and commercial middleware.
+
+ http://www.SafeRTOS.com - High Integrity Systems also provide a safety
+ engineered and independently SIL3 certified version for use in safety and
+ mission critical applications that require provable dependability.
+
+ 1 tab == 4 spaces!
+*/
+
+/*
+Changes from V1.01:
+
+ + Types used updated.
+ + Add vParTestToggleLED();
+
+
+Changes from V2.0.0
+
+ + Use scheduler suspends in place of critical sections.
+*/
+
+#include "FreeRTOS.h"
+#include "partest.h"
+#include "task.h"
+
+#define partstALL_OUTPUTS_OFF ( ( unsigned portCHAR ) 0x00 )
+#define partstMAX_OUTPUT_LED ( ( unsigned portCHAR ) 7 )
+
+/*lint -e956 File scope parameters okay here. */
+//static unsigned portSHORT usPortAddress = partstDEFAULT_PORT_ADDRESS;
+static volatile unsigned portCHAR ucCurrentOutputValue = partstALL_OUTPUTS_OFF;
+/*lint +e956 */
+
+
+/*-----------------------------------------------------------
+ * Simple parallel port IO routines
+ *-----------------------------------------------------------*/
+
+void vParTestInitialise( void )
+{
+ ucCurrentOutputValue = partstALL_OUTPUTS_OFF;
+
+ portOUTPUT_BYTE( usPortAddress, ( unsigned ) partstALL_OUTPUTS_OFF );
+}
+/*-----------------------------------------------------------*/
+
+void vParTestSetLED( unsigned portBASE_TYPE uxLED, portBASE_TYPE xValue )
+{
+unsigned portCHAR ucBit = ( unsigned portCHAR ) 1;
+
+ if( uxLED <= partstMAX_OUTPUT_LED )
+ {
+ ucBit <<= uxLED;
+ }
+
+ vTaskSuspendAll();
+ {
+ if( xValue == pdTRUE )
+ {
+ ucBit ^= ( unsigned portCHAR ) 0xff;
+ ucCurrentOutputValue &= ucBit;
+ }
+ else
+ {
+ ucCurrentOutputValue |= ucBit;
+ }
+
+ portOUTPUT_BYTE( usPortAddress, ( unsigned ) ucCurrentOutputValue );
+ }
+ xTaskResumeAll();
+}
+/*-----------------------------------------------------------*/
+
+void vParTestToggleLED( unsigned portBASE_TYPE uxLED )
+{
+unsigned portCHAR ucBit;
+
+ if( uxLED <= partstMAX_OUTPUT_LED )
+ {
+ ucBit = ( ( unsigned portCHAR ) 1 ) << uxLED;
+
+ vTaskSuspendAll();
+ {
+ if( ucCurrentOutputValue & ucBit )
+ {
+ ucCurrentOutputValue &= ~ucBit;
+ }
+ else
+ {
+ ucCurrentOutputValue |= ucBit;
+ }
+
+ portOUTPUT_BYTE( usPortAddress, ( unsigned ) ucCurrentOutputValue );
+ }
+ xTaskResumeAll();
+ }
+}
+
diff --git a/src/FreeRTOS-Sim-master/POSIX/ParTest/partest.h b/src/FreeRTOS-Sim-master/POSIX/ParTest/partest.h
new file mode 100644
index 0000000..02db404
--- /dev/null
+++ b/src/FreeRTOS-Sim-master/POSIX/ParTest/partest.h
@@ -0,0 +1,80 @@
+/*
+ FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.
+ All rights reserved
+
+ VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
+
+ This file is part of the FreeRTOS distribution.
+
+ FreeRTOS is free software; you can redistribute it and/or modify it under
+ the terms of the GNU General Public License (version 2) as published by the
+ Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.
+
+ ***************************************************************************
+ >>! NOTE: The modification to the GPL is included to allow you to !<<
+ >>! distribute a combined work that includes FreeRTOS without being !<<
+ >>! obliged to provide the source code for proprietary components !<<
+ >>! outside of the FreeRTOS kernel. !<<
+ ***************************************************************************
+
+ FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ FOR A PARTICULAR PURPOSE. Full license text is available on the following
+ link: http://www.freertos.org/a00114.html
+
+ ***************************************************************************
+ * *
+ * FreeRTOS provides completely free yet professionally developed, *
+ * robust, strictly quality controlled, supported, and cross *
+ * platform software that is more than just the market leader, it *
+ * is the industry's de facto standard. *
+ * *
+ * Help yourself get started quickly while simultaneously helping *
+ * to support the FreeRTOS project by purchasing a FreeRTOS *
+ * tutorial book, reference manual, or both: *
+ * http://www.FreeRTOS.org/Documentation *
+ * *
+ ***************************************************************************
+
+ http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading
+ the FAQ page "My application does not run, what could be wrong?". Have you
+ defined configASSERT()?
+
+ http://www.FreeRTOS.org/support - In return for receiving this top quality
+ embedded software for free we request you assist our global community by
+ participating in the support forum.
+
+ http://www.FreeRTOS.org/training - Investing in training allows your team to
+ be as productive as possible as early as possible. Now you can receive
+ FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers
+ Ltd, and the world's leading authority on the world's leading RTOS.
+
+ http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
+ including FreeRTOS+Trace - an indispensable productivity tool, a DOS
+ compatible FAT file system, and our tiny thread aware UDP/IP stack.
+
+ http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.
+ Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.
+
+ http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High
+ Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS
+ licenses offer ticketed support, indemnification and commercial middleware.
+
+ http://www.SafeRTOS.com - High Integrity Systems also provide a safety
+ engineered and independently SIL3 certified version for use in safety and
+ mission critical applications that require provable dependability.
+
+ 1 tab == 4 spaces!
+*/
+
+#ifndef PARTEST_H
+#define PARTEST_H
+
+#define partstDEFAULT_PORT_ADDRESS ( ( uint16_t ) 0x378 )
+
+void vParTestInitialise( void );
+void vParTestSetLED( UBaseType_t uxLED, BaseType_t xValue );
+void vParTestToggleLED( UBaseType_t uxLED );
+
+#endif
+
diff --git a/src/FreeRTOS-Sim-master/POSIX/main.c b/src/FreeRTOS-Sim-master/POSIX/main.c
new file mode 100644
index 0000000..ba9e2d6
--- /dev/null
+++ b/src/FreeRTOS-Sim-master/POSIX/main.c
@@ -0,0 +1,132 @@
+/*
+ FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.
+ All rights reserved
+
+ VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
+
+ This file is part of the FreeRTOS distribution.
+
+ FreeRTOS is free software; you can redistribute it and/or modify it under
+ the terms of the GNU General Public License (version 2) as published by the
+ Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.
+
+ ***************************************************************************
+ >>! NOTE: The modification to the GPL is included to allow you to !<<
+ >>! distribute a combined work that includes FreeRTOS without being !<<
+ >>! obliged to provide the source code for proprietary components !<<
+ >>! outside of the FreeRTOS kernel. !<<
+ ***************************************************************************
+
+ FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ FOR A PARTICULAR PURPOSE. Full license text is available on the following
+ link: http://www.freertos.org/a00114.html
+
+ ***************************************************************************
+ * *
+ * FreeRTOS provides completely free yet professionally developed, *
+ * robust, strictly quality controlled, supported, and cross *
+ * platform software that is more than just the market leader, it *
+ * is the industry's de facto standard. *
+ * *
+ * Help yourself get started quickly while simultaneously helping *
+ * to support the FreeRTOS project by purchasing a FreeRTOS *
+ * tutorial book, reference manual, or both: *
+ * http://www.FreeRTOS.org/Documentation *
+ * *
+ ***************************************************************************
+
+ http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading
+ the FAQ page "My application does not run, what could be wrong?". Have you
+ defined configASSERT()?
+
+ http://www.FreeRTOS.org/support - In return for receiving this top quality
+ embedded software for free we request you assist our global community by
+ participating in the support forum.
+
+ http://www.FreeRTOS.org/training - Investing in training allows your team to
+ be as productive as possible as early as possible. Now you can receive
+ FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers
+ Ltd, and the world's leading authority on the world's leading RTOS.
+
+ http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
+ including FreeRTOS+Trace - an indispensable productivity tool, a DOS
+ compatible FAT file system, and our tiny thread aware UDP/IP stack.
+
+ http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.
+ Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.
+
+ http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High
+ Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS
+ licenses offer ticketed support, indemnification and commercial middleware.
+
+ http://www.SafeRTOS.com - High Integrity Systems also provide a safety
+ engineered and independently SIL3 certified version for use in safety and
+ mission critical applications that require provable dependability.
+
+ 1 tab == 4 spaces!
+*/
+
+/**
+ * Creates all the demo application tasks and co-routines, then starts the
+ * scheduler.
+ *
+ * Main. c also creates a task called "Print". This only executes every
+ * five seconds but has the highest priority so is guaranteed to get
+ * processor time. Its main function is to check that all the other tasks
+ * are still operational. Nearly all the tasks in the demo application
+ * maintain a unique count that is incremented each time the task successfully
+ * completes its function. Should any error occur within the task the count is
+ * permanently halted. The print task checks the count of each task to ensure
+ * it has changed since the last time the print task executed. If any count is
+ * found not to have changed the print task displays an appropriate message.
+ * If all the tasks are still incrementing their unique counts the print task
+ * displays an "OK" message.
+ *
+ * The LED flash tasks do not maintain a count as they already provide visual
+ * feedback of their status.
+ *
+ * The print task blocks on the queue into which messages that require
+ * displaying are posted. It will therefore only block for the full 5 seconds
+ * if no messages are posted onto the queue.
+ *
+ * \page MainC main.c
+ * \ingroup DemoFiles
+ * <HR>
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "FreeRTOS.h"
+#include "task.h"
+#include "croutine.h"
+/* #include "partest.h" */
+
+
+
+void launcher_task(void *);
+
+void launcher_task(void * pouet) {
+ printf("Test\n");
+}
+
+int main( void )
+{
+
+ TaskHandle_t task_handle;
+ xTaskCreate(
+ launcher_task,
+ "TaskLauncher",
+ configMINIMAL_STACK_SIZE,
+ (void*) NULL,
+ tskIDLE_PRIORITY + 2UL,
+ &task_handle);
+
+ /* Start the RTOS Scheduler */
+ vTaskStartScheduler();
+
+ /* HALT */
+ while(1);
+}
+