Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .github/membrowse-targets.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,21 @@
{
"target_name": "rp2040",
"source_dir": "rp2040-pico-sdk",
"build_cmd": "cmake -S _integ/rp2040-pico-sdk -B build -DCMRX_UNIT_TESTS=OFF -DCMAKE_BUILD_TYPE=Debug -DPICO_SDK_PATH=$GITHUB_WORKSPACE/_integ/rp2040-pico-sdk/pico-sdk && (cmake --build build || true) && cmake --build build && printf 'MEMORY {\\n FLASH(rx) : ORIGIN = 0x10000000, LENGTH = 2048K\\n RAM(rwx) : ORIGIN = 0x20000000, LENGTH = 256k\\n SCRATCH_X(rwx) : ORIGIN = 0x20040000, LENGTH = 4k\\n SCRATCH_Y(rwx) : ORIGIN = 0x20041000, LENGTH = 4k\\n}\\n' > build/rp2040_memory.ld",
"build_cmd": "cmake -S _integ/rp2040-pico-sdk -B build -DCMRX_UNIT_TESTS=OFF -DCMAKE_BUILD_TYPE=Debug -DPICO_TOOLCHAIN_PATH=$HOME/riscv-toolchain -DPICO_SDK_PATH=$GITHUB_WORKSPACE/_integ/rp2040-pico-sdk/pico-sdk && (cmake --build build || true) && cmake --build build && printf 'MEMORY {\\n FLASH(rx) : ORIGIN = 0x10000000, LENGTH = 2048K\\n RAM(rwx) : ORIGIN = 0x20000000, LENGTH = 256k\\n SCRATCH_X(rwx) : ORIGIN = 0x20040000, LENGTH = 4k\\n SCRATCH_Y(rwx) : ORIGIN = 0x20041000, LENGTH = 4k\\n}\\n' > build/rp2040_memory.ld",
"elf": "build/helloworld.elf",
"ld": "build/rp2040_memory.ld",
"map_file": "build/helloworld.map",
"linker_vars": ""
},
{
"target_name": "rp2350-riscv",
"source_dir": "rp2350-pico-sdk-riscv",
"build_cmd": "cd $GITHUB_WORKSPACE/_integ/rp2350-pico-sdk-riscv && cmake -S . -B build -DCMRX_UNIT_TESTS=OFF -DCMAKE_BUILD_TYPE=Debug -DPICO_PLATFORM=rp2350-riscv -DPICO_BOARD=pico2 -DPICO_SDK_PATH=$GITHUB_WORKSPACE/_integ/rp2350-pico-sdk-riscv/pico-sdk && (cmake --build build || true) && cmake --build build && printf 'MEMORY\n{\n FLASH (rx) : ORIGIN = 0x10000000, LENGTH = 2048k\n RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 512k\n SCRATCH (rwx): ORIGIN = 0x20080000, LENGTH = 4k\n}\n' > build/rp2350_riscv_memory.ld",
"elf": "build/rp2350_riscv_cmrx.elf",
"ld": "build/rp2350_riscv_memory.ld",
"map_file": "build/rp2350_riscv_cmrx.map",
"linker_vars": ""
},
{
"target_name": "linux",
"source_dir": "linux-posix",
Expand Down
15 changes: 12 additions & 3 deletions .github/workflows/membrowse-onboard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,32 @@ jobs:
fetch-depth: 0

- name: Prepare Cross-Toolchain Environment
if: matrix.target_name != 'linux'
if: matrix.target_name != 'linux' && matrix.target_name != 'rp2350-riscv'
uses: carlosperate/arm-none-eabi-gcc-action@v1
with:
release: '12.2.Rel1'

- name: Prepare RISC-V Cross-Toolchain
if: matrix.target_name == 'rp2350-riscv'
run: |
curl -L -o /tmp/riscv-toolchain.tar.gz \
https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.3.0-1/riscv-toolchain-16-x86_64-lin.tar.gz
mkdir -p "$HOME/riscv-toolchain"
tar -xzf /tmp/riscv-toolchain.tar.gz -C "$HOME/riscv-toolchain"
echo "$HOME/riscv-toolchain/bin" >> "$GITHUB_PATH"

- name: Checkout Integration Tests
uses: actions/checkout@v4.1.6
with:
repository: ventZl/cmrx-integration-tests
path: _integ

- name: Checkout Raspberry Pi Pico SDK
if: matrix.target_name == 'rp2040'
if: matrix.target_name == 'rp2040' || matrix.target_name == 'rp2350-riscv'
uses: actions/checkout@v4.1.6
with:
repository: raspberrypi/pico-sdk
path: _integ/rp2040-pico-sdk/pico-sdk
path: _integ/${{ matrix.source_dir }}/pico-sdk

- name: Link CMRX source
run: rm -rf _integ/${{ matrix.source_dir }}/cmrx && ln -s $GITHUB_WORKSPACE _integ/${{ matrix.source_dir }}/cmrx
Expand Down
72 changes: 72 additions & 0 deletions .github/workflows/rp2350-riscv-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: 'Build: rp2350-riscv'

on:
pull_request:
push:
branches:
- master

concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'push' && github.sha || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
build-project:
runs-on: ubuntu-latest
steps:
- name: Prepare RISC-V Cross-Toolchain
run: |
curl -L -o /tmp/riscv-toolchain.tar.gz \
https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.3.0-1/riscv-toolchain-16-x86_64-lin.tar.gz
mkdir -p "$HOME/riscv-toolchain"
tar -xzf /tmp/riscv-toolchain.tar.gz -C "$HOME/riscv-toolchain"
echo "$HOME/riscv-toolchain/bin" >> "$GITHUB_PATH"
echo "PICO_TOOLCHAIN_PATH=$HOME/riscv-toolchain" >> "$GITHUB_ENV"

- name: Checkout repository
uses: actions/checkout@v4.1.6
with:
fetch-depth: 0

- name: Checkout Integration Tests
uses: actions/checkout@v4.1.6
with:
repository: ventZl/cmrx-integration-tests
path: _integ

- name: Checkout Raspberry Pi Pico SDK
uses: actions/checkout@v4.1.6
with:
repository: raspberrypi/pico-sdk
ref: 2.2.0
path: _integ/rp2350-pico-sdk-riscv/pico-sdk

- name: Link CMRX source
run: rm -rf _integ/rp2350-pico-sdk-riscv/cmrx && ln -s $GITHUB_WORKSPACE _integ/rp2350-pico-sdk-riscv/cmrx

- name: Configure Integration Test Build
uses: threeal/cmake-action@main
with:
run-build: false
source-dir: _integ/rp2350-pico-sdk-riscv
build-dir: build
args: -DCMRX_UNIT_TESTS=OFF -DCMAKE_BUILD_TYPE=Debug -DPICO_PLATFORM=rp2350-riscv -DPICO_BOARD=pico2 -DPICO_SDK_PATH=${{github.workspace}}/_integ/rp2350-pico-sdk-riscv/pico-sdk -DPICO_TOOLCHAIN_PATH=${{env.PICO_TOOLCHAIN_PATH}} -DPICO_GCC_TRIPLE=riscv32-pico-elf

- name: Build Integration Test
run: make -C build
continue-on-error: true

- name: Generate RP2350 memory regions
run: |
printf 'MEMORY\n{\n FLASH (rx) : ORIGIN = 0x10000000, LENGTH = 2048k\n RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 512k\n SCRATCH (rwx): ORIGIN = 0x20080000, LENGTH = 4k\n}\n' > build/rp2350_riscv_memory.ld

- name: Run MemBrowse analysis
uses: membrowse/membrowse-action@v1
with:
target_name: rp2350-riscv
elf: build/rp2350_riscv_cmrx.elf
ld: build/rp2350_riscv_memory.ld
map_file: build/rp2350_riscv_cmrx.map
api_key: ${{ secrets.MEMBROWSE_API_KEY }}
api_url: ${{ vars.MEMBROWSE_API_URL }}
verbose: INFO
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
CMRX - Microkernel RTOS for microcontrollers
============================================

![unit tests](https://github.com/ventZl/cmrx/actions/workflows/unit_tests.yml/badge.svg) [![Clang-Tidy](https://github.com/ventZl/cmrx/actions/workflows/clang_tidy.yml/badge.svg?branch=master)](https://github.com/ventZl/cmrx/actions/workflows/clang_tidy.yml) ![stm32h7 build](https://github.com/ventZl/cmrx/actions/workflows/stm32h7-build.yml/badge.svg) ![stm32g4 build](https://github.com/ventZl/cmrx/actions/workflows/stm32g4-build.yml/badge.svg) ![rp2040 build](https://github.com/ventZl/cmrx/actions/workflows/rp2040-build.yml/badge.svg) [![Linux build](https://github.com/ventZl/cmrx/actions/workflows/linux-build.yml/badge.svg)](https://github.com/ventZl/cmrx/actions/workflows/linux-build.yml) [![MemBrowse](https://membrowse.com/badge.svg)](https://membrowse.com/public/ventZl/cmrx)
![unit tests](https://github.com/ventZl/cmrx/actions/workflows/unit_tests.yml/badge.svg) [![Clang-Tidy](https://github.com/ventZl/cmrx/actions/workflows/clang_tidy.yml/badge.svg?branch=master)](https://github.com/ventZl/cmrx/actions/workflows/clang_tidy.yml) ![stm32h7 build](https://github.com/ventZl/cmrx/actions/workflows/stm32h7-build.yml/badge.svg) ![stm32g4 build](https://github.com/ventZl/cmrx/actions/workflows/stm32g4-build.yml/badge.svg) ![rp2040 build](https://github.com/ventZl/cmrx/actions/workflows/rp2040-build.yml/badge.svg) ![rp2350-riscv build](https://github.com/ventZl/cmrx/actions/workflows/rp2350-riscv-build.yml/badge.svg) [![Linux build](https://github.com/ventZl/cmrx/actions/workflows/linux-build.yml/badge.svg)](https://github.com/ventZl/cmrx/actions/workflows/linux-build.yml) [![MemBrowse](https://membrowse.com/badge.svg)](https://membrowse.com/public/ventZl/cmrx)

**Table of Contents**
- [About](#about)
Expand Down
Loading