Skip to content

Commit

Permalink
Merge pull request #19 from SiliconLabs/gen-firmware-on-host-runner
Browse files Browse the repository at this point in the history
Add workflow generate firmware on gihub host runner
  • Loading branch information
silabs-bingocth authored Oct 9, 2024
2 parents c8a2f38 + 419926e commit 0bc4033
Show file tree
Hide file tree
Showing 2,559 changed files with 1,652,885 additions and 1 deletion.
163 changes: 163 additions & 0 deletions .github/workflows/generate_firmware.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
name: Generate Firmware
on:
push:
branches:
- '*' # matches every branch that doesn't contain a '/'
- '*/*' # matches every branch containing a single '/'
- '**' # matches every branch

env:
AM_CORRETTO_17: https://corretto.aws/downloads/latest/amazon-corretto-17-x64-linux-jdk.tar.gz
SLC_CLI_URL: https://www.silabs.com/documents/login/software/slc_cli_linux.zip
COMMANDER_URL: https://www.silabs.com/documents/login/software/SimplicityCommander-Linux.zip
GCC_URL: https://developer.arm.com/-/media/Files/downloads/gnu/12.2.rel1/binrel/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi.tar.xz
SIM_REPO: https://github.com/SiliconLabs/simplicity_sdk.git
GECKO_SDK_REPO: https://github.com/SiliconLabs/gecko_sdk.git
SDK_VER: v4.4.2
JLINK_SEGGER_URL: https://www.segger.com/downloads/jlink/JLink_Linux_x86_64.tgz
TOOL_DIRS: /home/sqa/SimplicityStudio-5/SimplicityStudio_v5/developer/toolchains/gnu_arm/10.3_2021.10/bin
SDK_PATH: /home/sqa/SimplicityStudio/SDKs/gecko_sdk
TOOL_CHAINS: GCC
START_ADDR_FLASH: 0x8000000
BOARD_NAME: brd4187c
TASK: gen-only
jobs:
job1:
name: Generate Firmware
runs-on: ubuntu-20.04
permissions:
contents: read
pull-requests: write
env:
HOST_IP: 192.168.1.69
COMPILER: GCC
PLATFORM: MG12
APP_TYPE: SecureApp
SECURITY: APP_SECURE=false
COMMAND: all
COMPONENT: all
ADAPTER_SN: 440133193
OPTION_INTEGRATION_TEST: -DENABLE_CAL_CRC_32=ON -DENABLE_CRC_USE_SW=ON -DTEST_SECURE_PERIPHERALS_ENABLE=ON -DINTEGRATION_TEST_WDOG1_ENABLE=ON - INTEGRATION_TEST_USE_MARCHX_DISABLE=ON
steps:
- name: Checkout
uses: actions/[email protected]
with:
ref: create-unit-test-functions-in-lib-iec60730
- name: Install Simplicity SDK
if: always()
run: |
git clone $SIM_REPO
cd simplicity_sdk
ls -la
cd ..
ls -la
- name: Install Gecko SDK
if: always()
run: |
git clone $GECKO_SDK_REPO gecko_sdk_$SDK_VER
cd gecko_sdk_$SDK_VER
git checkout tags/$SDK_VER
ls -la
mkdir extension
cd extension
git clone https://github.com/SiliconLabs/IEC60730_Libs.git
cd IEC60730_Libs
git checkout create-unit-test-functions-in-lib-iec60730
ls -la
cd ..
ls -la
cd ..
ls -la
- name: Install Amazon Corretto 17
if: always()
run: |
wget $AM_CORRETTO_17
tar -xzf amazon-corretto-17-x64-linux-jdk.tar.gz
ls -la
- name: Install SLC CLI
if: always()
run: |
wget $SLC_CLI_URL
unzip slc_cli_linux.zip
ls -la
- name: Install Simplicity Commander
if: always()
run: |
wget $COMMANDER_URL
unzip SimplicityCommander-Linux.zip
cd SimplicityCommander-Linux
ls -la
cd ..
mkdir commander
tar -xf SimplicityCommander-Linux/Commander_linux_x86_64_*.tar.bz commander
cd commander
ls -la
- name: Install GCC
if: always()
run: |
wget $GCC_URL
tar -xf arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi.tar.xz
ls -la
cd arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi
ls -la
- name: Install Ninja build
run: |
sudo apt update
sudo apt -y install ninja-build
ninja --version
- name: Install python3.11
if: always()
run: |
sudo apt update
sudo apt upgrade
sudo add-apt-repository ppa:deadsnakes/ppa -y
sudo apt update
sudo apt install python3.11
python3.11 --version
which python3.11
cat ~/.bashrc
echo "alias python3=python3.11" >> ~/.bashrc
echo "alias python3=python3.11" >> ~/.bash_profile
cat ~/.bashrc
source ~/.bash_profile
source ~/.bashrc
python3 --version
sudo apt install python3.11-full
sudo apt install python3-pip
- name: Generate image
run: |
export PATH=$PATH:$PWD/commander
export PATH=$PATH:$PWD/slc_cli
export JLINK_PATH=/opt/SEGGER/JLink/libjlinkarm.so
export TOOL_DIRS=$PWD/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin
export PATH=$PATH:/usr/bin/
export SDK_PATH=$PWD/gecko_sdk_$SDK_VER
export PATH=$PATH:$PWD/amazon-corretto-17.0.12.7.1-linux-x64/bin
echo $PATH
echo 2 | sudo update-alternatives --config java
java --version
slc --version
slc configuration --sdk=${SDK_PATH}
ninja --version
slc signature trust --sdk $SDK_PATH
slc configuration -gcc=$TOOL_DIRS
make prepare
cd build
slc signature trust -extpath $SDK_PATH/extension/IEC60730_Libs
cmake --toolchain ../cmake/toolchain.cmake .. -DENABLE_INTEGRATION_TESTING=ON -DBOARD_NAME=$BOARD_NAME
cmake --build . --target integration_test_info -j4
export CHIP=EFR32MG24BXXXF1536 ADAPTER_SN=440133193
export LST_PATH=$PWD/test/integration_test/build/brd4187c/integration_test_iec60730_watchdog/S
export JLINK_PATH=/opt/SEGGER/JLink/libjlinkarm.so
export HOST_IP=192.168.1.69
bash execute_test.sh $BOARD_NAME $TASK $COMPONENT $ADAPTER_SN $GCC $OPTION_INTEGRATION_TEST
- name: Upload firmware
uses: actions/[email protected]
with:
name: firmware
path: ${{ github.workspace }}/build/test/integration_test/build/${{ env.BOARD_NAME }}/integration_test_iec60730_invariable_memory/NS/
warn: Output a warning but do not fail the action
retention-days: 90



