Skip to content

Commit 724dfd5

Browse files
authored
Merge pull request #11770 from morser499/pr/cm0-images
Update CM0P pre-built images to build 1.0.0.35
2 parents eea8300 + b5d2eec commit 724dfd5

File tree

14 files changed

+14213
-792
lines changed

14 files changed

+14213
-792
lines changed
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# PSoC 6 Cortex M0+ BLESS Controller pre-built image (CM0P_BLESS)
2+
3+
### Overview
4+
Pre-compiled BLESS Controller image executed on the Cortex M0+ core of the PSoC 6 dual-core MCU.
5+
The image is provided as C array ready to be compiled as part of the Cortex M4 application.
6+
The Cortex M0+ application code is placed to internal flash by the Cortex M4 linker script.
7+
8+
This image is used only in BLE dual CPU mode. In this mode, the BLE functionality is split between
9+
CM0+ (controller) and CM4 (host). It uses IPC for communication between two CPU cores where both the
10+
controller and host run:
11+
12+
------------------------------- ------------------------------------
13+
| CM0p (pre-built image) | | CM4 |
14+
| -------------------- ----- | | ----- ------------------------ |
15+
| | | | H | | IPC | | | | BLE Application | |
16+
| | BLE Controller |--| c | |<-------->| | | ------------------------ |
17+
| | (LL) | | I | |(commands,| | | | | |
18+
| | | ----- | events) | | | ----------------- | |
19+
| -------------------- | | | H | | BLE Profiles | | |
20+
------------------------------- | | C | ----------------- | |
21+
| | | I | | | |
22+
------------------------ | | | ------------------------- |
23+
| BLE HW | | | |--| BLE Host (GAP, L2CAP,| |
24+
------------------------ | | | | SM, ATT) | |
25+
| | | ------------------------- |
26+
| ----- |
27+
------------------------------------
28+
29+
30+
BLESS Controller pre-built image executes the following steps:
31+
- configures BLESS interrupt
32+
- registers IPC-pipe callback for BLE middleware; the BLE middleware uses this callback to
33+
initialize and enable the BLE controller when BLE middleware operates in BLE dual CPU mode
34+
- starts CM4 core at CY_CORTEX_M4_APPL_ADDR=0x10020000
35+
- goes to the while loop where processes BLE controller events and puts the CM0+ core into Deep Sleep.
36+
37+
### Usage
38+
To use this image, update the ram, flash, and FLASH_CM0P_SIZE values in the linker script for CM4:
39+
```
40+
Example for the GCC compiler:
41+
...
42+
MEMORY
43+
{
44+
...
45+
ram (rwx) : ORIGIN = 0x08003000, LENGTH = 0x044800
46+
flash (rx) : ORIGIN = 0x10000000, LENGTH = 0x100000
47+
...
48+
}
49+
...
50+
/* The size and start addresses of the Cortex-M0+ application image */
51+
FLASH_CM0P_SIZE = 0x20000;
52+
...
53+
```
54+
```
55+
Example for the IAR compiler:
56+
...
57+
/* RAM */
58+
define symbol __ICFEDIT_region_IRAM1_start__ = 0x08003000;
59+
define symbol __ICFEDIT_region_IRAM1_end__ = 0x08047800;
60+
/* Flash */
61+
define symbol __ICFEDIT_region_IROM1_start__ = 0x10000000;
62+
define symbol __ICFEDIT_region_IROM1_end__ = 0x10100000;
63+
...
64+
/* The size and start addresses of the Cortex-M0+ application image */
65+
define symbol FLASH_CM0P_SIZE = 0x20000;
66+
...
67+
```
68+
```
69+
Example for ARMC6 compiler:
70+
...
71+
; RAM
72+
#define RAM_START 0x08003000
73+
#define RAM_SIZE 0x00044800
74+
; Flash
75+
#define FLASH_START 0x10000000
76+
#define FLASH_SIZE 0x00100000
77+
...
78+
/* The size and start addresses of the Cortex-M0+ application image */
79+
#define FLASH_CM0P_SIZE 0x20000
80+
...
81+
```
82+
83+
To use this image in the custom BSP, adjust the BSP target makefile to
84+
add the COMPONENT_CM0P_BLESS directory to the list of components
85+
discovered by ModusToolbox build system:
86+
87+
```
88+
COMPONENTS+=CM0P_BLESS
89+
```
90+
91+
Make sure there is a single CM0P_* component included in the COMPONENTS list
92+
(it might be needed to remove CM0P_SLEEP from the list of standard BSP components).
93+
94+
---
95+
Copyright (c) Cypress Semiconductor Corporation, 2019.

targets/TARGET_Cypress/TARGET_PSOC6/psoc6cm0p/COMPONENT_CM0P_BLESS/psoc6_cm0p_bless.c

