Skip to content

Commit 7d322dc

Browse files
committed
Simplified M0/M4 binary merging functionality. Now, M0 binary image to be used has to be explicitely named in a json file (can be ovverriden in mbed_app.json).
Exporter hooks removed completely. Cleanup and improvements to the comments, including removal of the redundant doxygen comments. Code run through astyle. Additionally: - changes to drivers/Timer.cpp reverted - ipcpipe_transport.* files removed as they are not used for now, - fixed condition in stdio_init.cpp to perform serial initialization only when STDIO is enabled, - added missing resurce manager call in PWM initialization, - us_ticker initialization changed to use pre-reserved clock divider (to avoid resource manager call). Changed reporting level from info to debug in PSOC6.py. Added missing includes for function declarations in startup files. Fixed (removed) garbadge text in psoc6_utils.c Precompiled binaries updated for recent changes in psoc6_utils.c and moved to a separate folder; README and LICENSE files added.
1 parent 9b1db83 commit 7d322dc

39 files changed

+2336
-2941
lines changed

drivers/Timer.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,11 @@ namespace mbed {
2323

2424
Timer::Timer() : _running(), _start(), _time(), _ticker_data(get_us_ticker_data()), _lock_deepsleep(true)
2525
{
26-
(void)ticker_read_us(_ticker_data); // Make sure h/w timer is initialized in non-critical context.
2726
reset();
2827
}
2928

3029
Timer::Timer(const ticker_data_t *data) : _running(), _start(), _time(), _ticker_data(data), _lock_deepsleep(true)
3130
{
32-
(void)ticker_read_us(_ticker_data); // Make sure h/w timer is initialized in non-critical context.
3331
reset();
3432
#if DEVICE_LPTICKER
3533
_lock_deepsleep = (data != get_lp_ticker_data());

targets/TARGET_Cypress/TARGET_PSOC6/PeripheralNames.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ typedef enum {
9696

9797
typedef enum {
9898
ADC_0 = (int)SAR_BASE,
99-
}ADCName;
99+
} ADCName;
100100

101101
typedef enum {
102102
DAC_0 = (int)CTDAC0_BASE,

targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8C63XX/TARGET_MCU_PSOC6_M0/ipc_rpc_m0.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,18 @@
2121
#include "cy_ipc_config.h"
2222
#include "ipc/cy_ipc_pipe.h"
2323

24-
#undef RPC_GEN
2524
#define RPC_GEN RPC_GEN_IMPLEMENTATION
26-
27-
#include "rpc_defs.h"
2825
#include "rpc_api.h"
29-
3026
#undef RPC_GEN
31-
#define RPC_GEN RPC_GEN_INITIALIZATION
27+
3228

3329
void ipcrpc_init(void)
3430
{
3531
uint32_t rpc_counter = 0;
3632

37-
#include "rpc_defs.h"
33+
#define RPC_GEN RPC_GEN_INITIALIZATION
3834
#include "rpc_api.h"
35+
#undef RPC_GEN
3936
}
4037

4138
/* [] END OF FILE */

targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8C63XX/TARGET_MCU_PSOC6_M0/system_psoc63_cm0plus.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
#include "device.h"
2121
#include "system_psoc63.h"
2222
#include "cy_device_headers.h"
23+
#include "ipc_rpc.h"
24+
#include "psoc6_utils.h"
2325

2426
#if defined(CY_DEVICE_PSOC6ABLE2)
2527
#if !defined(CY_PSOC6ABLE2_REV_0A_SUPPORT_DISABLE)
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
Copyright (c) 2017-2018 Future Electronics.
2+
Copyright (c) 2007-2018 Cypress Semiconductor.
3+
4+
Permissive Binary License
5+
6+
Version 1.0, September 2015
7+
8+
Redistribution. Redistribution and use in binary form, without
9+
modification, are permitted provided that the following conditions are
10+
met:
11+
12+
1) Redistributions must reproduce the above copyright notice and the
13+
following disclaimer in the documentation and/or other materials
14+
provided with the distribution.
15+
16+
2) Unless to the extent explicitly permitted by law, no reverse
17+
engineering, decompilation, or disassembly of this software is
18+
permitted.
19+
20+
3) Redistribution as part of a software development kit must include the
21+
accompanying file named "DEPENDENCIES" and any dependencies listed in
22+
that file.
23+
24+
4) Neither the name of the copyright holder nor the names of its
25+
contributors may be used to endorse or promote products derived from
26+
this software without specific prior written permission.
27+
28+
Limited patent license. The copyright holders (and contributors) grant a
29+
worldwide, non-exclusive, no-charge, royalty-free patent license to
30+
make, have made, use, offer to sell, sell, import, and otherwise
31+
transfer this software, where such license applies only to those patent
32+
claims licensable by the copyright holders (and contributors) that are
33+
necessarily infringed by this software. This patent license shall not
34+
apply to any combinations that include this software. No hardware is
35+
licensed hereunder.
36+
37+
If you institute patent litigation against any entity (including a
38+
cross-claim or counterclaim in a lawsuit) alleging that the software
39+
itself infringes your patent(s), then your rights granted under this
40+
license shall terminate as of the date such litigation is filed.
41+
42+
DISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
43+
CONTRIBUTORS "AS IS." ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT
44+
NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
45+
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
46+
HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
47+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
48+
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
49+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
50+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
51+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
52+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
README for pre-compiled PSoC 6 Cortex M0+ core images
2+
=====================================================
3+
4+
This folder contains precompiled program images for the CM0+ core of the PSoC 6(63xx) MCU suitable for use with MBed OS applications running on CM4 core. Two images are available:
5+
* `psoc63_m0_default_1.01.hex`
6+
7+
This image contains basic code, that brings up the chip, starts CM4 core and puts CM0+ core into a deep sleep. It is suitable for use with all Mbed applications except those intendif to use BLE feature.
8+
9+
* `psoc63_m0_ble_controller_1.01.hex`
10+
11+
This image brings up the chip, starts CM4 core and runs BLE HCI controller for the build-in BLE device. This image is suitable for use with Mbed BLE applications.
12+
13+
The images are 'bare metal' code prepared with Cypress PSoC Creator IDE and are toolchain agnostic, i.e. can be used with CM4 Mbed applications build with any supported toolchain.
14+
15+
**These images were prepared by Future Electronics and are made available under the conditions of Permissive Binary Licence, see file LICENSE.txt**

0 commit comments

Comments
 (0)