Skip to content

Commit b641cbe

Browse files
Fix Cypress targets to use new form factor names as the old FF was producing #defines that clashed with USB code
1 parent 1eaf7dc commit b641cbe

File tree

5 files changed

+78
-121
lines changed

5 files changed

+78
-121
lines changed

.github/workflows/greentea_cmake.yml

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Compile Check
22
on: [pull_request]
33

44
jobs:
5-
build-greentea-with-cmake:
5+
greentea-tests:
66
runs-on: ubuntu-latest
77
container: ghcr.io/armmbed/mbed-os-env:master-latest
88

@@ -18,119 +18,119 @@ jobs:
1818

1919
# NXP MCUs
2020
- target: LPC1768
21-
baremetal: 0
21+
profile: full
2222
- target: LPC546XX
23-
baremetal: 0
23+
profile: full
2424
- target: MIMXRT1060_EVK
25-
baremetal: 0
25+
profile: full
2626
- target: MIMXRT1170_EVK
27-
baremetal: 0
27+
profile: full
2828

2929
# Freescale MCUs
3030
- target: K64F
31-
baremetal: 0
31+
profile: full
3232
- target: KL43Z
33-
baremetal: 0
33+
profile: full
3434
- target: KW41Z
35-
baremetal: 0
35+
profile: full
3636

3737
# STM32 MCUs
3838
- target: NUCLEO_F091RC
39-
baremetal: 0
39+
profile: full
4040
- target: NUCLEO_F103RB
41-
baremetal: 1
41+
profile: baremetal
4242
- target: NUCLEO_F207ZG
43-
baremetal: 0
43+
profile: full
4444
- target: NUCLEO_F303RE
45-
baremetal: 0
45+
profile: full
4646
- target: NUCLEO_F429ZI
47-
baremetal: 0
47+
profile: full
4848
- target: NUCLEO_F767ZI
49-
baremetal: 0
49+
profile: full
5050
- target: NUCLEO_G031K8
51-
baremetal: 1
51+
profile: baremetal
5252
- target: NUCLEO_G431RB
53-
baremetal: 0
53+
profile: full
5454
- target: NUCLEO_H563ZI
55-
baremetal: 0
55+
profile: full
5656
- target: NUCLEO_H745ZI_Q_CM7
57-
baremetal: 0
57+
profile: full
5858
- target: DISCO_L072CZ_LRWAN1
59-
baremetal: 1
59+
profile: baremetal
6060
- target: XDOT_L151CC
61-
baremetal: 0
61+
profile: full
6262
- target: DISCO_L4R9I
63-
baremetal: 0
63+
profile: full
6464
- target: DISCO_L562QE
65-
baremetal: 0
65+
profile: full
6666
- target: B_U585I_IOT02A
67-
baremetal: 0
67+
profile: full
6868
- target: NUCLEO_WB55RG
69-
baremetal: 0
69+
profile: full
7070
- target: NUCLEO_WL55JC
71-
baremetal: 0
71+
profile: full
7272

7373
# Maxim MCUs
7474
- target: MAX32625MBED
75-
baremetal: 0
75+
profile: full
7676
- target: XDOT_MAX32670
77-
baremetal: 0
77+
profile: full
7878

7979
# Nuvoton MCUs
8080
- target: NUMAKER_PFM_NANO130
81-
baremetal: 1
81+
profile: baremetal
8282
- target: NUMAKER_PFM_M487
83-
baremetal: 0
83+
profile: full
8484
- target: NU_M2354
85-
baremetal: 0
85+
profile: full
8686

8787
# Samsung MCUs
8888
- target: S1SBP6A
89-
baremetal: 0
89+
profile: full
9090

9191
# nRF MCUs
9292
- target: NRF52840_DK
93-
baremetal: 0
93+
profile: full
9494
- target: ARDUINO_NICLA_SENSE_ME
95-
baremetal: 0
95+
profile: full
9696

9797
# Toshiba MCUs
9898
- target: TMPM4NR
99-
baremetal: 0
99+
profile: full
100100

101101
# Renesas MCUs
102102
- target: GR_MANGO
103-
baremetal: 0
103+
profile: full
104104
- target: RZ_A1H
105-
baremetal: 0
105+
profile: full
106106

107107
# Ambiq MCUs
108108
- target: SFE_ARTEMIS_DK
109-
baremetal: 0
109+
profile: full
110110

111111
# Infineon/Cypress MCUs
112112
- target: CY8CKIT_062S2_43012
113-
baremetal: 0
113+
profile: full
114114
- target: CYTFM_064B0S2_4343W
115-
baremetal: 0
115+
profile: full
116116

