mirror of
https://github.com/FreeRTOS/FreeRTOS.git
synced 2025-07-05 08:28:00 +08:00
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:
FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/linux
FreeRTOS/Demo/Posix_GCC
@ -44,7 +44,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#include <pthread.h>
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
#include <sys/sysinfo.h>
|
||||
#include <signal.h>
|
||||
#include <pcap.h>
|
||||
|
||||
|
@ -53,7 +53,7 @@ out the debugging messages. */
|
||||
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
|
||||
messages. */
|
||||
#define ipconfigHAS_PRINTF 1
|
||||
#define ipconfigHAS_PRINTF 0
|
||||
#if( ipconfigHAS_PRINTF == 1 )
|
||||
#define FreeRTOS_printf(X) vLoggingPrintf X
|
||||
#endif
|
@ -27,10 +27,10 @@
|
||||
import os
|
||||
|
||||
# Create a symlink to the FreeRTOS sources.
|
||||
if not os.path.exists("src/FreeRTOS"):
|
||||
os.symlink("../../..", "src/FreeRTOS")
|
||||
if not os.path.exists("src/FreeRTOS-Plus"):
|
||||
os.symlink("../../../../FreeRTOS-Plus", "src/FreeRTOS-Plus")
|
||||
if not os.path.exists("FreeRTOS"):
|
||||
os.symlink("../..", "FreeRTOS")
|
||||
if not os.path.exists("FreeRTOS-Plus"):
|
||||
os.symlink("../../../FreeRTOS-Plus", "FreeRTOS-Plus")
|
||||
|
||||
AddOption("--simple",
|
||||
action='store_true',
|
||||
@ -49,4 +49,4 @@ env.Append(CFLAGS = [
|
||||
"-O2",
|
||||
])
|
||||
|
||||
SConscript("src/SConscript", variant_dir="build", duplicate=0)
|
||||
SConscript("./SConscript", variant_dir="build", duplicate=0)
|
||||
|
@ -26,25 +26,26 @@
|
||||
*/
|
||||
|
||||
/******************************************************************************
|
||||
* This project provides two demo applications. A simple blinky style project,
|
||||
* and a more comprehensive test and demo application. The
|
||||
* mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting is used to select between the two.
|
||||
* This project provides three demo applications. A simple blinky style project,
|
||||
* a more comprehensive test and demo application, and a TCP echo application.
|
||||
* 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
|
||||
* more comprehensive test and demo application is implemented and described in
|
||||
* 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
|
||||
* hardware setup and FreeRTOS hook functions.
|
||||
*
|
||||
*******************************************************************************
|
||||
* NOTE: Windows will not be running the FreeRTOS demo threads continuously, so
|
||||
* do not expect to get real time behaviour from the FreeRTOS Windows port, or
|
||||
* NOTE: Linux will not be running the FreeRTOS demo threads continuously, so
|
||||
* 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
|
||||
* 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:
|
||||
* 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. */
|
||||
#include "console.h"
|
||||
|
||||
/* This project provides two demo applications. A simple blinky style demo
|
||||
application, and a more comprehensive test and demo application. The
|
||||
mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting is used to select between the two.
|
||||
/* This project provides three demo applications. A simple blinky style demo
|
||||
application, a more comprehensive test and demo application, and a TCP
|
||||
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.
|
||||
|
||||
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
|
||||
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
|
||||
#define mainCREATE_SIMPLE_BLINKY_DEMO_ONLY 0
|
||||
#endif
|
||||
@ -223,7 +229,7 @@ void vApplicationStackOverflowHook( TaskHandle_t pxTask,
|
||||
configCHECK_FOR_STACK_OVERFLOW is defined to 1 or 2. This hook
|
||||
function is called if a stack overflow is detected. This function is
|
||||
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__ );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
0
FreeRTOS/Demo/Posix_GCC/src/run-time-stats-utils.c → FreeRTOS/Demo/Posix_GCC/run-time-stats-utils.c
0
FreeRTOS/Demo/Posix_GCC/src/run-time-stats-utils.c → FreeRTOS/Demo/Posix_GCC/run-time-stats-utils.c
@ -113,7 +113,7 @@ extern "C" {
|
||||
* 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
|
||||
*****************************************************************************/
|
||||
#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
|
Reference in New Issue
Block a user