]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/Posix_GCC/src/SConscript
commit 9f316c246baafa15c542a5aea81a94f26e3d6507
[freertos] / FreeRTOS / Demo / Posix_GCC / src / SConscript
diff --git a/FreeRTOS/Demo/Posix_GCC/src/SConscript b/FreeRTOS/Demo/Posix_GCC/src/SConscript
new file mode 100644 (file)
index 0000000..962556c
--- /dev/null
@@ -0,0 +1,124 @@
+# FreeRTOS Kernel V10.3.0
+# Copyright (C) 2020 Cambridge Consultants Ltd.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy of
+# this software and associated documentation files (the "Software"), to deal in
+# the Software without restriction, including without limitation the rights to
+# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+# the Software, and to permit persons to whom the Software is furnished to do so,
+# subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in all
+# copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# http://www.FreeRTOS.org
+# http://aws.amazon.com/freertos
+
+Import("env")
+
+env.Append(CPPPATH = [
+    ".",
+    "FreeRTOS/Source/include",
+    "FreeRTOS/Source/portable/ThirdParty/GCC/Posix",
+    "FreeRTOS/Demo/Common/include",
+    "FreeRTOS-Plus/Source/FreeRTOS-Plus-Trace/Include",
+])
+
+env.Append(LIBS = [
+    "pthread",
+])
+
+src = [
+    "console.c",
+    "main.c",
+    "main_blinky.c",
+    "main_full.c",
+    "run-time-stats-utils.c",
+
+    # FreeRTOS kernel
+    "FreeRTOS/Source/event_groups.c",
+    "FreeRTOS/Source/list.c",
+    "FreeRTOS/Source/queue.c",
+    "FreeRTOS/Source/stream_buffer.c",
+    "FreeRTOS/Source/tasks.c",
+    "FreeRTOS/Source/timers.c",
+
+    # Memory manager (use malloc()/free()).
+    "FreeRTOS/Source/portable/MemMang/heap_3.c",
+
+    # Posix port.
+    "FreeRTOS/Source/portable/ThirdParty/GCC/Posix/port.c",
+
+    # Demo library.
+    "FreeRTOS/Demo/Common/Minimal/AbortDelay.c",
+    "FreeRTOS/Demo/Common/Minimal/BlockQ.c",
+    "FreeRTOS/Demo/Common/Minimal/blocktim.c",
+    "FreeRTOS/Demo/Common/Minimal/countsem.c",
+    "FreeRTOS/Demo/Common/Minimal/death.c",
+    "FreeRTOS/Demo/Common/Minimal/dynamic.c",
+    "FreeRTOS/Demo/Common/Minimal/EventGroupsDemo.c",
+    "FreeRTOS/Demo/Common/Minimal/flop.c",
+    "FreeRTOS/Demo/Common/Minimal/GenQTest.c",
+    "FreeRTOS/Demo/Common/Minimal/integer.c",
+    "FreeRTOS/Demo/Common/Minimal/IntSemTest.c",
+    "FreeRTOS/Demo/Common/Minimal/MessageBufferAMP.c",
+    "FreeRTOS/Demo/Common/Minimal/MessageBufferDemo.c",
+    "FreeRTOS/Demo/Common/Minimal/PollQ.c",
+    "FreeRTOS/Demo/Common/Minimal/QPeek.c",
+    "FreeRTOS/Demo/Common/Minimal/QueueOverwrite.c",
+    "FreeRTOS/Demo/Common/Minimal/QueueSet.c",
+    "FreeRTOS/Demo/Common/Minimal/QueueSetPolling.c",
+    "FreeRTOS/Demo/Common/Minimal/recmutex.c",
+    "FreeRTOS/Demo/Common/Minimal/semtest.c",
+    "FreeRTOS/Demo/Common/Minimal/StaticAllocation.c",
+    "FreeRTOS/Demo/Common/Minimal/StreamBufferDemo.c",
+    "FreeRTOS/Demo/Common/Minimal/StreamBufferInterrupt.c",
+    "FreeRTOS/Demo/Common/Minimal/TaskNotify.c",
+    "FreeRTOS/Demo/Common/Minimal/TimerDemo.c",
+]
+
+if GetOption("coverage"):
+    env.Append(CPPDEFINES = [
+        "projCOVERAGE_TEST=1",
+    ])
+
+    env.Append(CFLAGS = [
+        "-fprofile-arcs",
+        "-ftest-coverage",
+    ])
+    env.Append(LINKFLAGS = [
+        "-fprofile-arcs",
+        "-ftest-coverage",
+    ])
+
+    src += [
+        "code_coverage_additions.c",
+    ]
+else:
+    env.Append(CPPDEFINES = [
+        "projCOVERAGE_TEST=0",
+    ])
+
+    src += [
+        # Trace library.
+        "FreeRTOS-Plus/Source/FreeRTOS-Plus-Trace/trcKernelPort.c",
+        "FreeRTOS-Plus/Source/FreeRTOS-Plus-Trace/trcSnapshotRecorder.c",
+        "FreeRTOS-Plus/Source/FreeRTOS-Plus-Trace/trcStreamingRecorder.c",
+        "FreeRTOS-Plus/Source/FreeRTOS-Plus-Trace/streamports/File/trcStreamingPort.c",
+    ]
+
+# Build the simple "blinky" demo application, or the full test
+# applicaton?
+if GetOption("simple"):
+    env.Append(CPPDEFINES = [
+        "mainCREATE_SIMPLE_BLINKY_DEMO_ONLY=1",
+    ])
+
+env.Program("posix_demo", src)