Fix Posix demo build and remove src directory (#213)

* Fix: build errors, remove src directory and bring all files up
* Fix: Remove not needed header
* Doc: fix main comments
* Doc: fix comment

Co-authored-by: Alfred Gedeon <gedeonag@amazon.com>
This commit is contained in:
alfred gedeon
2020-08-27 00:41:42 -07:00
committed by GitHub
parent a9680a54cf
commit 638262fab1
20 changed files with 1035 additions and 1030 deletions

View File

@ -44,7 +44,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <pthread.h> #include <pthread.h>
#include <stdlib.h> #include <stdlib.h>
#include <ctype.h> #include <ctype.h>
#include <sys/sysinfo.h>
#include <signal.h> #include <signal.h>
#include <pcap.h> #include <pcap.h>

View File

@ -53,7 +53,7 @@ out the debugging messages. */
FreeRTOS_netstat() command, and ping replies. If ipconfigHAS_PRINTF is set to 1 FreeRTOS_netstat() command, and ping replies. If ipconfigHAS_PRINTF is set to 1
then FreeRTOS_printf should be set to the function used to print out the then FreeRTOS_printf should be set to the function used to print out the
messages. */ messages. */
#define ipconfigHAS_PRINTF 1 #define ipconfigHAS_PRINTF 0
#if( ipconfigHAS_PRINTF == 1 ) #if( ipconfigHAS_PRINTF == 1 )
#define FreeRTOS_printf(X) vLoggingPrintf X #define FreeRTOS_printf(X) vLoggingPrintf X
#endif #endif

View File

@ -27,10 +27,10 @@
import os import os
# Create a symlink to the FreeRTOS sources. # Create a symlink to the FreeRTOS sources.
if not os.path.exists("src/FreeRTOS"): if not os.path.exists("FreeRTOS"):
os.symlink("../../..", "src/FreeRTOS") os.symlink("../..", "FreeRTOS")
if not os.path.exists("src/FreeRTOS-Plus"): if not os.path.exists("FreeRTOS-Plus"):
os.symlink("../../../../FreeRTOS-Plus", "src/FreeRTOS-Plus") os.symlink("../../../FreeRTOS-Plus", "FreeRTOS-Plus")
AddOption("--simple", AddOption("--simple",
action='store_true', action='store_true',
@ -49,4 +49,4 @@ env.Append(CFLAGS = [
"-O2", "-O2",
]) ])
SConscript("src/SConscript", variant_dir="build", duplicate=0) SConscript("./SConscript", variant_dir="build", duplicate=0)

View File

@ -26,25 +26,26 @@
*/ */
/****************************************************************************** /******************************************************************************
* This project provides two demo applications. A simple blinky style project, * This project provides three demo applications. A simple blinky style project,
* and a more comprehensive test and demo application. The * a more comprehensive test and demo application, and a TCP echo application.
* mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting is used to select between the two. * The mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting is used to select between
* the two if mainCREATE_TCP_ECHO_TASKS_SINGLE is 0.
* The simply blinky demo is implemented and described in main_blinky.c. The * The simply blinky demo is implemented and described in main_blinky.c. The
* more comprehensive test and demo application is implemented and described in * more comprehensive test and demo application is implemented and described in
* main_full.c. * main_full.c.
* The mainCREATE_TCP_ECHO_TASKS_SINGLE setting is used to select the tcp echo
* application regardless of the value of mainCREATE_SIMPLE_BLINKY_DEMO_ONLY.
* *
* This file implements the code that is not demo specific, including the * This file implements the code that is not demo specific, including the
* hardware setup and FreeRTOS hook functions. * hardware setup and FreeRTOS hook functions.
* *
******************************************************************************* *******************************************************************************
* NOTE: Windows will not be running the FreeRTOS demo threads continuously, so * NOTE: Linux will not be running the FreeRTOS demo threads continuously, so
* do not expect to get real time behaviour from the FreeRTOS Windows port, or * do not expect to get real time behaviour from the FreeRTOS Linux port, or
* this demo application. Also, the timing information in the FreeRTOS+Trace * this demo application. Also, the timing information in the FreeRTOS+Trace
* logs have no meaningful units. See the documentation page for the Windows * logs have no meaningful units. See the documentation page for the Linux
* port for further information: * port for further information:
* http://www.freertos.org/FreeRTOS-Windows-Simulator-Emulator-for-Visual-Studio-and-Eclipse-MingW.html * https://freertos.org/FreeRTOS-simulator-for-Linux.html
*
* *
******************************************************************************* *******************************************************************************
*/ */
@ -62,16 +63,21 @@
/* Local includes. */ /* Local includes. */
#include "console.h" #include "console.h"
/* This project provides two demo applications. A simple blinky style demo /* This project provides three demo applications. A simple blinky style demo
application, and a more comprehensive test and demo application. The application, a more comprehensive test and demo application, and a TCP
mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting is used to select between the two. echo application. The mainCREATE_SIMPLE_BLINKY_DEMO_ONLY and
mainCREATE_TCP_ECHO_TASKS_SINGLE settings are used to select between the three.
If mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is 1 then the blinky demo will be built. If mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is 1 & mainCREATE_TCP_ECHO_TASKS_SINGLE
is not 1 then the blinky demo will be built.
The blinky demo is implemented and described in main_blinky.c. The blinky demo is implemented and described in main_blinky.c.
If mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is not 1 then the comprehensive test and If mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is not 1 &
mainCREATE_TCP_ECHO_TASKS_SINGLE is not 1 then the comprehensive test and
demo application will be built. The comprehensive test and demo application is demo application will be built. The comprehensive test and demo application is
implemented and described in main_full.c. */ implemented and described in main_full.c the tcp echo demo application
is implemented in main_networking.c. */
#ifndef mainCREATE_SIMPLE_BLINKY_DEMO_ONLY #ifndef mainCREATE_SIMPLE_BLINKY_DEMO_ONLY
#define mainCREATE_SIMPLE_BLINKY_DEMO_ONLY 0 #define mainCREATE_SIMPLE_BLINKY_DEMO_ONLY 0
#endif #endif
@ -223,7 +229,7 @@ void vApplicationStackOverflowHook( TaskHandle_t pxTask,
configCHECK_FOR_STACK_OVERFLOW is defined to 1 or 2. This hook configCHECK_FOR_STACK_OVERFLOW is defined to 1 or 2. This hook
function is called if a stack overflow is detected. This function is function is called if a stack overflow is detected. This function is
provided as an example only as stack overflow checking does not function provided as an example only as stack overflow checking does not function
when running the FreeRTOS Windows port. */ when running the FreeRTOS POSIX port. */
vAssertCalled( __FILE__, __LINE__ ); vAssertCalled( __FILE__, __LINE__ );
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/

View File

@ -113,7 +113,7 @@ extern "C" {
* TRC_FREERTOS_VERSION_9_0_2 If using FreeRTOS v9.0.2 * TRC_FREERTOS_VERSION_9_0_2 If using FreeRTOS v9.0.2
* TRC_FREERTOS_VERSION_10_0_0 If using FreeRTOS v10.0.0 or later * TRC_FREERTOS_VERSION_10_0_0 If using FreeRTOS v10.0.0 or later
*****************************************************************************/ *****************************************************************************/
#define TRC_CFG_FREERTOS_VERSION TRC_FREERTOS_VERSION_10_0_0 #define TRC_CFG_FREERTOS_VERSION TRC_FREERTOS_VERSION_10_4_0
/******************************************************************************* /*******************************************************************************
* TRC_CFG_SCHEDULING_ONLY * TRC_CFG_SCHEDULING_ONLY