Skip to content

Commit

Permalink
Create GitHub workflows to execute the WinSim demos with libslirp net…
Browse files Browse the repository at this point in the history
…work interface implemented in FreeRTOS+TCP VS Static Project (FreeRTOS#1054)

* Add libslirp to the existing FreeRTOS+TCP static project

* Update demos to run with libslirp

* Add ipconfigUSE_LIBSLIRP

* Call developer command prompt and update meson build options

---------

Co-authored-by: Xiaodong Li <xiaodonn@amazon.com>
  • Loading branch information
ChaiTowKway and Xiaodong Li authored Jul 27, 2023
1 parent f776f5e commit 792efb4
Show file tree
Hide file tree
Showing 39 changed files with 3,821 additions and 133 deletions.
1 change: 1 addition & 0 deletions .github/scripts/core_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@
'interrupt_vector.s',
'reg_test.S',
'gdbinit',
'libslirp-version.h',
]

FREERTOS_HEADER = [
Expand Down
27 changes: 13 additions & 14 deletions .github/workflows/freertos_demos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
# Fetch Kernel Submodule
echo "::group::Fetch Kernel Submodule"
git submodule update --checkout --init --depth 1 FreeRTOS/Source
echo "::engdroup::"
echo "::endgroup::"
if [[ "$?" = "0" ]]
then
echo -e "\033[32;3mCloned the Kernel\033[0m"
Expand Down Expand Up @@ -125,7 +125,7 @@ jobs:
# Fetch Kernel Submodule
echo "::group::Fetch Kernel Submodule"
git submodule update --checkout --init --depth 1 FreeRTOS/Source
echo "::engdroup::"
echo "::endgroup::"
if [[ "$?" = "0" ]]
then
echo -e "\033[32;3mCloned the Kernel\033[0m"
Expand Down Expand Up @@ -172,7 +172,6 @@ jobs:
echo "::group::Build WIN32-MingW Blinky Demo"
$content = Get-Content -Path 'main.c' -Raw
$newContent = $content -replace '#define\s+mainCREATE_SIMPLE_BLINKY_DEMO_ONLY\s+0', '#define mainCREATE_SIMPLE_BLINKY_DEMO_ONLY 1'
$newContent = $newContent -replace 'int\s+main(.*?)void(.*?)\r?\n\s*{', 'int main( void ){setvbuf( stdout, NULL, _IONBF, 0 );'
$newContent | Set-Content -Path 'main.c'
gcc --version
make --version
Expand Down Expand Up @@ -207,7 +206,7 @@ jobs:
# Fetch Kernel Submodule
echo "::group::Fetch Kernel Submodule"
git submodule update --checkout --init --depth 1 FreeRTOS/Source
echo "::engdroup::"
echo "::endgroup::"
if [ "$?" = "0" ]; then
echo -e "\033[32;3mCloned the Kernel\033[0m"
else
Expand Down Expand Up @@ -298,7 +297,7 @@ jobs:
# Fetch Kernel Submodule
echo "::group::Fetch Kernel Submodule"
git submodule update --checkout --init --depth 1 FreeRTOS/Source
echo "::engdroup::"
echo "::endgroup::"
if [ "$?" = "0" ]; then
echo -e "\033[32;3mCloned the Kernel\033[0m"
else
Expand Down Expand Up @@ -349,7 +348,7 @@ jobs:
# Fetch Kernel Submodule
echo "::group::Fetch Kernel Submodule"
git submodule update --checkout --init --depth 1 FreeRTOS/Source
echo "::engdroup::"
echo "::endgroup::"
if [ "$?" = "0" ]; then
echo -e "\033[32;3mCloned the Kernel\033[0m"
else
Expand Down Expand Up @@ -378,7 +377,7 @@ jobs:
echo "::group::Install GNU ARM Toolchain"
sudo apt-get -y update
sudo apt-get -y install gcc-arm-none-eabi build-essential cmake git ninja-build python3-minimal
echo "::engdroup::"
echo "::endgroup::"
if [ "$?" = "0" ]; then
echo -e "\033[32;3mInstalled the GNU ARM Toolchain\033[0m"
else
Expand All @@ -393,7 +392,7 @@ jobs:
# Build CORTEX_MPU_M3_MPS2_QEMU_GCC Demo
echo "::group::Build CORTEX_MPU_M3_MPS2_QEMU_GCC Demo"
make -j
echo "::engdroup::"
echo "::endgroup::"
if [ "$?" = "0" ]; then
echo -e "\033[32;3mBuild CORTEX_MPU_M3_MPS2_QEMU_GCC Demo\033[0m"
else
Expand All @@ -408,7 +407,7 @@ jobs:
# Build CORTEX_LM3S102_GCC Demo
echo "::group::Build CORTEX_LM3S102_GCC Demo"
make -j
echo "::engdroup::"
echo "::endgroup::"
if [ "$?" = "0" ]; then
echo -e "\033[32;3mBuilt the CORTEX_LM3S102_GCC Demo Kernel\033[0m"
else
Expand All @@ -424,7 +423,7 @@ jobs:
echo "::group::Build CORTEX_M3_MPS2_QEMU_GCC Demo"
make clean
make -j
echo "::engdroup::"
echo "::endgroup::"
if [ "$?" = "0" ]; then
echo -e "\033[32;3mBuilt the CORTEX_M3_MPS2_QEMU_GCC Demo\033[0m"
else
Expand All @@ -440,7 +439,7 @@ jobs:
echo "::group::Build CORTEX_M3_MPS2_QEMU_GCC Full Demo"
make clean
make FULL_DEMO=1 -j
echo "::engdroup::"
echo "::endgroup::"
if [ "$?" = "0" ]; then
echo -e "\033[32;3mBuilt the CORTEX_M3_MPS2_QEMU_GCC Full Demo\033[0m"
else
Expand All @@ -455,7 +454,7 @@ jobs:
# Build CORTEX_LM3S811_GCC Demo
echo "::group::Build CORTEX_LM3S811_GCC Demo"
make -j
echo "::engdroup::"
echo "::endgroup::"
if [ "$?" = "0" ]; then
echo -e "\033[32;3mBuilt the CORTEX_LM3S811_GCC Demo\033[0m"
else
Expand All @@ -472,7 +471,7 @@ jobs:
git clone https://github.com/raspberrypi/pico-sdk.git
cmake -B build -DPICO_SDK_PATH=pico-sdk -GNinja
ninja -C build --verbose
echo "::engdroup::"
echo "::endgroup::"
if [ "$?" = "0" ]; then
echo -e "\033[32;3mBuilt CORTEX_M0+_RP2040 Demos\033[0m"
else
Expand All @@ -487,7 +486,7 @@ jobs:
# Build CORTEX_MPS2_QEMU_IAR_GCC Demo
echo "::group::Build CORTEX_MPS2_QEMU_IAR_GCC Demo"
make -C build/gcc -j
echo "::engdroup::"
echo "::endgroup::"
if [ "$?" = "0" ]; then
echo -e "\033[32;3mBuilt the CORTEX_MPS2_QEMU_IAR_GCC Demo\033[0m"
else
Expand Down
Loading

0 comments on commit 792efb4

Please sign in to comment.