Skip to content

Commit bc2b3d4

Browse files
Merge pull request #4 from dialog-semiconductor/da1459x-cmsis-nn-example
CMSIS NN Demonstration Example
2 parents 3187759 + 4975ead commit bc2b3d4

Some content is hidden

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

46 files changed

+6685
-0
lines changed

features/cmsis_nn_sample_code/.cproject

Lines changed: 339 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>cmsis_nn_sample_code</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
10+
<triggers>clean,full,incremental,</triggers>
11+
<arguments>
12+
</arguments>
13+
</buildCommand>
14+
<buildCommand>
15+
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
16+
<triggers>full,incremental,</triggers>
17+
<arguments>
18+
</arguments>
19+
</buildCommand>
20+
</buildSpec>
21+
<natures>
22+
<nature>org.eclipse.cdt.core.cnature</nature>
23+
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
24+
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
25+
</natures>
26+
<linkedResources>
27+
<link>
28+
<name>sdk</name>
29+
<type>2</type>
30+
<locationURI>virtual:/virtual</locationURI>
31+
</link>
32+
<link>
33+
<name>startup</name>
34+
<type>2</type>
35+
<locationURI>SDKROOT/sdk/bsp/startup</locationURI>
36+
</link>
37+
<link>
38+
<name>sdk/FreeRTOS</name>
39+
<type>2</type>
40+
<locationURI>SDKROOT/sdk/free_rtos</locationURI>
41+
</link>
42+
<link>
43+
<name>sdk/adapters</name>
44+
<type>2</type>
45+
<locationURI>SDKROOT/sdk/middleware/adapters</locationURI>
46+
</link>
47+
<link>
48+
<name>sdk/bsp_include</name>
49+
<type>2</type>
50+
<locationURI>SDKROOT/sdk/bsp/include</locationURI>
51+
</link>
52+
<link>
53+
<name>sdk/config</name>
54+
<type>2</type>
55+
<locationURI>SDKROOT/sdk/bsp/config</locationURI>
56+
</link>
57+
<link>
58+
<name>sdk/ldscripts</name>
59+
<type>2</type>
60+
<locationURI>SDKROOT/sdk/bsp/ldscripts/non_ble_projects</locationURI>
61+
</link>
62+
<link>
63+
<name>sdk/memory</name>
64+
<type>2</type>
65+
<locationURI>SDKROOT/sdk/bsp/memory</locationURI>
66+
</link>
67+
<link>
68+
<name>sdk/middleware_config</name>
69+
<type>2</type>
70+
<locationURI>SDKROOT/sdk/middleware/config</locationURI>
71+
</link>
72+
<link>
73+
<name>sdk/osal</name>
74+
<type>2</type>
75+
<locationURI>SDKROOT/sdk/middleware/osal</locationURI>
76+
</link>
77+
<link>
78+
<name>sdk/peripherals</name>
79+
<type>2</type>
80+
<locationURI>SDKROOT/sdk/bsp/peripherals</locationURI>
81+
</link>
82+
<link>
83+
<name>sdk/sys_man</name>
84+
<type>2</type>
85+
<locationURI>SDKROOT/sdk/bsp/system/sys_man</locationURI>
86+
</link>
87+
<link>
88+
<name>sdk/util</name>
89+
<type>2</type>
90+
<locationURI>SDKROOT/sdk/bsp/util</locationURI>
91+
</link>
92+
</linkedResources>
93+
<variableList>
94+
<variable>
95+
<name>SDKROOT</name>
96+
<value>$%7BWORKSPACE_LOC%7D</value>
97+
</variable>
98+
</variableList>
99+
</projectDescription>
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# CMSIS NN Demonstration Example
2+
3+
This example runs the ARM CMSIS NN library on the DA1469x family of devices. Four of the tests from the CMSIS library have been extracted and used as a sanity check.
4+
5+
## HW and SW Configuration
6+
7+
- **Hardware Configuration**
8+
- This example runs on the DA1459x family of devices.
9+
- A [Pro Development Kit](https://www.renesas.com/us/en/products/wireless-connectivity/bluetooth-low-energy/da14592-016fdevkt-p-smartbond-da14592-bluetooth-low-energy-52-soc-development-kit-pro) (DevKit) is needed for this example.
10+
- **Software Configuration**
11+
- Download the latest [SDK](https://www.renesas.com/us/en/products/wireless-connectivity/bluetooth-low-energy/da14592-smartbond-multi-core-bluetooth-le-52-soc-embedded-flash?gad_source=1) version for the target family of devices.
12+
13+
- SEGGER J-Link tools are normally downloaded and installed as part of the [e2 Studio](https://www.renesas.com/us/en/software-tool/smartbond-development-tools) installation.
14+
15+
## How to run the example
16+
17+
### Initial Setup
18+
19+
- Download the source code from [GitHub](https://github.com/dialog-semiconductor/BLE_SDK10_DA1459x_examples).
20+
- Import the project into your workspace (there should be no path dependencies). If you are not familiar with these processes it's advised that you first familiarize yourself with the [Getting Started](https://lpccs-docs.renesas.com/um-b-166-da1459x_getting_started/index.html) guide.
21+
- Connect the target device to your host PC via USB1. The mentioned port is used to power the device and to support serial and JTAG interfaces. These two interfaces can be used both for flashing and debugging purposes.
22+
- Compile the source code (either in Release or Debug mode) and flash it into the chip. Please note that the debug flavor should be used merely for debugging purposes since it should increase the generated binary file, significantly. In addition, the source code is built to work with the embedded flash Working with external flash memory devices is out of the scope of this demonstration example.
23+
- Open a serial terminal (115200/8-N-1).
24+
- Once the application image is flashed, press the RESET button on the daughter board to start executing the application.
25+
26+
- The terminal should display that the test vectors have run successfully (or not). The `#` should also be printed every second as the sample code is built on top of the `freertos_retarget` SDK sample code.
27+
28+
```
29+
arm_fully_connected_s16 test success
30+
arm_fully_connected_s16_big test success
31+
int16xint8_arm_convolve_fast_s16 test success
32+
requantize_s64_arm_convolve_fast_s16 test success
33+
```
34+
35+
## Known Limitations
36+
37+
There should be no known limitations for this example.
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
/**
2+
****************************************************************************************
3+
*
4+
* @file custom_config_eflash.h
5+
*
6+
* @brief Board Support Package. User Configuration file for cached eFLASH mode.
7+
*
8+
* Copyright (C) 2020-2024 Renesas Electronics Corporation and/or its affiliates.
9+
* All rights reserved. Confidential Information.
10+
*
11+
* This software ("Software") is supplied by Renesas Electronics Corporation and/or its
12+
* affiliates ("Renesas"). Renesas grants you a personal, non-exclusive, non-transferable,
13+
* revocable, non-sub-licensable right and license to use the Software, solely if used in
14+
* or together with Renesas products. You may make copies of this Software, provided this
15+
* copyright notice and disclaimer ("Notice") is included in all such copies. Renesas
16+
* reserves the right to change or discontinue the Software at any time without notice.
17+
*
18+
* THE SOFTWARE IS PROVIDED "AS IS". RENESAS DISCLAIMS ALL WARRANTIES OF ANY KIND,
19+
* WHETHER EXPRESS, IMPLIED, OR STATUTORY, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
20+
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. TO THE
21+
* MAXIMUM EXTENT PERMITTED UNDER LAW, IN NO EVENT SHALL RENESAS BE LIABLE FOR ANY DIRECT,
22+
* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING FROM, OUT OF OR IN
23+
* CONNECTION WITH THE SOFTWARE, EVEN IF RENESAS HAS BEEN ADVISED OF THE POSSIBILITY OF
24+
* SUCH DAMAGES. USE OF THIS SOFTWARE MAY BE SUBJECT TO TERMS AND CONDITIONS CONTAINED IN
25+
* AN ADDITIONAL AGREEMENT BETWEEN YOU AND RENESAS. IN CASE OF CONFLICT BETWEEN THE TERMS
26+
* OF THIS NOTICE AND ANY SUCH ADDITIONAL LICENSE AGREEMENT, THE TERMS OF THE AGREEMENT
27+
* SHALL TAKE PRECEDENCE. BY CONTINUING TO USE THIS SOFTWARE, YOU AGREE TO THE TERMS OF
28+
* THIS NOTICE.IF YOU DO NOT AGREE TO THESE TERMS, YOU ARE NOT PERMITTED TO USE THIS
29+
* SOFTWARE.
30+
*
31+
****************************************************************************************
32+
*/
33+
34+
#ifndef CUSTOM_CONFIG_EFLASH_H_
35+
#define CUSTOM_CONFIG_EFLASH_H_
36+
37+
#include "bsp_definitions.h"
38+
39+
#define CONFIG_RETARGET
40+
41+
#define dg_configEXEC_MODE MODE_IS_CACHED
42+
#define dg_configCODE_LOCATION NON_VOLATILE_IS_EMBEDDED_FLASH
43+
44+
#define dg_configUSE_WDOG ( 1 )
45+
46+
#define dg_configUSE_SW_CURSOR ( 1 )
47+
48+
/*************************************************************************************************\
49+
* FreeRTOS specific config
50+
*/
51+
#define OS_FREERTOS /* Define this to use FreeRTOS */
52+
#define configTOTAL_HEAP_SIZE 14000 /* This is the FreeRTOS Total Heap Size */
53+
54+
/*************************************************************************************************\
55+
* Peripheral specific config
56+
*/
57+
#define dg_configFLASH_ADAPTER ( 0 )
58+
#define dg_configNVMS_ADAPTER ( 0 )
59+
#define dg_configNVMS_VES ( 0 )
60+
61+
/* Include bsp default values */
62+
#include "bsp_defaults.h"
63+
/* Include middleware default values */
64+
#include "middleware_defaults.h"
65+
66+
#endif /* CUSTOM_CONFIG_EFLASH_H_ */

0 commit comments

Comments
 (0)