From 0739f942a040a3907f16cf22705b0c99df5edf74 Mon Sep 17 00:00:00 2001 From: Tyler Gilbert Date: Sat, 25 Jul 2020 21:26:04 -0600 Subject: [PATCH 01/11] update readme, build on linux and mac --- .github/workflows/build.yml | 24 +++++++++++++++++++++--- README.md | 29 +++-------------------------- 2 files changed, 24 insertions(+), 29 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8c1fb419..391271de 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,10 +7,28 @@ on: branches: [ development ] jobs: - build: - + buildLinuxArm32: runs-on: [self-hosted, linux, ARM] - + steps: + - uses: actions/checkout@v2 + with: + ref: 'development' + - name: prepare + run: mkdir cmake_link && mkdir cmake_arm + - name: configure-link + run: cmake .. + working-directory: cmake_link + - name: make-link + run: make -j3 + working-directory: cmake_link + - name: configure + run: cmake .. + working-directory: cmake_arm + - name: make + run: make -j3 + working-directory: cmake_arm + buildMacOS: + runs-on: [self-hosted, macOS, ARM] steps: - uses: actions/checkout@v2 with: diff --git a/README.md b/README.md index 01e09687..67d71ba8 100644 --- a/README.md +++ b/README.md @@ -2,38 +2,15 @@ ![Build](https://github.com/StratifyLabs/StratifyOS/workflows/Build/badge.svg) +[Getting Started Guide](guides/Getting-Started.md) + Stratify OS is a fully featured microcontroller operating system designed specifically for the ARM Cortex M architecture. It features: - [Decoupled System and Application Binaries](guides/Stratify-OS.md) - [Deep integration with Cortex M hardware](guides/ARM-Cortex-M.md) such as the MPU, SysTick/PendSV, SVCall, Dual Stacks, NVIC, BPU, and Cache - [POSIX Style Filesystems](guides/Filesystems.md) - [Complete Hardware Abstraction](guides/Device-Drivers.md) - -## Getting Started - -Getting started on Stratify OS is easy with the Stratify Labs cloud/command line tool called `sl`. - -**Install on Mac OS X** - -``` -mkdir -p /Applications/StratifyLabs-SDK/Tools/gcc/bin -curl -L -o /Applications/StratifyLabs-SDK/Tools/gcc/bin/sl 'https://stratifylabs.page.link/slmac' -chmod 755 /Applications/StratifyLabs-SDK/Tools/gcc/bin/sl -echo 'export PATH=/Applications/StratifyLabs-SDK/Tools/gcc/bin:$PATH' >> ~/.bash_profile -source ~/.bash_profile -``` - -**Install on Windows (Git Bash)** - -``` -mkdir -p /C/StratifyLabs-SDK/Tools/gcc/bin -curl -L -o /C/StratifyLabs-SDK/Tools/gcc/bin/sl.exe 'https://stratifylabs.page.link/slwin' -chmod 755 /C/StratifyLabs-SDK/Tools/gcc/bin/sl.exe -echo 'export PATH=/C/StratifyLabs-SDK/Tools/gcc/bin:$PATH' >> ~/.bash_profile -source ~/.bash_profile -``` - -Once you install `sl`, visit the [Stratify Labs web application](https://app.stratifylabs.co) to login and start the tutorials. +- [Threads](guides/Threads.md) ## License From dc41da3584d436c33053d9ef9e6cbc0c159cd103 Mon Sep 17 00:00:00 2001 From: Tyler Gilbert Date: Sat, 25 Jul 2020 21:29:46 -0600 Subject: [PATCH 02/11] Update build.yml --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 391271de..bac9abe2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,7 +28,7 @@ jobs: run: make -j3 working-directory: cmake_arm buildMacOS: - runs-on: [self-hosted, macOS, ARM] + runs-on: [self-hosted, macOS, X64] steps: - uses: actions/checkout@v2 with: From 83253dc69f2e1d2cfcea7808175364e7de270953 Mon Sep 17 00:00:00 2001 From: Tyler Gilbert Date: Sat, 25 Jul 2020 21:35:21 -0600 Subject: [PATCH 03/11] build updates --- .github/workflows/build.yml | 8 ++++---- .gitignore | 8 +------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bac9abe2..cd726888 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,13 +16,13 @@ jobs: - name: prepare run: mkdir cmake_link && mkdir cmake_arm - name: configure-link - run: cmake .. + run: cmake -DSOS_SDK_PATH=/StratifyLabs-SDK .. working-directory: cmake_link - name: make-link run: make -j3 working-directory: cmake_link - name: configure - run: cmake .. + run: cmake -DSOS_SDK_PATH=/StratifyLabs-SDK .. working-directory: cmake_arm - name: make run: make -j3 @@ -36,13 +36,13 @@ jobs: - name: prepare run: mkdir cmake_link && mkdir cmake_arm - name: configure-link - run: cmake .. + run: cmake -DSOS_SDK_PATH=/Applications/StratifyLabs-SDK .. working-directory: cmake_link - name: make-link run: make -j3 working-directory: cmake_link - name: configure - run: cmake .. + run: cmake -DSOS_SDK_PATH=/Applications/StratifyLabs-SDK .. working-directory: cmake_arm - name: make run: make -j3 diff --git a/.gitignore b/.gitignore index fb2c3223..bfa50594 100644 --- a/.gitignore +++ b/.gitignore @@ -1,14 +1,8 @@ *.a *.d *.o - - *.user -<<<<<<< HEAD -/build_release_link/ -======= cmake_* - *.gch ->>>>>>> eefabcccff6c59ba4387d6756ffa955d1f9328ab *.8-pre1 +.vscode/ From eed3ad72a2733e61e7d071679db96758de1e29e1 Mon Sep 17 00:00:00 2001 From: Tyler Gilbert Date: Sun, 26 Jul 2020 16:31:00 -0600 Subject: [PATCH 04/11] Update Getting-Started.md --- guides/Getting-Started.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/guides/Getting-Started.md b/guides/Getting-Started.md index 2e492989..56a8d43f 100644 --- a/guides/Getting-Started.md +++ b/guides/Getting-Started.md @@ -16,8 +16,8 @@ chmod 777 -R $INSTALL_DIRECTORY # if needed to make public mkdir -p $INSTALL_DIRECTORY/Tools/gcc/bin curl -L -o $INSTALL_DIRECTORY/Tools/gcc/bin/sl $SL_LINK chmod 755 $INSTALL_DIRECTORY/Tools/gcc/bin/sl -echo 'export PATH=$INSTALL_DIRECTORY/Tools/gcc/bin:$PATH' >> $PROFILE -echo 'export SOS_SDK_PATH=$INSTALL_DIRECTORY' >> $PROFILE +echo 'export PATH='$INSTALL_DIRECTORY'/Tools/gcc/bin:$PATH' >> $PROFILE +echo 'export SOS_SDK_PATH='$INSTALL_DIRECTORY >> $PROFILE source $PROFILE ``` From e34df78800a7c35d2da0b884a6db44a4b6ef59f7 Mon Sep 17 00:00:00 2001 From: Tyler Date: Wed, 29 Jul 2020 22:21:40 -0600 Subject: [PATCH 05/11] Update sos-toolchain.cmake --- cmake/sos-toolchain.cmake | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cmake/sos-toolchain.cmake b/cmake/sos-toolchain.cmake index 8de22a61..c5d37448 100644 --- a/cmake/sos-toolchain.cmake +++ b/cmake/sos-toolchain.cmake @@ -1,8 +1,4 @@ -if( ${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Windows" ) - set(CMAKE_MAKE_PROGRAM "C:/StratifyLabs-SDK/Tools/gcc/bin/make.exe") - set(CMAKE_SET_GENERATOR "MinGW Makefiles" CACHE INTERNAL "cmake generator mingw makefiles") -endif() set(CMAKE_SYSTEM_NAME Generic) set(CMAKE_SYSTEM_PROCESSOR arm) @@ -32,6 +28,12 @@ else() endif() endif() +if( ${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Windows" ) + message(STATUS "Using StratifyLabs-SDK make.exe") + set(CMAKE_MAKE_PROGRAM "${SOS_SDK_PATH}/Tools/gcc/bin/make.exe") + #set(CMAKE_SET_GENERATOR "MinGW Makefiles" CACHE INTERNAL "cmake generator mingw makefiles") +endif() + if(TOOLCHAIN_HOST) # <--- Use 'BOOST_DIR', not 'DEFINED ${BOOST_DIR}' MESSAGE(STATUS "User provided toolchain directory " ${TOOLCHAIN_HOST}) else() From e8f49d5720a32c3ece7e0556a72d55ddc2123584 Mon Sep 17 00:00:00 2001 From: Tyler Gilbert Date: Sat, 25 Jul 2020 21:26:04 -0600 Subject: [PATCH 06/11] update readme, build on linux and mac --- .github/workflows/build.yml | 24 +++++++++++++++++++++--- README.md | 29 +++-------------------------- 2 files changed, 24 insertions(+), 29 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9bbc0941..adca834c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,10 +7,28 @@ on: branches: [ development ] jobs: - build: - + buildLinuxArm32: runs-on: [self-hosted, linux, ARM] - + steps: + - uses: actions/checkout@v2 + with: + ref: 'development' + - name: prepare + run: mkdir cmake_link && mkdir cmake_arm + - name: configure-link + run: cmake .. + working-directory: cmake_link + - name: make-link + run: make -j3 + working-directory: cmake_link + - name: configure + run: cmake .. + working-directory: cmake_arm + - name: make + run: make -j3 + working-directory: cmake_arm + buildMacOS: + runs-on: [self-hosted, macOS, ARM] steps: - uses: actions/checkout@v2 with: diff --git a/README.md b/README.md index 01e09687..67d71ba8 100644 --- a/README.md +++ b/README.md @@ -2,38 +2,15 @@ ![Build](https://github.com/StratifyLabs/StratifyOS/workflows/Build/badge.svg) +[Getting Started Guide](guides/Getting-Started.md) + Stratify OS is a fully featured microcontroller operating system designed specifically for the ARM Cortex M architecture. It features: - [Decoupled System and Application Binaries](guides/Stratify-OS.md) - [Deep integration with Cortex M hardware](guides/ARM-Cortex-M.md) such as the MPU, SysTick/PendSV, SVCall, Dual Stacks, NVIC, BPU, and Cache - [POSIX Style Filesystems](guides/Filesystems.md) - [Complete Hardware Abstraction](guides/Device-Drivers.md) - -## Getting Started - -Getting started on Stratify OS is easy with the Stratify Labs cloud/command line tool called `sl`. - -**Install on Mac OS X** - -``` -mkdir -p /Applications/StratifyLabs-SDK/Tools/gcc/bin -curl -L -o /Applications/StratifyLabs-SDK/Tools/gcc/bin/sl 'https://stratifylabs.page.link/slmac' -chmod 755 /Applications/StratifyLabs-SDK/Tools/gcc/bin/sl -echo 'export PATH=/Applications/StratifyLabs-SDK/Tools/gcc/bin:$PATH' >> ~/.bash_profile -source ~/.bash_profile -``` - -**Install on Windows (Git Bash)** - -``` -mkdir -p /C/StratifyLabs-SDK/Tools/gcc/bin -curl -L -o /C/StratifyLabs-SDK/Tools/gcc/bin/sl.exe 'https://stratifylabs.page.link/slwin' -chmod 755 /C/StratifyLabs-SDK/Tools/gcc/bin/sl.exe -echo 'export PATH=/C/StratifyLabs-SDK/Tools/gcc/bin:$PATH' >> ~/.bash_profile -source ~/.bash_profile -``` - -Once you install `sl`, visit the [Stratify Labs web application](https://app.stratifylabs.co) to login and start the tutorials. +- [Threads](guides/Threads.md) ## License From 49c9d4130ea4ee033ef470439ea06f4230ee6b37 Mon Sep 17 00:00:00 2001 From: Tyler Gilbert Date: Sat, 25 Jul 2020 21:29:46 -0600 Subject: [PATCH 07/11] Update build.yml --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index adca834c..ad390a2e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,7 +28,7 @@ jobs: run: make -j3 working-directory: cmake_arm buildMacOS: - runs-on: [self-hosted, macOS, ARM] + runs-on: [self-hosted, macOS, X64] steps: - uses: actions/checkout@v2 with: From fc97f97fb3a069d29d8be6d09fbe240a6e7eba27 Mon Sep 17 00:00:00 2001 From: Tyler Date: Wed, 29 Jul 2020 23:26:02 -0600 Subject: [PATCH 08/11] rebase master --- .github/workflows/build.yml | 8 ++++---- .gitignore | 8 +------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ad390a2e..cd726888 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,13 +16,13 @@ jobs: - name: prepare run: mkdir cmake_link && mkdir cmake_arm - name: configure-link - run: cmake .. + run: cmake -DSOS_SDK_PATH=/StratifyLabs-SDK .. working-directory: cmake_link - name: make-link run: make -j3 working-directory: cmake_link - name: configure - run: cmake .. + run: cmake -DSOS_SDK_PATH=/StratifyLabs-SDK .. working-directory: cmake_arm - name: make run: make -j3 @@ -36,13 +36,13 @@ jobs: - name: prepare run: mkdir cmake_link && mkdir cmake_arm - name: configure-link - run: cmake -DSOS_SDK_PATH=/StratifyLabs-SDK .. + run: cmake -DSOS_SDK_PATH=/Applications/StratifyLabs-SDK .. working-directory: cmake_link - name: make-link run: make -j3 working-directory: cmake_link - name: configure - run: cmake -DSOS_SDK_PATH=/StratifyLabs-SDK .. + run: cmake -DSOS_SDK_PATH=/Applications/StratifyLabs-SDK .. working-directory: cmake_arm - name: make run: make -j3 diff --git a/.gitignore b/.gitignore index fb2c3223..bfa50594 100644 --- a/.gitignore +++ b/.gitignore @@ -1,14 +1,8 @@ *.a *.d *.o - - *.user -<<<<<<< HEAD -/build_release_link/ -======= cmake_* - *.gch ->>>>>>> eefabcccff6c59ba4387d6756ffa955d1f9328ab *.8-pre1 +.vscode/ From e010b7162853a8c1552170d6db4e07fe4646cd3a Mon Sep 17 00:00:00 2001 From: Tyler Gilbert Date: Sun, 26 Jul 2020 16:31:00 -0600 Subject: [PATCH 09/11] Update Getting-Started.md --- guides/Getting-Started.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/guides/Getting-Started.md b/guides/Getting-Started.md index 2e492989..56a8d43f 100644 --- a/guides/Getting-Started.md +++ b/guides/Getting-Started.md @@ -16,8 +16,8 @@ chmod 777 -R $INSTALL_DIRECTORY # if needed to make public mkdir -p $INSTALL_DIRECTORY/Tools/gcc/bin curl -L -o $INSTALL_DIRECTORY/Tools/gcc/bin/sl $SL_LINK chmod 755 $INSTALL_DIRECTORY/Tools/gcc/bin/sl -echo 'export PATH=$INSTALL_DIRECTORY/Tools/gcc/bin:$PATH' >> $PROFILE -echo 'export SOS_SDK_PATH=$INSTALL_DIRECTORY' >> $PROFILE +echo 'export PATH='$INSTALL_DIRECTORY'/Tools/gcc/bin:$PATH' >> $PROFILE +echo 'export SOS_SDK_PATH='$INSTALL_DIRECTORY >> $PROFILE source $PROFILE ``` From 77f272f256cb1190101424e3fe7097f6de26d0ab Mon Sep 17 00:00:00 2001 From: Tyler Date: Wed, 29 Jul 2020 23:27:34 -0600 Subject: [PATCH 10/11] Update sos-toolchain.cmake --- cmake/sos-toolchain.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/sos-toolchain.cmake b/cmake/sos-toolchain.cmake index 327529a7..dc34213a 100644 --- a/cmake/sos-toolchain.cmake +++ b/cmake/sos-toolchain.cmake @@ -34,7 +34,7 @@ if( ${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Windows" ) endif() -if(TOOLCHAIN_HOST) # <--- Use 'BOOST_DIR', not 'DEFINED ${BOOST_DIR}' +if(TOOLCHAIN_HOST) MESSAGE(STATUS "User provided toolchain directory " ${TOOLCHAIN_HOST}) else() set(TOOLCHAIN_HOST "arm-none-eabi" CACHE INTERNAL "TOOLCHAIN HOST ARM-NONE-EABI") From 2de3a6ab89e8c948a1f12cbc0ca6b957fe5b2e25 Mon Sep 17 00:00:00 2001 From: Tyler Gilbert Date: Fri, 7 Aug 2020 11:46:15 -0600 Subject: [PATCH 11/11] Update types.h --- include/mcu/types.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/mcu/types.h b/include/mcu/types.h index 65c3a444..e2e7e83a 100644 --- a/include/mcu/types.h +++ b/include/mcu/types.h @@ -151,6 +151,7 @@ typedef struct { * \endcode */ #define MCU_SYS_MEM __attribute__((section(".sysmem"))) MCU_ALIGN(4) +#define MCU_BACKUP_MEM __attribute__((section(".backup"))) MCU_ALIGN(4) #ifdef __link #define MCU_ROOT_CODE