Lines changed: 6763 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# PSoC 6 Cortex M0+ Crypto server prebuilt image (CM0P_CRYPTO)
2+
3+
### Overview
4+
Crypto server prebuilt application image is executed on the Cortex M0+ core of the PSoC 6 dual-core MCU.
5+
The image is provided as C array ready to be compiled as part of the Cortex M4 application.
6+
The Cortex M0+ application code is placed to internal flash by the Cortex M4 linker script.
7+
8+
The Crypto server image executes the following steps:
9+
- configures IPC channel for data exchange between client and server applications;
10+
- configures three interrupts: an IPC notify interrupt, an IPC release interrupt, and an interrupt for error handling.
11+
- starts CM4 core at CY_CORTEX_M4_APPL_ADDR=0x10008000
12+
- goes to the infinite loop that processes the crypto server events and puts the CM0+ core into Deep Sleep.
13+
14+
### Usage
15+
To use this image, update the FLASH_CM0P_SIZE value in the linker script for CM4:
16+
```
17+
Example for the GCC compiler:
18+
...
19+
/* The size and start addresses of the Cortex-M0+ application image */
20+
FLASH_CM0P_SIZE = 0x8000;
21+
...
22+
```
23+
```
24+
Example for the IAR compiler:
25+
...
26+
/* The size and start addresses of the Cortex-M0+ application image */
27+
define symbol FLASH_CM0P_SIZE = 0x8000;
28+
...
29+
```
30+
```
31+
Example for ARMC6 compiler:
32+
...
33+
/* The size and start addresses of the Cortex-M0+ application image */
34+
#define FLASH_CM0P_SIZE 0x8000
35+
...
36+
```
37+
38+
To use this image in the custom BSP, adjust the BSP target makefile to
39+
add the COMPONENT_CM0P_CRYPTO directory to the list of components
40+
discovered by ModusToolbox build system:
41+
42+
```
43+
COMPONENTS+=CM0P_CRYPTO
44+
```
45+
46+
Make sure there is a single CM0P_* component included in the COMPONENTS list
47+
(it might be needed to remove CM0P_SLEEP from the list of standard BSP components).
48+
49+
50+
### Crypto client configuration
51+
52+
Example configuration of the crypto client for the Cortex-M4 core
53+
compatible with the prebuilt crypto server CM0+ application:
54+
55+
```
56+
#define MY_CHAN_CRYPTO (uint32_t)(3u) /* IPC data channel for the Crypto */
57+
#define MY_INTR_CRYPTO_SRV (uint32_t)(1u) /* IPC interrupt structure for the Crypto server */
58+
#define MY_INTR_CRYPTO_CLI (uint32_t)(2u) /* IPC interrupt structure for the Crypto client */
59+
#define MY_INTR_CRYPTO_SRV_MUX (IRQn_Type)(2u) /* CM0+ IPC interrupt mux number the Crypto server */
60+
#define MY_INTR_CRYPTO_CLI_MUX (IRQn_Type)(3u) /* CM0+ IPC interrupt mux number the Crypto client */
61+
#define MY_INTR_CRYPTO_ERR_MUX (IRQn_Type)(4u) /* CM0+ ERROR interrupt mux number the Crypto server */
62+
63+
const cy_stc_crypto_config_t myCryptoConfig =
64+
{
65+
/* .ipcChannel */ MY_CHAN_CRYPTO,
66+
/* .acquireNotifierChannel */ MY_INTR_CRYPTO_SRV,
67+
/* .releaseNotifierChannel */ MY_INTR_CRYPTO_CLI,
68+
/* .releaseNotifierConfig */ {
69+
/* .cm0pSrc */ cpuss_interrupts_ipc_2_IRQn, /* depends on selected releaseNotifierChannel value */
70+
/* .intrPriority */ 2u,
71+
},
72+
/* .userCompleteCallback */ NULL,
73+
/* .userGetDataHandler */ NULL,
74+
/* .userErrorHandler */ NULL,
75+
/* .acquireNotifierConfig */ {
76+
/* .cm0pSrc */ cpuss_interrupts_ipc_1_IRQn, /* depends on selected acquireNotifierChannel value */
77+
/* .intrPriority */ 2u,
78+
},
79+
/* .cryptoErrorIntrConfig */ {
80+
/* .cm0pSrc */ cpuss_interrupt_crypto_IRQn,
81+
/* .intrPriority */ 2u,
82+
}
83+
};
84+
```
85+
86+
Refer to the [PDL API Reference Guide][pdl_crypto] for more information related to the PSoC 6 Crypto client configuration.
87+
88+
---
89+
Copyright (c) Cypress Semiconductor Corporation, 2019.
90+
91+
[pdl_crypto]: https://cypresssemiconductorco.github.io/psoc6pdl/pdl_api_reference_manual/html/group__group__crypto__cli__srv.html

0 commit comments

Comments
 (0)