Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restructure repository #26

Merged
merged 22 commits into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
902a311
middleware: Restructure external projects integration
hugueskamba Oct 6, 2023
744be23
cmake: Provide components and BSP as part of the FRI
hugueskamba Oct 9, 2023
60ad761
apps: Do not share configuration files
hugueskamba Oct 9, 2023
679d8e4
blinky: Improve CMake support
hugueskamba Oct 9, 2023
7a0a8a4
apps: Improve Provisioning Python script
hugueskamba Oct 27, 2023
d86d2ef
aws-iot-example: Improve CMake support and organisation
hugueskamba Oct 9, 2023
184d443
aws-iot-example: Add FreeRTOS libs integration test app
hugueskamba Oct 10, 2023
5405540
run-script: Fix root path and wrap long string
hugueskamba Oct 9, 2023
dcd67f8
provisioning: Make provisioning available to all apps that need it
hugueskamba Oct 27, 2023
9b710c4
bsp: Rename `Bsp` subdir to `bsp`
hugueskamba Nov 3, 2023
0a20b2d
bsp: Rename CMake script
hugueskamba Nov 3, 2023
21551c5
docs: Rename `Docs` subdir following snake_case
hugueskamba Nov 3, 2023
3bb23ed
apps: Rename `Projects` subdir to `applications`
hugueskamba Nov 3, 2023
0c35e8f
tools: Rename `Tools` subdir following snake_case
hugueskamba Nov 3, 2023
470fe5f
provisioning: Rename CMake script
hugueskamba Nov 3, 2023
aa281af
aws-iot-example: Rename files and subdirs following snake_case
hugueskamba Nov 3, 2023
cb3753c
blinky: Rename files and subdirs following snake_case
hugueskamba Nov 3, 2023
a09931e
docs: Add subdirectory description to README
hugueskamba Nov 3, 2023
c506f6b
ci: Move tools to `tools` subdir
hugueskamba Nov 6, 2023
18764e9
tests: Move conftest.py to `tools/tests/`
hugueskamba Nov 6, 2023
4856cbf
docs: Add project organisation document
hugueskamba Dec 11, 2023
ec6bdd7
ci: Add known words to spellchecker
hugueskamba Dec 11, 2023
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
4 changes: 4 additions & 0 deletions .github/.cSpellWords.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ CMAC
cmsis
CMSIS
CMSIS's
coremqtt
COSE
CSRS
Customisation
DCMAKE
DCONFIG
demultiplexing
dgst
Expand Down Expand Up @@ -58,7 +60,9 @@ mcuboot
MCUBOOT
mbed
Mbed
mbedcrypto
MBEDTLSSL
mbedx509
Merkle
MFLN
mqtt
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,20 +49,20 @@ jobs:
export IOT_OTA_CLIENT_CERT="dummy_certificate"
export IOT_OTA_CLIENT_PRIV="dummy_priv_key"
export IOT_OTA_CLIENT_PUB="dummy_pub_key"
./ci/generate_credentials.sh -f -p Config/aws_configs
./tools/ci/generate_credentials.sh -f -p applications/aws_iot_example/configs/aws_configs
git config --global user.email "[email protected]"
git config --global user.name "ci"
- name: Build the project
shell: bash
run: |
./Tools/scripts/build.sh aws-iot-example --toolchain GNU --certificate_path $PWD/certificate.pem --private_key_path $PWD/private_key.pem
./tools/scripts/build.sh aws-iot-example --toolchain GNU --certificate_path $PWD/certificate.pem --private_key_path $PWD/private_key.pem
- name: Copy artifacts
shell: bash
run: |
tar -czf gnu_build.tar.gz \
build/Projects/aws-iot-example/aws-iot-example_merged.elf \
build/Projects/aws-iot-example/aws-iot-example-update_signed.bin \
build/Projects/aws-iot-example/update-signature.txt
build/aws-iot-example_merged.elf \
build/aws-iot-example-update_signed.bin \
build/update-signature.txt
- name: Upload Build Artifacts
uses: actions/upload-artifact@v3
with:
Expand Down
52 changes: 28 additions & 24 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ default:
image: ${OPEN_IOT_SDK_DOCKER_REGISTRY}/open-iot-sdk:${OPEN_IOT_SDK_DOCKER_VERSION}