117117
# Analog Devices MCUs
118118
- target: EV_COG_AD4050LZ
119-
baremetal: 0
119+
profile: full
120120

121121
# GigaDevices MCUs
122122
- target: GD32_F307VG
123-
baremetal: 0
123+
profile: full
124124
- target: GD32_F450ZI
125-
baremetal: 0
125+
profile: full
126126

127127
# SiLabs MCUs
128128
- target: EFM32GG11_STK3701
129-
baremetal: 0
129+
profile: full
130130

131131
# Raspberry Pi MCUs
132132
- target: RASPBERRY_PI_PICO
133-
baremetal: 0
133+
profile: full
134134

135135
steps:
136136
- name: Checkout
@@ -142,14 +142,14 @@ jobs:
142142
apt-get install -y python3-venv
143143
144144
- name: Build ${{ matrix.target }} with baremetal profile
145-
if: ${{ matrix.baremetal == 1 }}
145+
if: ${{ matrix.profile == 'baremetal' }}
146146
run: |
147147
rm -rf __build
148148
cmake -S . -B __build -GNinja -DUPLOAD_METHOD=NONE -DCMAKE_CTEST_ARGUMENTS="--output-on-failure;-V" -DMBED_BUILD_GREENTEA_TESTS=ON -DMBED_GREENTEA_TEST_BAREMETAL=ON -DMBED_GREENTEA_SERIAL_PORT=/dev/ttyDUMMY -DMBED_TARGET=${{ matrix.target }} -DMBED_APP_JSON_PATH=TESTS/configs/baremetal.json
149149
cmake --build __build
150150
151151
- name: Build ${{ matrix.target }} with full profile
152-
if: ${{ matrix.baremetal == 0 }}
152+
if: ${{ matrix.profile == 'full' }}
153153
run: |
154154
rm -rf __build
155155
cmake -S . -B __build -GNinja -DUPLOAD_METHOD=NONE -DCMAKE_CTEST_ARGUMENTS="--output-on-failure;-V" -DMBED_BUILD_GREENTEA_TESTS=ON -DMBED_GREENTEA_SERIAL_PORT=/dev/ttyDUMMY -DMBED_TARGET=${{ matrix.target }}

drivers/usb/source/USBDevice.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1774,8 +1774,7 @@ void USBDevice::_run_later(void (USBDevice::*function)())
17741774

