Skip to content

Commit 3785de8

Browse files
committed
[BEETLE] Add BLE Cordio Support into HAL
This patch adds BLE Cordio support into MBED HAL. It contains: * Cordio and TRIM object files * The Cordio stack header file * The Cordio library for Beetle Systems precompiled for GCC and ARMCC The BLE implementation will be provided in a future patch in the mbed-os repository. Signed-off-by: Vincenzo Frascino <[email protected]>
1 parent 1be4788 commit 3785de8

Some content is hidden

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

65 files changed

+9755
-1
lines changed

hal/targets.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1506,7 +1506,8 @@
15061506
"template": ["uvision5_arm_beetle_soc.uvproj.tmpl"]
15071507
}
15081508
},
1509-
"device_has": ["ANALOGIN", "CLCD", "I2C", "INTERRUPTIN", "LOWPOWERTIMER", "PORTIN", "PORTINOUT", "PORTOUT", "SERIAL", "SPI"]
1509+
"device_has": ["ANALOGIN", "CLCD", "I2C", "INTERRUPTIN", "LOWPOWERTIMER", "PORTIN", "PORTINOUT", "PORTOUT", "SERIAL", "SPI"],
1510+
"features": ["BLE"]
15101511
},
15111512
"RZ_A1H": {
15121513
"supported_form_factors": ["ARDUINO"],
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
*.o binary
2+
*.lib binary
3+
*.a binary
4+
*.ar binary
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
Permissive Binary License
2+
3+
Version 1.0, September 2015
4+
5+
Redistribution. Redistribution and use in binary form, without
6+
modification, are permitted provided that the following conditions are
7+
met:
8+
9+
1) Redistributions must reproduce the above copyright notice and the
10+
following disclaimer in the documentation and/or other materials
11+
provided with the distribution.
12+
13+
2) Unless to the extent explicitly permitted by law, no reverse
14+
engineering, decompilation, or disassembly of this software is
15+
permitted.
16+
17+
3) Redistribution as part of a software development kit must include the
18+
accompanying file named “DEPENDENCIES” and any dependencies listed in
19+
that file.
20+
21+
4) Neither the name of the copyright holder nor the names of its
22+
contributors may be used to endorse or promote products derived from
23+
this software without specific prior written permission.
24+
25+
Limited patent license. The copyright holders (and contributors) grant a
26+
worldwide, non-exclusive, no-charge, royalty-free patent license to
27+
make, have made, use, offer to sell, sell, import, and otherwise
28+
transfer this software, where such license applies only to those patent
29+
claims licensable by the copyright holders (and contributors) that are
30+
necessarily infringed by this software. This patent license shall not
31+
apply to any combinations that include this software. No hardware is
32+
licensed hereunder.
33+
34+
If you institute patent litigation against any entity (including a
35+
cross-claim or counterclaim in a lawsuit) alleging that the software
36+
itself infringes your patent(s), then your rights granted under this
37+
license shall terminate as of the date such litigation is filed.
38+
39+
DISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
40+
CONTRIBUTORS "AS IS." ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT
41+
NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
42+
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
43+
HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
44+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
45+
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
46+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
47+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
48+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
49+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
The binary files (cordio.0.0.1.ar and cordio_platform.0.0.1.ar) in this directory are licensed under the
2+
Permissive Binary License1.0 (PBL-1.0) as can be found in: LICENSE-permissive-binary-license-1.0.txt
Binary file not shown.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
*.o binary
2+
*.lib binary
3+
*.a binary
4+
*.ar binary
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
Permissive Binary License
2+
3+
Version 1.0, September 2015
4+
5+
Redistribution. Redistribution and use in binary form, without
6+
modification, are permitted provided that the following conditions are
7+
met:
8+
9+
1) Redistributions must reproduce the above copyright notice and the
10+
following disclaimer in the documentation and/or other materials
11+
provided with the distribution.
12+
13+
2) Unless to the extent explicitly permitted by law, no reverse
14+
engineering, decompilation, or disassembly of this software is
15+
permitted.
16+
17+
3) Redistribution as part of a software development kit must include the
18+
accompanying file named “DEPENDENCIES” and any dependencies listed in
19+
that file.
20+
21+
4) Neither the name of the copyright holder nor the names of its
22+
contributors may be used to endorse or promote products derived from
23+
this software without specific prior written permission.
24+
25+
Limited patent license. The copyright holders (and contributors) grant a
26+
worldwide, non-exclusive, no-charge, royalty-free patent license to
27+
make, have made, use, offer to sell, sell, import, and otherwise
28+
transfer this software, where such license applies only to those patent
29+
claims licensable by the copyright holders (and contributors) that are
30+
necessarily infringed by this software. This patent license shall not
31+
apply to any combinations that include this software. No hardware is
32+
licensed hereunder.
33+
34+
If you institute patent litigation against any entity (including a
35+
cross-claim or counterclaim in a lawsuit) alleging that the software
36+
itself infringes your patent(s), then your rights granted under this
37+
license shall terminate as of the date such litigation is filed.
38+
39+
DISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
40+
CONTRIBUTORS "AS IS." ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT
41+
NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
42+
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
43+
HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
44+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
45+
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
46+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
47+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
48+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
49+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
The binary files (libcordio.0.0.1.a and libcordio_platform.0.0.1.a) in this directory are licensed under the
2+
Permissive Binary License1.0 (PBL-1.0) as can be found in: LICENSE-permissive-binary-license-1.0.txt
Binary file not shown.
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
Permissive Binary License
2+
3+
Version 1.0, September 2015
4+
5+
Redistribution. Redistribution and use in binary form, without
6+
modification, are permitted provided that the following conditions are
7+
met:
8+
9+
1) Redistributions must reproduce the above copyright notice and the
10+
following disclaimer in the documentation and/or other materials
11+
provided with the distribution.
12+
13+
2) Unless to the extent explicitly permitted by law, no reverse
14+
engineering, decompilation, or disassembly of this software is
15+
permitted.
16+
17+
3) Redistribution as part of a software development kit must include the
18+
accompanying file named “DEPENDENCIES” and any dependencies listed in
19+
that file.
20+
21+
4) Neither the name of the copyright holder nor the names of its
22+
contributors may be used to endorse or promote products derived from
23+
this software without specific prior written permission.
24+
25+
Limited patent license. The copyright holders (and contributors) grant a
26+
worldwide, non-exclusive, no-charge, royalty-free patent license to
27+
make, have made, use, offer to sell, sell, import, and otherwise
28+
transfer this software, where such license applies only to those patent
29+
claims licensable by the copyright holders (and contributors) that are
30+
necessarily infringed by this software. This patent license shall not
31+
apply to any combinations that include this software. No hardware is
32+
licensed hereunder.
33+
34+
If you institute patent litigation against any entity (including a
35+
cross-claim or counterclaim in a lawsuit) alleging that the software
36+
itself infringes your patent(s), then your rights granted under this
37+
license shall terminate as of the date such litigation is filed.
38+
39+
DISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
40+
CONTRIBUTORS "AS IS." ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT
41+
NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
42+
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
43+
HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
44+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
45+
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
46+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
47+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
48+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
49+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
*.o binary
2+
*.lib binary
3+
*.a binary
4+
*.ar binary
Binary file not shown.
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
Permissive Binary License
2+
3+
Version 1.0, September 2015
4+
5+
Redistribution. Redistribution and use in binary form, without
6+
modification, are permitted provided that the following conditions are
7+
met:
8+
9+
1) Redistributions must reproduce the above copyright notice and the
10+
following disclaimer in the documentation and/or other materials
11+
provided with the distribution.
12+
13+
2) Unless to the extent explicitly permitted by law, no reverse
14+
engineering, decompilation, or disassembly of this software is
15+
permitted.
16+
17+
3) Redistribution as part of a software development kit must include the
18+
accompanying file named “DEPENDENCIES” and any dependencies listed in
19+
that file.
20+
21+
4) Neither the name of the copyright holder nor the names of its
22+
contributors may be used to endorse or promote products derived from
23+
this software without specific prior written permission.
24+
25+
Limited patent license. The copyright holders (and contributors) grant a
26+
worldwide, non-exclusive, no-charge, royalty-free patent license to
27+
make, have made, use, offer to sell, sell, import, and otherwise
28+
transfer this software, where such license applies only to those patent
29+
claims licensable by the copyright holders (and contributors) that are
30+
necessarily infringed by this software. This patent license shall not
31+
apply to any combinations that include this software. No hardware is
32+
licensed hereunder.
33+
34+
If you institute patent litigation against any entity (including a
35+
cross-claim or counterclaim in a lawsuit) alleging that the software
36+
itself infringes your patent(s), then your rights granted under this
37+
license shall terminate as of the date such litigation is filed.
38+
39+
DISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
40+
CONTRIBUTORS "AS IS." ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT
41+
NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
42+
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
43+
HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
44+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
45+
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
46+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
47+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
48+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
49+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
The binary files (CORDIO_RO_2.1.o and TRIM_2.1.o) in this directory are licensed under the
2+
Permissive Binary License1.0 (PBL-1.0) as can be found in: LICENSE-permissive-binary-license-1.0.txt
Binary file not shown.
Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
/*************************************************************************************************/
2+
/*!
3+
* \file board.h
4+
*
5+
* \brief Board-specific include file for BT4 module board.
6+
*
7+
* Copyright (c) 2009-2016, ARM Limited, All Rights Reserved
8+
* SPDX-License-Identifier: LicenseRef-PBL
9+
*
10+
* This file and the related binary are licensed under the
11+
* Permissive Binary License, Version 1.0 (the "License");
12+
* you may not use these files except in compliance with the License.
13+
*
14+
* You may obtain a copy of the License here:
15+
* LICENSE-permissive-binary-license-1.0.txt and at
16+
* https://www.mbed.com/licenses/PBL-1.0
17+
*
18+
* See the License for the specific language governing permissions and
19+
* limitations under the License.
20+
*/
21+
/*************************************************************************************************/
22+
23+
#ifndef BOARD_H
24+
#define BOARD_H
25+
26+
27+
28+
/***************************************************************************************************
29+
** DEVICE
30+
***************************************************************************************************/
31+
32+
/* install defines and installs for device ARM_BEETLE_SOC */
33+
#define ARM_BEETLE_SOC (1U)
34+
35+
/***************************************************************************************************
36+
** UART & CONSOLE
37+
***************************************************************************************************/
38+
#include <drv_uart.h>
39+
extern const struct drv_uart Drv_UART0;
40+
#define BOARD_HAS_UART0
41+
42+
#include <drv_console.h>
43+
extern const struct drv_console Drv_Console0;
44+
45+
#define BOARD_UART Drv_UART0
46+
#define BOARD_CONSOLE Drv_Console0
47+
#define BOARD_CONSOLE_NUM 0
48+
#define BOARD_CONSOLE_BAUD 9600u
49+
50+
#define BOARD_HCIPASSTHRU_CONSOLE Drv_Console0
51+
#define BOARD_HCIPASSTHRU_NUM 0
52+
#define BOARD_HCIPASSTHRU_BAUD 9600u
53+
54+
#if BOARD_CONSOLE_NUM == BOARD_HCIPASSTHRU_NUM
55+
# if BOARD_CONSOLE_BAUD != BOARD_HCIPASSTHRU_BAUD
56+
# error CONSOLE and HCIPASSTHRU use the same UART, but the bauds are configured different
57+
# endif
58+
#endif
59+
60+
#define BOARD_TERMINAL_CONSOLE Drv_Console0
61+
#define BOARD_TERMINAL_NUM 0
62+
#define BOARD_TERMINAL_BAUD 9600u
63+
64+
/***************************************************************************************************
65+
** GPIO
66+
***************************************************************************************************/
67+
#define BOARD_GPIO_OUTPUT_QUANTITY 1u
68+
#define BOARD_GPIO_OUTPUT_0 GPIO_GPIO3
69+
#define BOARD_GPIO_OUTPUTS {BOARD_GPIO_OUTPUT_0}
70+
#define BOARD_GPIO_OUTPUTS_MASK (BOARD_GPIO_OUTPUT_0)
71+
72+
/* gpio inputs */
73+
#define BOARD_HAS_WAKEUP
74+
75+
/***************************************************************************************************
76+
** SPI
77+
***************************************************************************************************/
78+
#ifndef ARM_BEETLE_SOC
79+
80+
#define BOARD_SPIFLASH_MAIN_IMAGE_OFFSET 0u
81+
#define BOARD_SPIFLASH_MAIN_IMAGE_LIMIT (BOARD_SPIFLASH_NVDATA_OFFSET - 1u)
82+
#define BOARD_SPIFLASH_NVDATA_LEN (4u * 1024u)
83+
#define BOARD_SPIFLASH_NVDATA_OFFSET (1020u * 1024u)
84+
#define BOARD_SPIFLASH_NVDATA_LIMIT (BOARD_SPIFLASH_NVDATA_OFFSET + BOARD_SPIFLASH_NVDATA_LEN - 1u)
85+
86+
#else
87+
/* USING ON CHIP FLASH FROM UPPER UPPER BANK, LINKED THROUGH *.o and SCATTER */
88+
extern unsigned char _binary_ASIC_2_1_img_start;
89+
extern unsigned char _binary_ASIC_2_1_img_end;
90+
extern unsigned char _binary_ASIC_2_1_img_size;
91+
92+
#define BOARD_HAS_FLASH_STORAGE
93+
94+
#define FLASH_ELF_HDR_JMP_OFFSET (52U)
95+
#define BOARD_FLASH_STORAGE_MAIN_IMAGE_OFFSET (0U) //jump over the ELF HEADER OF OBJECT
96+
#define BOARD_FLASH_STORAGE_MAIN_IMAGE_LIMIT (((74U) * (1024U)) - 1u) //64K FLASH STORAGE BLOCK
97+
98+
#define BOARD_FLASH_STORAGE_NVDATA_OFFSET (0U)
99+
#define BOARD_FLASH_STORAGE_NVDATA_LEN ((4U) * (1024U)) //4K NVM BLOCK SIZE
100+
#define BOARD_FLASH_STORAGE_NVDATA_LIMIT (BOARD_FLASH_STORAGE_NVDATA_OFFSET + BOARD_FLASH_STORAGE_NVDATA_LEN - 1u)
101+
102+
#define BOARD_FLASH_STORAGE_DATA_LEN_MASK (0xFFFU); //Length mask of 4K
103+
104+
#endif
105+
106+
107+
108+
/***************************************************************************************************
109+
** LLCC
110+
***************************************************************************************************/
111+
112+
#include <drv_llcc.h>
113+
extern const struct drv_llcc Drv_LLCC;
114+
115+
/***************************************************************************************************
116+
** IDs
117+
***************************************************************************************************/
118+
119+
#define BOARD_MANUFACTURER "ARM, Ltd."
120+
#define BOARD_NAME "BEETLE"
121+
#define BOARD_NAME_SHORT "BT4"
122+
#define BOARD_HW_REVISION "B"
123+
#define BOARD_COMPANY_ID 0x01AFu
124+
125+
#endif /* BOARD_H */

0 commit comments

Comments
 (0)