Skip to content

Commit

Permalink
Updates for new pack features & generator library
Browse files Browse the repository at this point in the history
  • Loading branch information
KeilChris committed Jun 7, 2024
1 parent 47f8de7 commit e43cf3c
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 46 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ dkms.conf

# Output files
output
Documentation
Documentation/html
Documentation/search

# macOS files
**.DS_Store
15 changes: 12 additions & 3 deletions ACME.ACME_Middleware.pdsc
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>

<package schemaVersion="1.7.7" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
xs:noNamespaceSchemaLocation="https://raw.githubusercontent.com/Open-CMSIS-Pack/Open-CMSIS-Pack-Spec/v1.7.7/schema/PACK.xsd">
<package schemaVersion="1.7.37" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
xs:noNamespaceSchemaLocation="https://raw.githubusercontent.com/Open-CMSIS-Pack/Open-CMSIS-Pack-Spec/v1.7.37/schema/PACK.xsd">
<vendor>ACME</vendor>
<name>ACME_Middleware</name>
<description>ACME middleware components</description>
<description overview="Documentation/README.md">ACME middleware components</description>
<url>https://www.acme-website.com/pack/</url>
<repository type="git">https://github.com/Open-CMSIS-Pack/SW-Pack-HandsOn.git</repository>
<supportContact>[email protected]</supportContact>
<license>LICENSE</license>
<licenseSets>
<licenseSet id="all" default="true" gating="true">
<license name="LICENSE" title="Apache 2.0 License"/>
</licenseSet>
</licenseSets>

<releases>
<release version="1.1.1" date="2024-06-07">
Updated gen_pack.sh script.
Added Documentation/README.md to display the SW pack overview page.
</release>
<release version="1.1.0" date="2023-10-02">
Added Doxygen-based documentation.
Added automated documentation builds with GH Actions.
Expand Down
Binary file added Documentation/ACME-Middleware.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions Documentation/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# ACME-Middleware

The ACME-Middleware software pack is an exemplary pack that shows how to create pure sooftware packs. It contains ...

![ACME-Middleware](./ACME-Middleware.png)

The ACME-Middleware can be used by any user application.

ACME-Middleware uses a CMSIS-RTOS2-based real-time operating system for task scheduling, for example [Keil RTX5](https://github.com/ARM-software/CMSIS-RTX) or [CMSIS-FreeRTOS](https://github.com/arm-software/CMSIS-freertos).

[Optional] The [CMSIS-Compiler](https://github.com/arm-software/cmsis-compiler) and [CMSIS-View](https://github.com/arm-software/cmsis-view) components can display events and static information from all ACME-Middleware components.

The software components that are part of this [CMSIS-Pack](https://open-cmsis-pack.github.io/Open-CMSIS-Pack-Spec/main/html/index.html) are:

- **MyGroup**: Lorem ipsum.

> *Note:*
> Each component is configurable for a wide range of applications and requires the driver interface as described by the [CMSIS-Driver standard](https://arm-software.github.io/CMSIS_6/latest/Driver/index.html). Check with your silicon vendor about the availability of CMSIS-Drivers for your selected microcontroller device.
## Availability

The ACME-Middleware is available as a commercial product to all users of Arm Cortex-M-based processors. It does not require a specific toolchain or IDE license and can be built with major toolchains, such as Arm Compiler 6, GCC, and LLVM.
66 changes: 24 additions & 42 deletions gen_pack.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
# Version: 2.7
# Date: 2023-05-22
# Version: 3.1
# Date: 2024-04-17
# This bash script generates a CMSIS Software Pack:
#

Expand All @@ -9,7 +9,7 @@ set -o pipefail
# Set version of gen pack library
# For available versions see https://github.com/Open-CMSIS-Pack/gen-pack/tags.
# Use the tag name without the prefix "v", e.g., 0.7.0
REQUIRED_GEN_PACK_LIB="0.8.5"
REQUIRED_GEN_PACK_LIB="0.11.1"

# Set default command line arguments
DEFAULT_ARGS=()
Expand Down Expand Up @@ -75,7 +75,19 @@ PACK_DELETE_FILES="
# - release Tag annotations, or release descriptions (in order)
# - tag Tag annotations only
#
PACK_CHANGELOG_MODE="tag"
# PACK_CHANGELOG_MODE="<full|release|tag>"

# Specify file patterns to be excluded from the checksum file
# Default: <empty>
# Values:
# - empty All files packaged are included in the checksum file
# - glob pattern One glob pattern per line. Files matching a given pattern are excluded
# from the checksum file
# - "*" The * (match all pattern) can be used to skip checksum file creating completely.
#
# PACK_CHECKSUM_EXCLUDE="
# <list file patterns here>
# "

#
# custom pre-processing steps
Expand All @@ -86,7 +98,6 @@ PACK_CHANGELOG_MODE="tag"
function preprocess() {
# add custom steps here to be executed
# before populating the pack build folder
./DoxyGen/gen_doc.sh
return 0
}

Expand All @@ -105,43 +116,14 @@ function postprocess() {

############ DO NOT EDIT BELOW ###########

function install_lib() {
local URL="https://github.com/Open-CMSIS-Pack/gen-pack/archive/refs/tags/v$1.tar.gz"
local STATUS=$(curl -sLI "${URL}" | grep "^HTTP" | tail -n 1 | cut -d' ' -f2 || echo "$((600+$?))")
if [[ $STATUS -ge 400 ]]; then
echo "Wrong/unavailable gen-pack lib version '$1'!" >&2
echo "Check REQUIRED_GEN_PACK_LIB variable." >&2
echo "For available versions see https://github.com/Open-CMSIS-Pack/gen-pack/tags." >&2
exit 1
fi
echo "Downloading gen-pack lib version '$1' to '$2' ..."
mkdir -p "$2"
curl -L "${URL}" -s | tar -xzf - --strip-components 1 -C "$2" || exit 1
}

function load_lib() {
if [[ -d ${GEN_PACK_LIB} ]]; then
. "${GEN_PACK_LIB}/gen-pack"
return 0
fi
local GLOBAL_LIB="/usr/local/share/gen-pack/${REQUIRED_GEN_PACK_LIB}"
local USER_LIB="${HOME}/.local/share/gen-pack/${REQUIRED_GEN_PACK_LIB}"
if [[ ! -d "${GLOBAL_LIB}" && ! -d "${USER_LIB}" ]]; then
echo "Required gen_pack lib not found!" >&2
install_lib "${REQUIRED_GEN_PACK_LIB}" "${USER_LIB}"
fi

if [[ -d "${GLOBAL_LIB}" ]]; then
. "${GLOBAL_LIB}/gen-pack"
elif [[ -d "${USER_LIB}" ]]; then
. "${USER_LIB}/gen-pack"
else
echo "Required gen-pack lib is not installed!" >&2
exit 1
fi
}
# Set GEN_PACK_LIB_PATH to use a specific gen-pack library root
# ... instead of bootstrap based on REQUIRED_GEN_PACK_LIB
if [[ -f "${GEN_PACK_LIB_PATH}/gen-pack" ]]; then
. "${GEN_PACK_LIB_PATH}/gen-pack"
else
. <(curl -sL "https://raw.githubusercontent.com/Open-CMSIS-Pack/gen-pack/main/bootstrap")
fi

load_lib
gen_pack "${DEFAULT_ARGS[@]}" "$@"

exit 0
exit 0

0 comments on commit e43cf3c

Please sign in to comment.