Skip to content

Commit 0194d5e

Browse files
author
kvandenm
committed
add examples
1 parent 9318350 commit 0194d5e

File tree

248 files changed

+36498
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

248 files changed

+36498
-2
lines changed

.github/scripts/process_build.py

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
import os
2+
import fnmatch
3+
import json
4+
import glob
5+
import tempfile
6+
import shutil
7+
8+
def findProjectFiles():
9+
10+
projectFolderList = []
11+
12+
matches = []
13+
for root, dirnames, filenames in os.walk("."):
14+
for filename in fnmatch.filter(filenames, ".project"):
15+
matches.append(os.path.dirname(os.path.join(root, filename))[2:])
16+
17+
return matches
18+
19+
20+
if __name__ == "__main__":
21+
22+
tmpDir = 'artifacts'
23+
24+
if os.path.exists(tmpDir):
25+
shutil.rmtree(tmpDir)
26+
27+
os.makedirs(tmpDir)
28+
29+
projectFolderList = findProjectFiles()
30+
31+
outputDict = {"examples": [], "groups": []}
32+
for proj in projectFolderList:
33+
34+
binPath = glob.glob( os.path.join(proj,'*-Debug_QSPI','*.bin'))
35+
36+
if len(binPath) != 1:
37+
raise FileExistsError(proj)
38+
39+
if not os.path.dirname(proj) in outputDict["groups"]:
40+
outputDict["groups"].append(os.path.dirname(proj))
41+
42+
outputDict["examples"].append(
43+
{
44+
"path": proj,
45+
"group": os.path.dirname(proj),
46+
"title": os.path.basename(proj),
47+
"readmePath": os.path.join(proj, "Readme.md"),
48+
"binPath": binPath[0]
49+
}
50+
)
51+
52+
json_object = json.dumps(outputDict, indent=4)
53+
with open(os.path.join(tmpDir,"projectData.json"), "w") as fp:
54+
fp.write(json_object)
55+
56+
for f in outputDict['examples']:
57+
os.makedirs(os.path.join(tmpDir,os.path.dirname(f['binPath'])), exist_ok=True)
58+
shutil.copyfile(f['binPath'],os.path.join(tmpDir,f['binPath']))
59+
60+
#upload to AWS

.github/workflows/main.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: CI
4+
5+
# Controls when the action will run.
6+
on:
7+
# Triggers the workflow on push or pull request events but only for the main branch
8+
push:
9+
branches: [ main, ci ]
10+
pull_request:
11+
branches: [ main, ci ]
12+
13+
# Allows you to run this workflow manually from the Actions tab
14+
workflow_dispatch:
15+
16+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
17+
jobs:
18+
# This workflow contains a single job called "build"
19+
build:
20+
# The type of runner that the job will run on
21+
runs-on: ubuntu-latest
22+
container: diasemi/smartsnippetsstudio:latest
23+
24+
# Steps represent a sequence of tasks that will be executed as part of the job
25+
steps:
26+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
27+
- uses: actions/checkout@v2
28+
29+
- name: Configure AWS credentials from Test account
30+
uses: aws-actions/configure-aws-credentials@v1
31+
with:
32+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
33+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
34+
aws-region: eu-west-1
35+
36+
- name: Copy SDK files from AWS
37+
run: |
38+
aws s3 cp s3://dlglpcgithubci/sdk/da1459x-sdk10.1.2.86.zip ..
39+
40+
- name: Unzip SDK
41+
run: |
42+
unzip ../da1459x-sdk10.1.2.86.zip -d ..
43+
44+
- name: Import examples
45+
run: |
46+
/opt/DiaSemi/SmartSnippetsStudio2.0.16/CDT/SmartSnippets_Studio --launcher.suppressErrors -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data ../SDK_10.1.2.86 -importAll .
47+
48+
- name: Build examples
49+
run: |
50+
/opt/DiaSemi/SmartSnippetsStudio2.0.16/CDT/SmartSnippets_Studio --launcher.suppressErrors -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data ../SDK_10.1.2.86 -build all
51+
52+
- name: postprocess results
53+
run: |
54+
python3 .github/scripts/process_build.py
55+
56+
- name: upload aws
57+
if: github.event_name == 'push' && github.ref_name == 'main'
58+
run: |
59+
aws s3 sync --delete artifacts s3://lpccs-docs.renesas.com/examples_arfitacts/da1459x

LICENSE.txt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# The MIT License (MIT)
2+
# Copyright (c) 2024 Dialog Semiconductor
3+
#
4+
# Permission is hereby granted, free of charge, to any person obtaining a copy
5+
# of this software and associated documentation files (the "Software"), to deal
6+
# in the Software without restriction, including without limitation the rights
7+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8+
# copies of the Software, and to permit persons to whom the Software is
9+
# furnished to do so, subject to the following conditions:
10+
#
11+
# The above copyright notice and this permission notice shall be included in all
12+
# copies or substantial portions of the Software.
13+
#
14+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17+
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18+
# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
19+
# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
20+
# OR OTHER DEALINGS IN THE SOFTWARE.

Readme.md renamed to README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The available devices in the DA1459x family are:
66

77
- [DA14592](https://www.renesas.com/us/en/products/wireless-connectivity/bluetooth-low-energy)
88

9-
For information about the DA1459x platform and how to bring up your development kit, please refer to the [Getting started User Manual](https://lpccs-docs.renesas.com/um-b-153-da1470x_getting_started/index.html)
9+
For information about the DA1459x platform and how to bring up your development kit, please refer to the [Getting started User Manual](https://lpccs-docs.renesas.com/um-b-090-da1469x_getting_started/index.html)
1010

1111
## Example usage
1212

@@ -16,9 +16,10 @@ For additional examples:
1616

1717
- Clone this repository
1818
- From the workspace you have setup go to **File->Import**
19-
- Select **General->Existing Projects into Workspace** and click Next
19+
- Select **General -> Dialog SDK Projects** and click Next
2020
- In the `Select root directory` input the path where you cloned this repository
2121
- Select the example(s) you want to import and click finish.
22+
- A (dialog) window pops up and choose the Toolchain version 7.x and the Target Device DA14592.
2223

2324
You can now navigate and build the imported examples.
2425

0 commit comments

Comments
 (0)