Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
333a0ad
Added draft of the littlefs system [FS] #17
ValentiWorkLearning Nov 19, 2021
00d7e19
Draft wrapper over littlefs types
Nov 22, 2021
3801c97
Added missed CMakeLists for littlefs
Nov 22, 2021
5a82a49
Implemented draft of heap block device
ValentiWorkLearning Nov 22, 2021
ca42a80
Draft of the write method for block device
ValentiWorkLearning Nov 22, 2021
6a73547
Working draft of the filesystem mounting
ValentiWorkLearning Dec 5, 2021
5c232f9
Corrected template arguments for the heap block device [HEAP][BLOCKDEV]
ValentiWorkLearning Dec 6, 2021
c33ba91
Implemented working draft of FS driver and heap-block-device
ValentiWorkLearning Dec 8, 2021
a8a1323
Fixed startup buffer crash
ValentiWorkLearning Dec 8, 2021
fb05ca9
Impleemnted support of the small chunks reading [FILESYTEM]
ValentiWorkLearning Dec 10, 2021
c5b365e
Corrected template parameters for CRTP[FILESYTEM]
ValentiWorkLearning Dec 10, 2021
e62453d
An attempt to add coroutines support to the FS driver [FILESYSTEM]
ValentiWorkLearning Dec 11, 2021
d59fa07
Merge branch 'master' into dev/littlefs_impl
ValentiWorkLearning Dec 31, 2021
6182218
Fixed draft FS coroutines example #17
ValentiWorkLearning Jan 4, 2022
f1b2c46
Implemented littlefs MVP with coroutines support
ValentiWorkLearning Jan 18, 2022
d703133
Removed littlefs original submodule
ValentiWorkLearning Jan 18, 2022
3df39a0
Switched to original coro-based littlefs submodule
ValentiWorkLearning Jan 18, 2022
5166f71
Added build triggers to littlefs branch
ValentiWorkLearning Jan 18, 2022
feccd06
Fixed build on ARM with shadowed template parameter #17
ValentiWorkLearning Jan 18, 2022
a02d905
Added gtest suite for the filesystem handling #17
ValentiWorkLearning Jan 19, 2022
df06039
Added forgotten CMakeLists.txt file to the filesystem #17
ValentiWorkLearning Jan 19, 2022
5041d7e
Fixed coroutine filesystem tests #17
ValentiWorkLearning Feb 3, 2022
1ac6a71
Attempted to fixup GCC builds on ARM and desktop #17
ValentiWorkLearning Feb 4, 2022
63e2f9c
Added interface for spi-based block device wrapper #17
ValentiWorkLearning Feb 6, 2022
2ad7d52
Added combiner block device with write call implementation #17
ValentiWorkLearning Feb 8, 2022
fe37da7
Updated littlefs CMakeLists
ValentiWorkLearning Mar 22, 2022
7fe0f96
Updated cmake generator to VS2022
ValentiWorkLearning Mar 22, 2022
6f9251c
Updated conan-cmake version
ValentiWorkLearning Mar 22, 2022
e13fe5b
Refactored root CMakeLists.txt to using the CMAKE_CURRENT_LIST_DIR lo…
ValentiWorkLearning Mar 23, 2022
4f21d46
Application class has been changed to the singleton
ValentiWorkLearning Mar 23, 2022
6afa37b
Refactored event subsystem dispatching
ValentiWorkLearning Mar 25, 2022
4b3819b
Application instance was moved to Singleton
ValentiWorkLearning Mar 25, 2022
9981bac
Success compilation of the coro-fs implementation on the ARM target
ValentiWorkLearning Mar 25, 2022
7b79909
Fixed windows simulator build. Removed unnecessary any_cast
ValentiWorkLearning Mar 25, 2022
0a71a2a
Removed LOG_DEBUG_ENDL macro
ValentiWorkLearning Mar 25, 2022
796d397
Extended logger with the severity modes
ValentiWorkLearning Mar 25, 2022
dda71d1
Fixed write-read data from the SPI-flash
ValentiWorkLearning Mar 26, 2022
bc38f6d
Extended Segger RTT buffer
ValentiWorkLearning Mar 26, 2022
f8e5d98
Added logging adaptor to spiblockdevice
ValentiWorkLearning Apr 1, 2022
5c9c94a
Removed unique_ptr keeping of the WatchBoard
ValentiWorkLearning Apr 1, 2022
c8eb9d7
Extented logger service with the log level disabling
ValentiWorkLearning Apr 1, 2022
d584cad
Added trace logs to the SpiBlockDevice
ValentiWorkLearning Apr 1, 2022
8af5f80
Added filesystem init to the watchboard
ValentiWorkLearning Apr 1, 2022
e4e00fe
Added assert-dump macro to the lfs_util_segger
ValentiWorkLearning Apr 1, 2022
4373195
Changed dump of the display refresh time to the single log line
ValentiWorkLearning Apr 1, 2022
3fa7fca
Decreased severity and removed redundant logs
ValentiWorkLearning Apr 1, 2022
d06259f
Removed redundant logs
ValentiWorkLearning Apr 1, 2022
76166ea
Implemented colorful logging to the RTT logger backend
ValentiWorkLearning Apr 2, 2022
6d6c662
Updated toolchain to 11.2
ValentiWorkLearning Apr 2, 2022
48417b7
[coroutine][filesystem]added coroutine loop executor for testing puro…
ValentiWorkLearning May 29, 2022
584a374
[filesystem] Added erase flash cmd expectation to tests
ValentiWorkLearning Jun 2, 2022
7465ea4
[firmware][tests] added missed CMakeLists.txt for the testing_common …
ValentiWorkLearning Aug 15, 2022
1de6108
[firmware][testing] fixed flash_driver_test_suite spi tests
ValentiWorkLearning Aug 17, 2022
fbd73e5
[firmware][filesystem] added lfs_util_desktop.h for the firmware simu…
ValentiWorkLearning Aug 17, 2022
d6edf6c
[firmware][graphics] increased LV_HEAP_SIZE to 18KB
ValentiWorkLearning Aug 17, 2022
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
285 changes: 141 additions & 144 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ name: CI
# events but only for the master branch
on:
push:
branches: [ master,dev/develop,dev/migration_gcc_desktop_build]
branches: [master, dev/develop, dev/littlefs_impl]
pull_request:
branches: [ master,dev/develop]
branches: [master, dev/develop]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
Expand All @@ -18,105 +18,103 @@ jobs:
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
- 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

