Skip to content

Commit

Permalink
🧑‍💻 Prep for QEMU testing
Browse files Browse the repository at this point in the history
  • Loading branch information
kammce committed Jul 25, 2024
1 parent ff21376 commit 8a1d7c8
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 7 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,30 @@ jobs:
compiler_version: 12.3
compiler_package: arm-gnu-toolchain
secrets: inherit

demo_check_lpc4078:
uses: libhal/ci/.github/workflows/[email protected]
with:
compiler_profile_url: https://github.com/libhal/arm-gnu-toolchain.git
compiler_profile: v1/arm-gcc-12.3
platform_profile_url: https://github.com/libhal/libhal-lpc40.git
platform_profile: v2/lpc4078
secrets: inherit

demo_check_stm32f103c8:
uses: libhal/ci/.github/workflows/[email protected]
with:
compiler_profile_url: https://github.com/libhal/arm-gnu-toolchain.git
compiler_profile: v1/arm-gcc-12.3
platform_profile_url: https://github.com/libhal/libhal-stm32f1.git
platform_profile: v2/stm32f103c8
secrets: inherit

demo_check_stm32f103r6:
uses: libhal/ci/.github/workflows/[email protected]
with:
compiler_profile_url: https://github.com/libhal/arm-gnu-toolchain.git
compiler_profile: v1/arm-gcc-12.3
platform_profile_url: https://github.com/libhal/libhal-stm32f1.git
platform_profile: v2/stm32f103r6
secrets: inherit
12 changes: 12 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: 🚀 Deploy

on:
workflow_dispatch:

jobs:
deploy:
if: startsWith(github.ref, 'refs/tags/')
uses: libhal/ci/.github/workflows/[email protected]
with:
version: ${{ github.ref_name }}
secrets: inherit
14 changes: 7 additions & 7 deletions demos/applications/multi_levels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ int funct_group3_0();
int funct_group4_0();
int funct_group5_0();
int funct_group6_0();
int funct_group7_0();
int funct_group8_0();
// int funct_group7_0();
// int funct_group8_0();
// int funct_group9_0();
// int funct_group10_0();
// int funct_group11_0();
Expand All @@ -47,10 +47,10 @@ int funct_group8_0();
using signature = int(void);

std::array<signature*, 9> functions = {
&funct_group0_0, &funct_group1_0, &funct_group2_0,
&funct_group3_0, &funct_group4_0, &funct_group5_0,
&funct_group6_0, &funct_group7_0, &funct_group8_0,
&funct_group0_0, &funct_group1_0, &funct_group2_0, &funct_group3_0,
&funct_group4_0, &funct_group5_0, &funct_group6_0,
#if 0
&funct_group7_0, &funct_group8_0,
&funct_group9_0,
&funct_group10_0, &funct_group11_0, &funct_group12_0, &funct_group13_0,
&funct_group14_0, &funct_group15_0, &funct_group16_0, &funct_group17_0,
Expand Down Expand Up @@ -2631,6 +2631,8 @@ int funct_group6_11()
return side_effect;
}

#if 0

int funct_group7_1();

int funct_group7_0()
Expand Down Expand Up @@ -3501,8 +3503,6 @@ int funct_group8_47()
return side_effect;
}

#if 0

int funct_group9_1();

int funct_group9_0()
Expand Down
31 changes: 31 additions & 0 deletions demos/platforms/stm32f103r6.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Copyright 2024 Khalil Estell
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#include <libhal-armcortex/dwt_counter.hpp>
#include <libhal-stm32f1/clock.hpp>

#include "../resource_list.hpp"

resource_list initialize_platform()
{
using namespace hal::literals;
hal::stm32f1::maximum_speed_using_internal_oscillator();

auto cpu_frequency = hal::stm32f1::frequency(hal::stm32f1::peripheral::cpu);
static hal::cortex_m::dwt_counter dwt_steady_clock(cpu_frequency);

return {
.clock = &dwt_steady_clock,
};
}

0 comments on commit 8a1d7c8

Please sign in to comment.