2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ doc/html/EFR32_ICE60730_Libraries/latex
gecko_sdk/src/*
!gecko_sdk/src/CMakeLists.txt
cmake_build
log/
log/
Binary file not shown.
Binary file not shown.
Binary file added Doc/html/EFR32 ICE60730 Libraries.7z
Binary file not shown.
Binary file added Doc/images/BIST_flowchart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Doc/images/BIST_system_clock_frequency.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Doc/images/Watchdog_flowchart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Doc/images/comm_plausibility_check.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Doc/images/cpu_registers_check_flowchart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Doc/images/irq_plausibility_test_flowchart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Doc/images/post_flowchart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Doc/images/programme_counter_check.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 58 additions & 0 deletions Lib/CMSIS/Core/Template/ARMv8-M/main_s.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/******************************************************************************
* @file main_s.c
* @brief Code template for secure main function
* @version V1.1.1
* @date 10. January 2018
******************************************************************************/
/*
* Copyright (c) 2013-2018 Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
* 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
*
* 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.
*/

/* Use CMSE intrinsics */
#include <arm_cmse.h>

#include "RTE_Components.h"
#include CMSIS_device_header

/* TZ_START_NS: Start address of non-secure application */
#ifndef TZ_START_NS
#define TZ_START_NS (0x200000U)
#endif

/* typedef for non-secure callback functions */
typedef void (*funcptr_void) (void) __attribute__((cmse_nonsecure_call));

/* Secure main() */
int main(void) {
funcptr_void NonSecure_ResetHandler;

/* Add user setup code for secure part here*/

/* Set non-secure main stack (MSP_NS) */
__TZ_set_MSP_NS(*((uint32_t *)(TZ_START_NS)));

/* Get non-secure reset handler */
NonSecure_ResetHandler = (funcptr_void)(*((uint32_t *)((TZ_START_NS) + 4U)));

/* Start non-secure state software application */
NonSecure_ResetHandler();

/* Non-secure software does not return, this code is not executed */
while (1) {
__NOP();
}
}
Loading

0 comments on commit 0bc4033

Please sign in to comment.