#Install the latest cmake
- name : Get the latest CMake version
uses: lukka/get-cmake@latest

- name: Run build for MSVC compiler
run: |
cmake -G"Visual Studio 16 2019" -Ax64 -S"${{ github.workspace }}/Firmware/" -B"${{ env.buildDir }}" -DPACKAGE_TESTS=ON -DTARGET_PLATFORM:STRING="FIRMWARE_SIMULATOR" -DCMAKE_BUILD_TYPE=Release
cd ${{ env.buildDir }}
cmake --build . --config Release
- name : Run firmware testing
run: |
cd ${{ env.buildDir }}/Release
.\FirmwareTesting.exe
# 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

#Install the latest cmake
- name: Get the latest CMake version
uses: lukka/get-cmake@latest

- name: Run build for MSVC compiler
run: |
cmake -G"Visual Studio 17 2022" -Ax64 -S"${{ github.workspace }}/Firmware/" -B"${{ env.buildDir }}" -DPACKAGE_TESTS=ON -DTARGET_PLATFORM:STRING="FIRMWARE_SIMULATOR" -DCMAKE_BUILD_TYPE=Release
cd ${{ env.buildDir }}
cmake --build . --config Release
- name: Run firmware testing
run: |
cd ${{ env.buildDir }}/Release
.\FirmwareTesting.exe
build-arm:

runs-on: ubuntu-latest

steps:

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

#Install the latest cmake
- name : Get the latest CMake version
uses: lukka/get-cmake@latest

# - name: Get the latest arm-none-eabi-gcc
# uses: fiam/arm-none-eabi-gcc@v1
# with:
# release: '10-2020-q2'
# directory: ${{ github.workspace }}/toolchain
- name: Cache GCC toolchain
id: cache-gcc-toolchain
uses: actions/cache@v2
with:
path: ${{ github.workspace }}/gcc_toolchain_10_3
key: ${{runner.os}}-toolchain-v10_3

- name: Get the latest arm-gcc-none-eabi-gcc
uses: wei/wget@v1
if: steps.cache-gcc-toolchain.outputs.cache-hit != 'true'
id: download-arm-gcc
with:
args: 'https://developer.arm.com/-/media/Files/downloads/gnu-rm/10.3-2021.07/gcc-arm-none-eabi-10.3-2021.07-x86_64-linux.tar.bz2'