17751775
void USBDevice::_clear_endpoints()
17761776
{
1777-
for(auto & info : _endpoint_info)
1778-
{
1777+
for (auto & info : _endpoint_info) {
17791778
info = endpoint_info_t{};
17801779
}
17811780
}

drivers/usb/tests/TESTS/usb_device/msd/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ void mount_unmount_test(BlockDevice *bd, FileSystem *fs)
341341
TEST_ASSERT_EQUAL_STRING_LOOP("passed", _key, i);
342342

343343
// wait for unmount event (set 10s timeout)
344-
media_remove_event.try_acquire_for(10000);
344+
media_remove_event.try_acquire_for(10s);
345345
if (!usb.media_removed()) {
346346
TEST_ASSERT_EQUAL_LOOP(true, usb.media_removed(), i);
347347
}

targets/TARGET_Cypress/TARGET_PSOC6/PinNames.h

Lines changed: 23 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -152,71 +152,29 @@
152152
#endif
153153

154154
// Arduino Header
155-
#ifdef CYBSP_A0
156-
#define A0 CYBSP_A0
157-
#endif
158-
#ifdef CYBSP_A1
159-
#define A1 CYBSP_A1
160-
#endif
161-
#ifdef CYBSP_A2
162-
#define A2 CYBSP_A2
163-
#endif
164-
#ifdef CYBSP_A3
165-
#define A3 CYBSP_A3
166-
#endif
167-
#ifdef CYBSP_A4
168-
#define A4 CYBSP_A4
169-
#endif
170-
#ifdef CYBSP_A5
171-
#define A5 CYBSP_A5
172-
#endif
173-
#ifdef CYBSP_D0
174-
#define D0 CYBSP_D0
175-
#endif
176-
#ifdef CYBSP_D1
177-
#define D1 CYBSP_D1
178-
#endif
179-
#ifdef CYBSP_D2
180-
#define D2 CYBSP_D2
181-
#endif
182-
#ifdef CYBSP_D3
183-
#define D3 CYBSP_D3
184-
#endif
185-
#ifdef CYBSP_D4
186-
#define D4 CYBSP_D4
187-
#endif
188-
#ifdef CYBSP_D5
189-
#define D5 CYBSP_D5
190-
#endif
191-
#ifdef CYBSP_D6
192-
#define D6 CYBSP_D6
193-
#endif
194-
#ifdef CYBSP_D7
195-
#define D7 CYBSP_D7
196-
#endif
197-
#ifdef CYBSP_D8
198-
#define D8 CYBSP_D8
199-
#endif
200-
#ifdef CYBSP_D9
201-
#define D9 CYBSP_D9
202-
#endif
203-
#ifdef CYBSP_D10
204-
#define D10 CYBSP_D10
205-
#endif
206-
#ifdef CYBSP_D11
207-
#define D11 CYBSP_D11
208-
#endif
209-
#ifdef CYBSP_D12
210-
#define D12 CYBSP_D12
211-
#endif
212-
#ifdef CYBSP_D13
213-
#define D13 CYBSP_D13
214-
#endif
215-
#ifdef CYBSP_D14
216-
#define D14 CYBSP_D14
217-
#endif
218-
#ifdef CYBSP_D15
219-
#define D15 CYBSP_D15
155+
#ifdef TARGET_FF_ARDUINO_UNO
156+
#define ARDUINO_UNO_A0 CYBSP_A0
157+
#define ARDUINO_UNO_A1 CYBSP_A1
158+
#define ARDUINO_UNO_A2 CYBSP_A2
159+
#define ARDUINO_UNO_A3 CYBSP_A3
160+
#define ARDUINO_UNO_A4 CYBSP_A4
161+
#define ARDUINO_UNO_A5 CYBSP_A5
162+
#define ARDUINO_UNO_D0 CYBSP_D0
163+
#define ARDUINO_UNO_D1 CYBSP_D1
164+
#define ARDUINO_UNO_D2 CYBSP_D2
165+
#define ARDUINO_UNO_D3 CYBSP_D3
166+
#define ARDUINO_UNO_D4 CYBSP_D4
167+
#define ARDUINO_UNO_D5 CYBSP_D5
168+
#define ARDUINO_UNO_D6 CYBSP_D6
169+
#define ARDUINO_UNO_D7 CYBSP_D7
170+
#define ARDUINO_UNO_D8 CYBSP_D8
171+
#define ARDUINO_UNO_D9 CYBSP_D9
172+
#define ARDUINO_UNO_D10 CYBSP_D10
173+
#define ARDUINO_UNO_D11 CYBSP_D11
174+
#define ARDUINO_UNO_D12 CYBSP_D12
175+
#define ARDUINO_UNO_D13 CYBSP_D13
176+
#define ARDUINO_UNO_D14 CYBSP_D14
177+
#define ARDUINO_UNO_D15 CYBSP_D15
220178
#endif
221179

222180
#endif // MBED_PINNAMES_H

targets/targets.json5

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8867,7 +8867,7 @@
88678867
"CYW43XXX"
88688868
],
88698869
"supported_form_factors": [
8870-
"ARDUINO"
8870+
"ARDUINO_UNO"
88718871
],
88728872
"device_has_remove": [
88738873
"ANALOGOUT"
@@ -8955,7 +8955,7 @@
89558955
"CYW43XXX",
89568956
],
89578957
"supported_form_factors": [
8958-
"ARDUINO"
8958+
"ARDUINO_UNO"
89598959
],
89608960
"extra_labels_add": [
89618961
"PSOC6_01",
@@ -9002,7 +9002,7 @@
90029002
"USBDEVICE"
90039003
],
90049004
"supported_form_factors": [
9005-
"ARDUINO"
9005+
"ARDUINO_UNO"
90069006
],
90079007
"extra_labels_add": [
90089008
"PSOC6_01",
@@ -9041,7 +9041,7 @@
90419041
"BLE"
90429042
],
90439043
"supported_form_factors": [
9044-
"ARDUINO"
9044+
"ARDUINO_UNO"
90459045
],
90469046
"components_add": [
90479047
"WHD",
@@ -9095,7 +9095,7 @@
90959095
"BLE"
90969096
],
90979097
"supported_form_factors": [
9098-
"ARDUINO"
9098+
"ARDUINO_UNO"
90999099
],
91009100
"components_add": [
91019101
"WHD",
@@ -9139,7 +9139,7 @@
91399139
"MCU_PSOC6_M4"
91409140
],
91419141
"supported_form_factors": [
9142-
"ARDUINO"
9142+
"ARDUINO_UNO"
91439143
],
91449144
"features": [
91459145
"BLE"
@@ -9193,7 +9193,7 @@
91939193
"MCU_PSOC6_M4"
91949194
],
91959195
"supported_form_factors": [
9196-
"ARDUINO"
9196+
"ARDUINO_UNO"
91979197
],
91989198
"features_add": [
91999199
"BLE",

0 commit comments

Comments
 (0)