-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
341e56a
commit 78aa4b8
Showing
166 changed files
with
173,483 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Continuous Integration (CI) Test for Board Support Pack (BSP) | ||
|
||
Content of `.ci` Directory | Description | ||
:----------------------------|:----------------- | ||
`vcpkg-configuration.json` | Tool setup for the CI test | ||
|
||
The [GitHub Actions](https://github.com/Open-CMSIS-Pack/ST_NUCLEO-WL55JC_BSP/tree/main/README.md#github-actions) in the directory [`.github/workflows`](https://github.com/Open-CMSIS-Pack/ST_NUCLEO-WL55JC_BSP/tree/main/.github/workflows) are the scripts for the CI tests. These scripts contain detailed comments about each step that is executed. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"registries": [ | ||
{ | ||
"name": "arm", | ||
"kind": "artifact", | ||
"location": "https://artifacts.tools.arm.com/vcpkg-registry" | ||
} | ||
], | ||
"requires": { | ||
"arm:tools/open-cmsis-pack/cmsis-toolbox": "^2.6.0", | ||
"arm:tools/arm/mdk-toolbox":" ^1.0.0", | ||
"arm:tools/kitware/cmake": "^3.28.4", | ||
"arm:tools/ninja-build/ninja": "^1.12.0", | ||
"arm:compilers/arm/armclang": "^6.22.0", | ||
"arm:compilers/arm/arm-none-eabi-gcc": "^13.3.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
name: Test-Examples # BSP Examples | ||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: [main] | ||
push: | ||
branches: [main] | ||
schedule: | ||
- cron: '00 20 * * 6' | ||
|
||
jobs: | ||
Test-Examples: # Install tools, build | ||
strategy: | ||
fail-fast: false | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout .ci folder | ||
uses: actions/checkout@v4 | ||
with: | ||
sparse-checkout: | | ||
.ci | ||
- name: Install tools | ||
uses: ARM-software/cmsis-actions/vcpkg@v1 | ||
with: | ||
config: "./.ci/vcpkg-configuration.json" | ||
|
||
- name: Activate Arm tool license | ||
uses: ARM-software/cmsis-actions/armlm@v1 | ||
|
||
- name: Checkout current repository | ||
uses: actions/checkout@v4 | ||
with: | ||
path: ./BSP | ||
|
||
- name: Checkout STM32WLxx_DFP | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: Open-CMSIS-Pack/STM32WLxx_DFP | ||
path: ./DFP | ||
|
||
- name: Checkout CMSIS-Driver_STM32 | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: Open-CMSIS-Pack/CMSIS-Driver_STM32 | ||
path: ./Drivers | ||
|
||
- name: Initialize CMSIS pack root folder | ||
run: | | ||
cpackget init https://www.keil.com/pack/index.pidx | ||
cpackget update-index | ||
- name: Add local CMSIS packs | ||
run: | | ||
cpackget add ./BSP/Keil.NUCLEO-WL55JC_BSP.pdsc | ||
cpackget add ./DFP/Keil.STM32WLxx_DFP.pdsc | ||
cpackget add ./Drivers/ARM.CMSIS-Driver_STM32.pdsc | ||
- name: Copy Blinky example to CI/Examples/ folder | ||
working-directory: ./ | ||
run: | | ||
mkdir -p ./CI/Examples/Blinky | ||
cp -rf ./BSP/Examples/Blinky/* ./CI/Examples/Blinky/ | ||
- name: Build Blinky AC6 | ||
if: always() | ||
working-directory: ./CI/Examples/Blinky | ||
run: | | ||
cbuild ./Blinky.csolution.yml --packs --update-rte --packs --toolchain AC6 --rebuild | ||
- name: Upload Artifact of the Blinky AC6 build | ||
if: always() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: Blinky_AC6 | ||
path: | | ||
./CI/Examples/Blinky/ | ||
!./CI/Examples/Blinky/tmp/ | ||
retention-days: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Build pack | ||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
push: | ||
branches: [main] | ||
release: | ||
types: [published] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
pack: | ||
name: Generate pack | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Fetch tags | ||
if: github.event_name == 'release' | ||
run: | | ||
git fetch --tags --force | ||
- uses: Open-CMSIS-Pack/gen-pack-action@main | ||
with: | ||
doxygen-version: none | ||
packchk-version: 1.4.1 | ||
gen-pack-script: ./gen_pack.sh | ||
gen-pack-output: ./output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Pack build files | ||
/build/ | ||
/output/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,235 @@ | ||
/****************************************************************************** | ||
* @file vio_NUCLEO-WL55JC.c | ||
* @brief Virtual I/O implementation for board NUCLEO-WL55JC | ||
* @version V1.0.0 | ||
* @date 21. October 2024 | ||
******************************************************************************/ | ||
/* | ||
* Copyright (c) 2024 Arm Limited (or its affiliates). | ||
* 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. | ||
*/ | ||
|
||
/*! \page vio_NUCLEO-WL55JC Physical I/O Mapping | ||
The table below lists the physical I/O mapping of this CMSIS-Driver VIO implementation. | ||
| Virtual I/O | Variable | Board component | Pin | ||
|:--------------|:---------------|:---------------------|:------ | ||
| vioBUTTON0 | vioSignalIn.0 | USER button (B1) | PA0 | ||
| vioLED0 | vioSignalOut.0 | LED red (LED3) | PB11 | ||
| vioLED1 | vioSignalOut.1 | LED green (LED2) | PB9 | ||
| vioLED2 | vioSignalOut.2 | LED blue (LED1) | PB15 | ||
*/ | ||
|
||
#include "cmsis_vio.h" | ||
|
||
#include "RTE_Components.h" // Component selection | ||
#include CMSIS_device_header | ||
|
||
#if !defined CMSIS_VOUT || !defined CMSIS_VIN | ||
#include "GPIO_STM32.h" | ||
#endif | ||
|
||
// VIO input, output definitions | ||
#ifndef VIO_VALUE_NUM | ||
#define VIO_VALUE_NUM 5U // Number of values | ||
#endif | ||
|
||
// VIO input, output variables | ||
static uint32_t vioSignalIn __USED; // Memory for incoming signal | ||
static uint32_t vioSignalOut __USED; // Memory for outgoing signal | ||
static int32_t vioValue[VIO_VALUE_NUM] __USED; // Memory for value used in vioGetValue/vioSetValue | ||
|
||
#if !defined CMSIS_VOUT || !defined CMSIS_VIN | ||
|
||
// VIO Active State | ||
#define VIO_ACTIVE_LOW 0U | ||
#define VIO_ACTIVE_HIGH 1U | ||
|
||
typedef struct { | ||
uint32_t vioSignal; | ||
uint16_t pin; | ||
uint8_t pullResistor; | ||
uint8_t activeState; | ||
} pinCfg_t; | ||
|
||
#if !defined CMSIS_VOUT | ||
// VOUT Configuration | ||
static const pinCfg_t outputCfg[] = { | ||
// signal, pin, pull resistor, active state | ||
{ vioLED0, GPIO_PIN_ID_PORTB(11), ARM_GPIO_PULL_NONE, VIO_ACTIVE_HIGH }, | ||
{ vioLED1, GPIO_PIN_ID_PORTB(9), ARM_GPIO_PULL_NONE, VIO_ACTIVE_HIGH }, | ||
{ vioLED2, GPIO_PIN_ID_PORTB(15), ARM_GPIO_PULL_NONE, VIO_ACTIVE_HIGH } | ||
}; | ||
#endif | ||
|
||
#if !defined CMSIS_VIN | ||
// VIN Configuration | ||
static const pinCfg_t inputCfg[] = { | ||
// signal, pin, pull resistor, active state | ||
{ vioBUTTON0, GPIO_PIN_ID_PORTA(0), ARM_GPIO_PULL_UP, VIO_ACTIVE_LOW } | ||
}; | ||
#endif | ||
|
||
// External GPIO Driver | ||
extern ARM_DRIVER_GPIO Driver_GPIO0; | ||
static ARM_DRIVER_GPIO *pGPIODrv = &Driver_GPIO0; | ||
#endif | ||
|
||
// Initialize test input, output. | ||
void vioInit (void) { | ||
uint32_t n; | ||
#if !defined(CMSIS_VOUT) || !defined(CMSIS_VIN) | ||
ARM_GPIO_Pin_t pin; | ||
#endif | ||
|
||
vioSignalIn = 0U; | ||
vioSignalOut = 0U; | ||
|
||
for (n = 0U; n < VIO_VALUE_NUM; n++) { | ||
vioValue[n] = 0U; | ||
} | ||
|
||
#if !defined CMSIS_VOUT | ||
for (n = 0U; n < (sizeof(outputCfg) / sizeof(pinCfg_t)); n++) { | ||
pin = (ARM_GPIO_Pin_t)outputCfg[n].pin; | ||
pGPIODrv->Setup(pin, NULL); | ||
pGPIODrv->SetOutputMode(pin, ARM_GPIO_PUSH_PULL); | ||
pGPIODrv->SetPullResistor(pin, outputCfg[n].pullResistor); | ||
pGPIODrv->SetDirection(pin, ARM_GPIO_OUTPUT); | ||
|
||
// Set initial pin state to inactive | ||
if (outputCfg[n].activeState == VIO_ACTIVE_HIGH) { | ||
pGPIODrv->SetOutput(pin, 0U); | ||
} else { | ||
pGPIODrv->SetOutput(pin, 1U); | ||
} | ||
} | ||
#endif | ||
|
||
#if !defined CMSIS_VIN | ||
for (n = 0U; n < (sizeof(inputCfg) / sizeof(pinCfg_t)); n++) { | ||
pin = (ARM_GPIO_Pin_t)inputCfg[n].pin; | ||
pGPIODrv->Setup(pin, NULL); | ||
pGPIODrv->SetPullResistor(pin, inputCfg[n].pullResistor); | ||
pGPIODrv->SetDirection(pin, ARM_GPIO_INPUT); | ||
} | ||
#endif | ||
} | ||
|
||
// Set signal output. | ||
void vioSetSignal (uint32_t mask, uint32_t signal) { | ||
#if !defined CMSIS_VOUT | ||
ARM_GPIO_Pin_t pin; | ||
uint32_t pinValue, n; | ||
#endif | ||
|
||
vioSignalOut &= ~mask; | ||
vioSignalOut |= mask & signal; | ||
|
||
#if !defined CMSIS_VOUT | ||
// Output signals to LEDs | ||
for (n = 0U; n < (sizeof(outputCfg) / sizeof(pinCfg_t)); n++) { | ||
pin = (ARM_GPIO_Pin_t)outputCfg[n].pin; | ||
if ((mask & outputCfg[n].vioSignal) != 0U) { | ||
if ((signal & outputCfg[n].vioSignal) != 0U) { | ||
pinValue = 1U; | ||
} else { | ||
pinValue = 0U; | ||
} | ||
if (pinValue == outputCfg[n].activeState) { | ||
pGPIODrv->SetOutput(pin, 1U); | ||
} else { | ||
pGPIODrv->SetOutput(pin, 0U); | ||
} | ||
} | ||
} | ||
#endif | ||
} | ||
|
||
// Get signal input. | ||
uint32_t vioGetSignal (uint32_t mask) { | ||
uint32_t signal; | ||
#if !defined CMSIS_VIN | ||
ARM_GPIO_Pin_t pin; | ||
uint32_t pinValue, n; | ||
#endif | ||
|
||
#if !defined CMSIS_VIN | ||
// Get input signals from buttons | ||
for (n = 0U; n < (sizeof(inputCfg) / sizeof(pinCfg_t)); n++) { | ||
pin = (ARM_GPIO_Pin_t)inputCfg[n].pin; | ||
if ((mask & inputCfg[n].vioSignal) != 0U) { | ||
pinValue = pGPIODrv->GetInput(pin); | ||
if (pinValue == inputCfg[n].activeState) { | ||
vioSignalIn |= inputCfg[n].vioSignal; | ||
} else { | ||
vioSignalIn &= ~inputCfg[n].vioSignal; | ||
} | ||
} | ||
} | ||
#endif | ||
|
||
signal = vioSignalIn & mask; | ||
|
||
return signal; | ||
} | ||
|
||
// Set value output. | ||
// Note: vioAOUT not supported. | ||
void vioSetValue (uint32_t id, int32_t value) { | ||
uint32_t index = id; | ||
#if !defined CMSIS_VOUT | ||
// Add user variables here: | ||
|
||
#endif | ||
|
||
if (index >= VIO_VALUE_NUM) { | ||
return; /* return in case of out-of-range index */ | ||
} | ||
|
||
vioValue[index] = value; | ||
|
||
#if !defined CMSIS_VOUT | ||
// Add user code here: | ||
|
||
#endif | ||
} | ||
|
||
// Get value input. | ||
// Note: vioAIN not supported. | ||
int32_t vioGetValue (uint32_t id) { | ||
uint32_t index = id; | ||
int32_t value; | ||
#if !defined CMSIS_VIN | ||
// Add user variables here: | ||
|
||
#endif | ||
|
||
if (index >= VIO_VALUE_NUM) { | ||
return 0U; /* return 0 in case of out-of-range index */ | ||
} | ||
|
||
#if !defined CMSIS_VIN | ||
// Add user code here: | ||
|
||
#endif | ||
|
||
value = vioValue[index]; | ||
|
||
return value; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# NUCLEO-WL55JC_BSP | ||
|
||
The **STMicroelectronics NUCLEO-WL55JC Board Support Pack (BSP)**: | ||
|
||
- Contains examples in *csolution format* for usage with the [CMSIS-Toolbox](https://github.com/Open-CMSIS-Pack/cmsis-toolbox/blob/main/docs/README.md) and the [VS Code CMSIS Solution](https://marketplace.visualstudio.com/items?itemName=Arm.cmsis-csolution) extension. | ||
- Requires the [Device Family Pack (DFP) for the STM32WL series](https://www.keil.arm.com/packs/stm32wlxx_dfp-keil). | ||
- Is configured with [STM32CubeMX](https://www.st.com/en/development-tools/stm32cubemx.html) for the Arm Compiler 6 (MDK). | ||
|
||
## Content in *csolution format* | ||
|
||
- [Examples/Blinky](https://github.com/Open-CMSIS-Pack/ST_NUCLEO-WL55JC_BSP/tree/main/Examples/Blinky) shows the basic usage of this board. |
Oops, something went wrong.