- name: Unpack arm-gcc-compiler
if: steps.cache-gcc-toolchain.outputs.cache-hit != 'true'
run: |
mkdir gcc_toolchain_10_3
tar -xjf gcc-arm-none-eabi-10.3-2021.07-x86_64-linux.tar.bz2 --directory ${{ github.workspace }}/gcc_toolchain_10_3

- name: Cache NordicSDK
id: cache-nordic-sdk
uses: actions/cache@v2
with:
path: ${{ github.workspace }}/Nrf52SDKv16_0
key: ${{runner.os}}-nordic-sdk-v16-0

- name: Get NRF52 16.0 SDK
uses: wei/wget@v1
id: download-nrf52sdk
if: steps.cache-nordic-sdk.outputs.cache-hit != 'true'
with:
args: 'https://www.nordicsemi.com/-/media/Software-and-other-downloads/SDKs/nRF5/Binaries/nRF5SDK160098a08e2.zip'

- name: Unpack NordicSDK
if: steps.cache-nordic-sdk.outputs.cache-hit != 'true'
run: |
mkdir Nrf52SDKv16_0
unzip nRF5SDK160098a08e2.zip -d Nrf52SDKv16_0
mv Nrf52SDKv16_0/components/boards/pca10040.h Nrf52SDKv16_0/components/boards/pca10040_1.h

- name: Run CMakeLists generation for GCC compiler
uses: lukka/run-cmake@v2
with:
cmakeGenerator: Ninja
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
cmakeListsTxtPath: ${{ github.workspace }}/Firmware/CMakeLists.txt
cmakeBuildType: Debug
cmakeAppendedArgs : '-DTARGET_PLATFORM:STRING="ARM_CORTEX" -DEXECUTE_MCU_FLASHING=OFF -DCMAKE_BUILD_TYPE:STRING=Debug -DREDUCE_LVGL_BINARY_SIZE=ON -DPACKAGE_TESTS=OFF -DNRF5_SDK_PATH=${{ github.workspace }}/Nrf52SDKv16_0 -DARM_NONE_EABI_TOOLCHAIN_PATH:PATH=${{ github.workspace }}/gcc_toolchain_10_3/gcc-arm-none-eabi-10.3-2021.07'
buildWithCMake: true
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
with:
submodules: "true"

#Install the latest cmake
- name: Get the latest CMake version
uses: lukka/get-cmake@latest

# - name: Get the latest arm-none-eabi-gcc
# uses: fiam/arm-none-eabi-gcc@v1
# with:
# release: '10-2020-q2'
# directory: ${{ github.workspace }}/toolchain
- name: Cache GCC toolchain
id: cache-gcc-toolchain
uses: actions/cache@v2
with:
path: ${{ github.workspace }}/gcc_toolchain_11_2
key: ${{runner.os}}-toolchain-v11_2

- name: Get the latest arm-gcc-none-eabi-gcc
uses: wei/wget@v1
if: steps.cache-gcc-toolchain.outputs.cache-hit != 'true'
id: download-arm-gcc
with:
args: "https://developer.arm.com/-/media/Files/downloads/gnu/11.2-2022.02/binrel/gcc-arm-11.2-2022.02-x86_64-arm-none-eabi.tar.xz"

- name: Unpack arm-gcc-compiler
if: steps.cache-gcc-toolchain.outputs.cache-hit != 'true'
run: |
mkdir gcc_toolchain_11_2
tar -xJf gcc-arm-11.2-2022.02-x86_64-arm-none-eabi.tar.xz --directory ${{ github.workspace }}/gcc_toolchain_11_2

- name: Cache NordicSDK
id: cache-nordic-sdk
uses: actions/cache@v2
with:
path: ${{ github.workspace }}/Nrf52SDKv16_0
key: ${{runner.os}}-nordic-sdk-v16-0

- name: Get NRF52 16.0 SDK
uses: wei/wget@v1
id: download-nrf52sdk
if: steps.cache-nordic-sdk.outputs.cache-hit != 'true'
with:
args: "https://www.nordicsemi.com/-/media/Software-and-other-downloads/SDKs/nRF5/Binaries/nRF5SDK160098a08e2.zip"

- name: Unpack NordicSDK
if: steps.cache-nordic-sdk.outputs.cache-hit != 'true'
run: |
mkdir Nrf52SDKv16_0
unzip nRF5SDK160098a08e2.zip -d Nrf52SDKv16_0
mv Nrf52SDKv16_0/components/boards/pca10040.h Nrf52SDKv16_0/components/boards/pca10040_1.h