include:
local: '$PWD/ci/pipeline-baseline-fri.yml'
local: '$PWD/tools/ci/pipeline-baseline-fri.yml'

variables:
OPEN_IOT_SDK_DOCKER_VERSION: v1
Expand Down Expand Up @@ -72,20 +72,21 @@ build-applications:
stage: build
extends: .base_job
script:
- ./ci/generate_credentials.sh -f -p Config/aws_configs
- export APP_UNDERSCORED=$(echo ${APP} | tr '-' '_')
- ./tools/ci/generate_credentials.sh -f -p applications/${APP_UNDERSCORED}/configs/aws_configs
- git config --global user.email "[email protected]"
- git config --global user.name "ci"
- ./Tools/scripts/build.sh ${APP} --target $TARGET --toolchain $TOOLCHAIN --certificate_path $PWD/certificate.pem --private_key_path $PWD/private_key.pem
- ./tools/scripts/build.sh ${APP} --target $TARGET --toolchain $TOOLCHAIN --certificate_path $PWD/certificate.pem --private_key_path $PWD/private_key.pem
- |
if [ $APP == "aws-iot-example" ];then
tar -czf ${TARGET}_${APP}_${TOOLCHAIN}_build.tar.gz \
build/Projects/${APP}/${APP}_merged.elf \
build/Projects/${APP}/${APP}-update_signed.bin \
build/Projects/${APP}/update-signature.txt \
Config/aws_configs
build/${APP}_merged.elf \
build/${APP}-update_signed.bin \
build/update-signature.txt \
applications/${APP_UNDERSCORED}/configs/aws_configs
else
tar -czf ${TARGET}_${APP}_${TOOLCHAIN}_build.tar.gz \
build/Projects/${APP}/${APP}_merged.elf
build/${APP}_merged.elf
fi
parallel:
matrix:
Expand All @@ -101,14 +102,15 @@ test-applications-output:
extends: .test_job
script:
- tar xf ${TARGET}_${APP}_${TOOLCHAIN}_build.tar.gz
- export APP_UNDERSCORED=$(echo ${APP} | tr '-' '_')
- |
pytest -s Tools/tests/test_application_output.py \
--build-artefacts-path "build/Projects/${APP}" \
pytest -s tools/tests/test_application_output.py \
--build-artefacts-path "build" \
--fvp $FVP_BIN \
--merged-elf-name "${APP}_merged.elf" \
--timeout-seconds 600 \
--pass-output-file "Projects/${APP}/tests/pass_output.log" \
--fail-output-file "Projects/${APP}/tests/fail_output.log"
--pass-output-file "applications/${APP_UNDERSCORED}/tests/pass_output.log" \
--fail-output-file "applications/${APP_UNDERSCORED}/tests/fail_output.log"
parallel:
matrix:
-
Expand All @@ -119,16 +121,17 @@ test-ota:
extends: .test_job
script:
- tar xf ${TARGET}_${APP}_${TOOLCHAIN}_build.tar.gz
- export APP_UNDERSCORED=$(echo ${APP} | tr '-' '_')
- |
pytest -s Tools/tests/test_ota.py \
--build-artefacts-path "build/Projects/${APP}" \
pytest -s tools/tests/test_ota.py \
--build-artefacts-path "build" \
--fvp $FVP_BIN \
--credentials-path "Config/aws_configs" \
--credentials-path "applications/${APP_UNDERSCORED}/configs/aws_configs" \
--merged-elf-name "${APP}_merged.elf" \
--signed-update-bin-name "${APP}-update_signed.bin" \
--timeout-seconds 900 \
--pass-output-file "Projects/${APP}/tests/pass_output.log" \
--fail-output-file "Projects/${APP}/tests/fail_output.log"
--pass-output-file "applications/${APP_UNDERSCORED}/tests/pass_output.log" \
--fail-output-file "applications/${APP_UNDERSCORED}/tests/fail_output.log"
parallel:
matrix:
-
Expand All @@ -142,19 +145,20 @@ integration-tests:
rules:
- if: ( $SCHEDULED_JOB_TO_RUN == "integration-tests" )
script:
- ./ci/generate_credentials.sh -f -p Config/aws_configs
- export APP_UNDERSCORED=$(echo ${APP} | tr '-' '_')
- ./tools/ci/generate_credentials.sh -f -p applications/${APP_UNDERSCORED}/configs/aws_configs
- git config --global user.email "[email protected]"
- git config --global user.name "ci"
- ./Tools/scripts/build.sh -q ${APP}
- pushd Middleware/FreeRTOS/FreeRTOS-Libraries-Integration-Tests/tools/echo_server
- ./tools/scripts/build.sh -q ${APP}
- pushd components/tools/freertos_libraries_integration_tests/library/tools/echo_server
- go run echo_server.go&
- popd
- sleep 1
- |
pytest -s Tools/tests/test_integration.py \
--build-artefacts-path "build/Projects/${APP}" \
pytest -s tools/tests/test_integration.py \
--build-artefacts-path "build" \
--fvp $FVP_BIN \
--credentials-path "Config/aws_configs" \
--credentials-path "applications/${APP_UNDERSCORED}/configs/aws_configs" \
--merged-elf-name "${APP}-tests_merged.elf" \
--signed-update-bin-name "${APP}-tests-update_signed.bin"
parallel:
Expand All @@ -172,4 +176,4 @@ aws-cleanup:
rules:
- if: $SCHEDULED_JOB_TO_RUN == "cleanup"
script:
- python -u ./ci/aws_cleanup.py
- python -u ./tools/ci/aws_cleanup.py
102 changes: 51 additions & 51 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,57 +1,57 @@
[submodule "Middleware/FreeRTOS/kernel"]
path = Middleware/FreeRTOS/kernel
url = https://github.com/FreeRTOS/FreeRTOS-Kernel.git
[submodule "Middleware/FreeRTOS/FreeRTOS-Libraries-Integration-Tests"]
path = Middleware/FreeRTOS/FreeRTOS-Libraries-Integration-Tests
url = https://github.com/FreeRTOS/FreeRTOS-Libraries-Integration-Tests.git
[submodule "Middleware/ARM/TF-M/trusted-firmware-m"]
path = Middleware/ARM/TF-M/trusted-firmware-m
url = https://git.trustedfirmware.org/TF-M/trusted-firmware-m.git
[submodule "toolchains"]
path = toolchains
url = https://git.gitlab.arm.com/iot/open-iot-sdk/toolchain.git
[submodule "Bsp/arm-corstone-platform-bsp"]
path = Bsp/arm-corstone-platform-bsp
[submodule "arm_corstone_platform_bsp"]
path = bsp/library
url = https://git.gitlab.arm.com/iot/open-iot-sdk/arm-corstone-platform-bsp.git
[submodule "Middleware/ARM/mbedtls-lib/mbedtls"]
path = Middleware/ARM/mbedtls-lib/mbedtls
url = https://github.com/Mbed-TLS/mbedtls.git
[submodule "Middleware/ARM/IoT_Socket-lib/IoT_Socket"]
path = Middleware/ARM/IoT_Socket-lib/IoT_Socket
[submodule "backoff_algorithm"]
path = components/connectivity/backoff_algorithm/library
url = https://github.com/FreeRTOS/backoffAlgorithm.git
[submodule "corejson"]
path = components/aws_iot/corejson/library
url = https://github.com/FreeRTOS/coreJSON.git
[submodule "coremqtt"]
path = components/aws_iot/coremqtt/library
url = https://github.com/FreeRTOS/coreMQTT.git
[submodule "coremqtt_agent"]
path = components/aws_iot/coremqtt_agent/library
url = https://github.com/FreeRTOS/coreMQTT-Agent.git
[submodule "corepkcs11"]
path = components/aws_iot/corepkcs11/library
url = https://github.com/FreeRTOS/corePKCS11.git
[submodule "iot_socket"]
path = components/connectivity/iot_socket/library
url = https://github.com/MDK-Packs/IoT_Socket.git
[submodule "Middleware/ARM/IoT_VSocket-lib/AVH"]
path = Middleware/ARM/IoT_VSocket-lib/AVH
[submodule "iot_vsocket"]
path = components/connectivity/iot_vsocket/library
url = https://github.com/ARM-software/AVH.git
[submodule "Middleware/ARM/freertos-pkcs11-psa-lib/freertos-pkcs11-psa"]
path = Middleware/ARM/freertos-pkcs11-psa-lib/freertos-pkcs11-psa
url = https://github.com/Linaro/freertos-pkcs11-psa.git
[submodule "Middleware/ARM/freertos-ota-pal-psa-lib/freertos-ota-pal-psa"]
path = Middleware/ARM/freertos-ota-pal-psa-lib/freertos-ota-pal-psa
[submodule "freertos_kernel"]
path = components/freertos_kernel/library
url = https://github.com/FreeRTOS/FreeRTOS-Kernel.git
[submodule "freertos_libraries_integration_tests"]
path = components/tools/freertos_libraries_integration_tests/library
url = https://github.com/FreeRTOS/FreeRTOS-Libraries-Integration-Tests.git
[submodule "freertos_ota_pal_psa"]
path = components/security/freertos_ota_pal_psa/library
url = https://github.com/Linaro/freertos-ota-pal-psa.git
[submodule "Middleware/AWS/coreMQTT-Agent"]
path = Middleware/AWS/coreMQTT-Agent
url = https://github.com/FreeRTOS/coreMQTT-Agent
[submodule "Middleware/AWS/coreMQTT"]
path = Middleware/AWS/coreMQTT
url = https://github.com/FreeRTOS/coreMQTT.git
[submodule "Middleware/AWS/coreJSON"]
path = Middleware/AWS/coreJSON
url = https://github.com/FreeRTOS/coreJSON.git
[submodule "Middleware/AWS/corePKCS11"]
path = Middleware/AWS/corePKCS11
url = https://github.com/FreeRTOS/corePKCS11.git
[submodule "Middleware/AWS/backoffAlgorithm"]
path = Middleware/AWS/backoffAlgorithm
url = https://github.com/FreeRTOS/backoffAlgorithm.git
[submodule "Middleware/AWS/ota-for-aws-iot-embedded-sdk"]
path = Middleware/AWS/ota-for-aws-iot-embedded-sdk
[submodule "freertos_plus_tcp"]
path = components/connectivity/freertos_plus_tcp/library
url = https://github.com/FreeRTOS/FreeRTOS-Plus-TCP.git
[submodule "freertos_pkcs11_psa"]
path = components/security/freertos_pkcs11_psa/library
url = https://github.com/Linaro/freertos-pkcs11-psa.git
[submodule "mbedtls"]
path = components/security/mbedtls/library
url = https://github.com/Mbed-TLS/mbedtls.git
[submodule "open_iot_sdk_toolchain"]
path = components/tools/open_iot_sdk_toolchain/library
url = https://git.gitlab.arm.com/iot/open-iot-sdk/toolchain.git
[submodule "ota_for_aws_iot_embedded_sdk"]
path = components/aws_iot/ota_for_aws_iot_embedded_sdk/library
url = https://github.com/aws/ota-for-aws-iot-embedded-sdk.git
[submodule "Middleware/AWS/tinycbor"]
path = Middleware/AWS/tinycbor
url = https://github.com/intel/tinycbor
[submodule "Middleware/Unity"]
path = Middleware/Unity
[submodule "tinycbor"]
path = components/aws_iot/tinycbor/library
url = https://github.com/intel/tinycbor.git
[submodule "trusted_firmware-m"]
path = components/security/trusted_firmware-m/library
url = https://git.trustedfirmware.org/TF-M/trusted-firmware-m.git
[submodule "unity"]
path = components/tools/unity/library
url = https://github.com/ThrowTheSwitch/Unity.git
[submodule "Middleware/FreeRTOS/FreeRTOS-Plus-TCP-lib/FreeRTOS-Plus-TCP"]
path = Middleware/FreeRTOS/FreeRTOS-Plus-TCP-lib/FreeRTOS-Plus-TCP
url = https://github.com/FreeRTOS/FreeRTOS-Plus-TCP.git
32 changes: 18 additions & 14 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,21 @@
exclude: >
.patch|
(?x)^(
Bsp/arm-corstone-platform-bsp/|
Middleware/ARM/freertos-ota-pal-psa-lib/freertos-ota-pal-psa/|
Middleware/ARM/freertos-pkcs11-psa-lib/freertos-pkcs11-psa/|
Middleware/ARM/IoT_Socket-lib/IoT_Socket/|
Middleware/ARM/IoT_VSocket-lib/AVH/|
Middleware/ARM/IoT_VSocket-lib/transport_interface_api.h|
Middleware/ARM/mbedtls-lib/|
Middleware/ARM/TF-M/trusted-firmware-m/|
Middleware/AWS/|
Middleware/FreeRTOS/|
Middleware/Unity/
bsp/library/|
components/security/freertos_ota_pal_psa/library/|
components/security/freertos-pkcs11-psa/library/|
components/connectivity/iot_socket/library/|
components/connectivity/iot_vsocket/library/|
components/connectivity/iot_vsocket/integration/inc/transport_interface_api.h|
components/security/mbedtls/|
components/security/trusted_firmware-m/library/|
components/aws_iot/|
components/connectivity/backoff_algorithm/|
applications/helpers/logging/|
components/freertos_kernel/|
components/connectivity/freertos_plus_tcp/|
components/tools/freertos_libraries_integration_tests/|
components/tools/unity/
)

