Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
5a30374
Draft of the migration to GCC compiler desktop build
ValentiWorkLearning Sep 22, 2021
ed0dd69
Updated workflows file
ValentiWorkLearning Sep 22, 2021
992a3fd
Updated falgs for building with coroutines in the GNU compiler
Sep 24, 2021
d69ad2d
Merge branch 'master' into dev/migration_gcc_desktop_build
ValentiWorkLearning Oct 14, 2021
a9e8c99
After merge corrections
ValentiWorkLearning Oct 14, 2021
3e65fa5
Removed old branches from the build.yml config
ValentiWorkLearning Oct 14, 2021
b5b7dcb
Updated workflows file for the github actions. Removed conan librarie…
ValentiWorkLearning Oct 14, 2021
08656c1
Attempted to fixup CI
ValentiWorkLearning Oct 14, 2021
57533a0
Added linux-desktop-configuration build
ValentiWorkLearning Oct 14, 2021
8c4c343
Fixed syntax issues in build.yml
ValentiWorkLearning Oct 14, 2021
1d836b4
Added installation of libegl-dev
ValentiWorkLearning Oct 14, 2021
1b895f1
Fixed indentation in build.yml
ValentiWorkLearning Oct 14, 2021
79d8837
Attempted to fixup windows build
ValentiWorkLearning Oct 14, 2021
5872e25
sudo apt-get on linux
ValentiWorkLearning Oct 14, 2021
8f995cb
Added packages update for linux desktop
ValentiWorkLearning Oct 14, 2021
c43ea01
Attempted to fixup windows build
ValentiWorkLearning Oct 14, 2021
22b6b2a
Fixed build.yml windows build directory
ValentiWorkLearning Oct 14, 2021
aa16452
Fixed windows build workflow. Added Test running under linux-desktop
ValentiWorkLearning Oct 14, 2021
1a59d0e
Renamed linux desktop to linux dekstop simulator CI
ValentiWorkLearning Oct 14, 2021
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
67 changes: 57 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@ name: CI
# events but only for the master branch
on:
push:
branches: [ master,dev/develop,dev/coroutine,dev/build_ci_speedup]
branches: [ master,dev/develop,dev/migration_gcc_desktop_build]
pull_request:
branches: [ master,dev/develop,dev/coroutine]
branches: [ master,dev/develop]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build-windows-simulator:
# The type of runner that the job will run on
runs-on: windows-latest

env:
buildDir: '${{ github.workspace }}\build'
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
Expand All @@ -33,11 +34,6 @@ jobs:
packages: |
conan

- name: Download libraries from Conan
run: |
mkdir ${{ runner.workspace }}/build/vsfirmwarebuild/Debug
conan install ${{ github.workspace }}/Firmware/conanfile.txt --install-folder ${{ runner.workspace }}/build/vsfirmwarebuild/

#Install the latest cmake
- name : Get the latest CMake version
uses: lukka/get-cmake@latest
Expand All @@ -50,11 +46,11 @@ jobs:
cmakeListsTxtPath: ${{ github.workspace }}/Firmware/CMakeLists.txt
cmakeBuildType: Debug
cmakeAppendedArgs: '-DPACKAGE_TESTS=ON -DTARGET_PLATFORM:STRING="FIRMWARE_SIMULATOR" -DCMAKE_BUILD_TYPE:STRING=Release'
buildDirectory: '${{ runner.workspace }}/build/vsfirmwarebuild'
buildDirectory: ${{ env.buildDir }}
buildWithCMake: true
- name : Run firmware testing
run: |
cd ${{ runner.workspace }}/build/vsfirmwarebuild/bin
cd ${{ env.buildDir }}\Debug
.\FirmwareTesting.exe
build-arm:

Expand Down Expand Up @@ -132,3 +128,54 @@ jobs:
# run: |
# echo Add other actions to build,
# echo test, and deploy your project.
build-linux-desktop-simulator:
runs-on: ubuntu-latest
env:
buildDir: '${{ github.workspace }}/build'
steps:

# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
with:
submodules: 'true'

- name: Setup python
uses: actions/setup-python@v2
with:
python-version: '3.8'

- name: Install conan
uses: BSFishy/pip-action@v1
with:
packages: |
conan

- name: Intall system required packages
run: |
sudo apt-get update
sudo apt-get install -y libegl-dev
#Install the latest cmake
- name : Get the latest CMake version
uses: lukka/get-cmake@latest

- name: Set up GCC 11
uses: egor-tensin/setup-gcc@v1
with:
version: 11
platform: x64