- name: Run CMakeLists generation for GCC compiler
uses: lukka/run-cmake@v2
with:
cmakeGenerator: Ninja
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
cmakeListsTxtPath: ${{ github.workspace }}/Firmware/CMakeLists.txt
cmakeBuildType: Debug
cmakeAppendedArgs: '-DTARGET_PLATFORM:STRING="ARM_CORTEX" -DEXECUTE_MCU_FLASHING=OFF -DCMAKE_BUILD_TYPE:STRING=Debug -DREDUCE_LVGL_BINARY_SIZE=ON -DPACKAGE_TESTS=OFF -DNRF5_SDK_PATH=${{ github.workspace }}/Nrf52SDKv16_0 -DARM_NONE_EABI_TOOLCHAIN_PATH:PATH=${{ github.workspace }}/gcc_toolchain_11_2/gcc-arm-11.2-2022.02-x86_64-arm-none-eabi'
buildWithCMake: true

# # Runs a set of commands using the runners shell
# - name: Run a multi-line script
Expand All @@ -126,51 +124,50 @@ jobs:
build-linux-desktop-simulator:
runs-on: ubuntu-latest
env:
buildDir: '${{ github.workspace }}/build'
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
# 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: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ _deps
build/
out/
build_simulator/

Firmware/build_firmware
#ignore vs temp folders
.vs/
.vs/
#Ignore kicad backups
*.sch-bak
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@
[submodule "Schematic/KiCadLibrariesRoot"]
path = Schematic/KiCadLibrariesRoot
url = https://github.com/ValentiWorkLearning/KiCadLibrariesRoot.git
[submodule "Firmware/3rdparty/littlefs_lib/littlefs"]
path = Firmware/3rdparty/littlefs_lib/littlefs
url = https://github.com/ValentiWorkLearning/littlefs.git
9 changes: 5 additions & 4 deletions Firmware/3rdparty/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ if( ${TARGET_PLATFORM} STREQUAL "FIRMWARE_SIMULATOR" )
set(CMAKE_CXX_STANDARD 20)
#add_subdirectory( cppcoro_lib )
elseif( ${TARGET_PLATFORM} STREQUAL "ARM_CORTEX" )
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD 20)
endif()
set(CMAKE_CXX_STANDARD_REQUIRED ON)

set( 3RD_PARTY_DIR CACHE STRING ${CMAKE_CURRENT_SOURCE_DIR} )# Libs root path
add_subdirectory( etl )
add_subdirectory( fmt )
add_subdirectory(etl)
add_subdirectory(fmt)
add_subdirectory(littlefs_lib)

target_compile_definitions(fmt
PUBLIC
Expand All @@ -20,4 +21,4 @@ target_compile_definitions(fmt
FMT_USE_DOUBLE=0
FMT_USE_LONG_DOUBLE=0
FMT_REDUCE_INT_INSTANTIATIONS=0
)
)
43 changes: 43 additions & 0 deletions Firmware/3rdparty/littlefs_lib/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
cmake_minimum_required(VERSION 3.14)

add_library(littlefs)

target_sources(littlefs PRIVATE
littlefs/lfs.cpp
littlefs/lfs_util.cpp
"lfs_util_desktop.h")

target_include_directories(littlefs PUBLIC littlefs
)

target_link_libraries(littlefs PUBLIC UtilsLibrary )

target_compile_definitions(littlefs PUBLIC LFS_YES_TRACE )

target_link_options(
littlefs
PUBLIC
${CPU_FLAGS}
)

target_compile_options(
littlefs
PUBLIC
${COMMON_FLAGS}
)

target_compile_options(
littlefs
PUBLIC
$<$<CXX_COMPILER_ID:GNU>:-Os>
)

target_include_directories(littlefs PUBLIC ${CMAKE_CURRENT_LIST_DIR})

if( ${TARGET_PLATFORM} STREQUAL "ARM_CORTEX" )
target_precompile_headers(littlefs PRIVATE ${CMAKE_CURRENT_LIST_DIR}/lfs_util_segger.h)
target_link_libraries(littlefs PRIVATE NordicSDK::Common)
elseif( ${TARGET_PLATFORM} STREQUAL "FIRMWARE_SIMULATOR")
target_precompile_headers(littlefs PRIVATE ${CMAKE_CURRENT_LIST_DIR}/lfs_util_desktop.h)
target_link_libraries(littlefs PUBLIC logger_service)
endif()
Loading