repos:
Expand All @@ -33,7 +37,7 @@ repos:
hooks:
- id: gitlint
args:
- "--config ci/gitlint/.gitlint"
- "--config tools/ci/gitlint/.gitlint"
- repo: https://github.com/psf/black
rev: 23.10.1
hooks:
Expand Down Expand Up @@ -76,7 +80,7 @@ repos:
name: uncrustify
description: Run 'uncrustify' C/C++ code formatter
language: script
entry: Tools/scripts/run_uncrustify.sh
entry: tools/scripts/run_uncrustify.sh
require_serial: true
- repo: local
hooks:
Expand All @@ -92,5 +96,5 @@ repos:
name: dependencies-check
description: Checks listed dependencies in manifest.yml
language: script
entry: Tools/scripts/run_dependencies_check.sh
entry: tools/scripts/run_dependencies_check.sh
require_serial: true
41 changes: 0 additions & 41 deletions Bsp/CMakeLists.txt

This file was deleted.

17 changes: 5 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,11 @@
# <[email protected]>
# SPDX-License-Identifier: MIT

cmake_minimum_required(VERSION 3.21)
cmake_minimum_required(VERSION 3.21.0 FATAL_ERROR)

project(arm-featured-reference-integration)
project(iot-reference-arm-corstone3xx LANGUAGES C ASM)

# Declare root and other build paths
set(PRJ_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/tools/cmake)

# Add examples targets
if(EXAMPLE STREQUAL "blinky")
add_subdirectory(Projects/blinky)
endif()

if(EXAMPLE STREQUAL "aws-iot-example")
add_subdirectory(Projects/aws-iot-example)
endif()
add_subdirectory(bsp)
add_subdirectory(components EXCLUDE_FROM_ALL)
Loading