- name: Run CMakeLists generation for GCC compiler
uses: lukka/run-cmake@v2
with:
cmakeGenerator: Unix Makefiles
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
cmakeListsTxtPath: ${{ github.workspace }}/Firmware/CMakeLists.txt
cmakeBuildType: Debug
cmakeAppendedArgs : '-DTARGET_PLATFORM:STRING="FIRMWARE_SIMULATOR" -DCMAKE_BUILD_TYPE:STRING=Debug -DREDUCE_LVGL_BINARY_SIZE=OFF -DPACKAGE_TESTS=ON -DENABLE_SANITIZE_BUILD=ON'
buildDirectory: ${{ env.buildDir }}
buildWithCMake: true

- name : Run firmware testing
run: |
cd ${{ env.buildDir }}
./FirmwareTesting
6 changes: 6 additions & 0 deletions Firmware/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,12 @@ target_compile_features(
cxx_std_20
)

target_compile_options(
${NORDIC_TARGET}
PRIVATE
$<$<CXX_COMPILER_ID:GNU>:-fcoroutines>
)

if( ${TARGET_PLATFORM} STREQUAL "ARM_CORTEX" )
target_link_libraries(
${NORDIC_TARGET} PRIVATE
Expand Down
12 changes: 7 additions & 5 deletions Firmware/drivers/board/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,12 @@ if( ${TARGET_PLATFORM} STREQUAL "ARM_CORTEX" )
PUBLIC
USE_DEVICE_SPECIFIC
)
target_compile_options(
watchboard
PRIVATE
-fcoroutines
)
elseif( ${TARGET_PLATFORM} STREQUAL "FIRMWARE_SIMULATOR")
endif()


target_compile_options(
watchboard
PRIVATE
$<$<CXX_COMPILER_ID:GNU>:-fcoroutines>
)
6 changes: 4 additions & 2 deletions Firmware/drivers/board/inc/board/hardware_usings.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ using TFlashDriver = ExternalFlash::WinbondFlashDriver<
#else
using BoardTimer = Buttons::NordicTimerBackend;
using ButtonsBackend = Buttons::NordicButtonsBackend;
using TFlashDriver = ExternalFlash::WinbondFlashDriver<Interface::SpiTemplated::SpiBus<
Interface::SpiTemplated::NordicSpi<Interface::SpiTemplated::SpiInstance::M1,Interface::SpiTemplated::SpiInstance::ChipSelectDrivenByUser>>>;
using TFlashDriver = ExternalFlash::WinbondFlashDriver<
Interface::SpiTemplated::SpiBus<Interface::SpiTemplated::NordicSpi<
Interface::SpiTemplated::SpiInstance::M1,
Interface::SpiTemplated::SpiInstance::ChipSelectDrivenByUser>>>;
#endif

using ButtonsDriver = Buttons::ButtonsDriverTemplate<BoardTimer, ButtonsBackend>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

#include "inc/buttons/bt_firmware_simulator_hardware_buttons_manual_backend.hpp"

#include <utils/CallbackConnector.hpp>
Expand All @@ -10,6 +11,7 @@
namespace Buttons
{


FirmwareSimulatorTimerBackend::FirmwareSimulatorTimerBackend() : m_isTimerEllapsed{true}
{
}
Expand Down
38 changes: 38 additions & 0 deletions Firmware/drivers/buttons/bt_os_stub_hardware_buttons_backend.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#include "inc/buttons/bt_os_hardware_buttons_manual_backend.hpp"

#include "utils/CallbackConnector.hpp"
#include "utils/MetaUtils.hpp"

namespace Buttons
{

OsTimerBackend::OsTimerBackend() : m_isTimerEllapsed{true}
{
}

void OsTimerBackend::startTimer()
{
}

void OsTimerBackend::stopTimer()
{
}

void OsTimerBackend::initialize()
{
}

bool OsTimerBackend::isTimerEllapsed() const
{
return m_isTimerEllapsed;
}

OsButtonsBackend::OsButtonsBackend()
{
}

void OsButtonsBackend::initialize()
{
}

} // namespace Buttons
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

namespace Buttons
{

class FirmwareSimulatorTimerBackend
{

Expand Down Expand Up @@ -42,7 +41,6 @@ class FirmwareSimulatorButtonsBackend

public:
void initialize();

private:
void initInternals();
};
Expand Down
10 changes: 5 additions & 5 deletions Firmware/drivers/spi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ add_library(
if( ${TARGET_PLATFORM} STREQUAL "ARM_CORTEX" )

target_link_libraries( spi INTERFACE NordicSDK::Common )
target_compile_options(
spi
INTERFACE
-fcoroutines
)
endif()

target_compile_options(
spi
INTERFACE
$<$<CXX_COMPILER_ID:GNU>:-fcoroutines>
)

target_include_directories(
spi
Expand Down
5 changes: 5 additions & 0 deletions Firmware/utils/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,8 @@ target_link_libraries(
etl
logger_service
)
target_compile_options(
UtilsLibrary
INTERFACE
$<$<CXX_COMPILER_ID:GNU>:-fcoroutines>
)