Skip to content

Commit

Permalink
Fix Cypress targets to use new form factor names as the old FF was pr…
Browse files Browse the repository at this point in the history
…oducing #defines that clashed with USB code
  • Loading branch information
multiplemonomials committed Sep 22, 2024
1 parent 8bf0fbb commit 9b4e213
Show file tree
Hide file tree
Showing 5 changed files with 78 additions and 121 deletions.
92 changes: 46 additions & 46 deletions .github/workflows/greentea_cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Compile Check
on: [pull_request]

jobs:
build-greentea-with-cmake:
greentea-tests:
runs-on: ubuntu-latest
container: ghcr.io/armmbed/mbed-os-env:master-latest

Expand All @@ -18,119 +18,119 @@ jobs:

# NXP MCUs
- target: LPC1768
baremetal: 0
profile: full
- target: LPC546XX
baremetal: 0
profile: full
- target: MIMXRT1060_EVK
baremetal: 0
profile: full
- target: MIMXRT1170_EVK
baremetal: 0
profile: full

# Freescale MCUs
- target: K64F
baremetal: 0
profile: full
- target: KL43Z
baremetal: 0
profile: full
- target: KW41Z
baremetal: 0
profile: full

# STM32 MCUs
- target: NUCLEO_F091RC
baremetal: 0
profile: full
- target: NUCLEO_F103RB
baremetal: 1
profile: baremetal
- target: NUCLEO_F207ZG
baremetal: 0
profile: full
- target: NUCLEO_F303RE
baremetal: 0
profile: full
- target: NUCLEO_F429ZI
baremetal: 0
profile: full
- target: NUCLEO_F767ZI
baremetal: 0
profile: full
- target: NUCLEO_G031K8
baremetal: 1
profile: baremetal
- target: NUCLEO_G431RB
baremetal: 0
profile: full
- target: NUCLEO_H563ZI
baremetal: 0
profile: full
- target: NUCLEO_H745ZI_Q_CM7
baremetal: 0
profile: full
- target: DISCO_L072CZ_LRWAN1
baremetal: 1
profile: baremetal
- target: XDOT_L151CC
baremetal: 0
profile: full
- target: DISCO_L4R9I
baremetal: 0
profile: full
- target: DISCO_L562QE
baremetal: 0
profile: full
- target: B_U585I_IOT02A
baremetal: 0
profile: full
- target: NUCLEO_WB55RG
baremetal: 0
profile: full
- target: NUCLEO_WL55JC
baremetal: 0
profile: full

# Maxim MCUs
- target: MAX32625MBED
baremetal: 0
profile: full
- target: XDOT_MAX32670
baremetal: 0
profile: full

# Nuvoton MCUs
- target: NUMAKER_PFM_NANO130
baremetal: 1
profile: baremetal
- target: NUMAKER_PFM_M487
baremetal: 0
profile: full
- target: NU_M2354
baremetal: 0
profile: full

# Samsung MCUs
- target: S1SBP6A
baremetal: 0
profile: full

# nRF MCUs
- target: NRF52840_DK
baremetal: 0
profile: full
- target: ARDUINO_NICLA_SENSE_ME
baremetal: 0
profile: full

# Toshiba MCUs
- target: TMPM4NR
baremetal: 0
profile: full

# Renesas MCUs
- target: GR_MANGO
baremetal: 0
profile: full
- target: RZ_A1H
baremetal: 0
profile: full

# Ambiq MCUs
- target: SFE_ARTEMIS_DK
baremetal: 0
profile: full

# Infineon/Cypress MCUs
- target: CY8CKIT_062S2_43012
baremetal: 0
profile: full
- target: CYTFM_064B0S2_4343W
baremetal: 0
profile: full

# Analog Devices MCUs
- target: EV_COG_AD4050LZ
baremetal: 0
profile: full

# GigaDevices MCUs
- target: GD32_F307VG
baremetal: 0
profile: full
- target: GD32_F450ZI
baremetal: 0
profile: full

# SiLabs MCUs
- target: EFM32GG11_STK3701
baremetal: 0
profile: full

# Raspberry Pi MCUs
- target: RASPBERRY_PI_PICO
baremetal: 0
profile: full

steps:
- name: Checkout
Expand All @@ -142,14 +142,14 @@ jobs:
apt-get install -y python3-venv
- name: Build ${{ matrix.target }} with baremetal profile
if: ${{ matrix.baremetal == 1 }}
if: ${{ matrix.profile == 'baremetal' }}
run: |
rm -rf __build
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
cmake --build __build
- name: Build ${{ matrix.target }} with full profile
if: ${{ matrix.baremetal == 0 }}
if: ${{ matrix.profile == 'full' }}
run: |
rm -rf __build
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 }}
Expand Down
3 changes: 1 addition & 2 deletions drivers/usb/source/USBDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1774,8 +1774,7 @@ void USBDevice::_run_later(void (USBDevice::*function)())

void USBDevice::_clear_endpoints()
{
for(auto & info : _endpoint_info)
{
for (auto & info : _endpoint_info) {
info = endpoint_info_t{};
}
}
2 changes: 1 addition & 1 deletion drivers/usb/tests/TESTS/usb_device/msd/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ void mount_unmount_test(BlockDevice *bd, FileSystem *fs)
TEST_ASSERT_EQUAL_STRING_LOOP("passed", _key, i);

// wait for unmount event (set 10s timeout)
media_remove_event.try_acquire_for(10000);
media_remove_event.try_acquire_for(10s);
if (!usb.media_removed()) {
TEST_ASSERT_EQUAL_LOOP(true, usb.media_removed(), i);
}
Expand Down
88 changes: 23 additions & 65 deletions targets/TARGET_Cypress/TARGET_PSOC6/PinNames.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,71 +152,29 @@
#endif

// Arduino Header
#ifdef CYBSP_A0
#define A0 CYBSP_A0
#endif
#ifdef CYBSP_A1
#define A1 CYBSP_A1
#endif
#ifdef CYBSP_A2
#define A2 CYBSP_A2
#endif
#ifdef CYBSP_A3
#define A3 CYBSP_A3
#endif
#ifdef CYBSP_A4
#define A4 CYBSP_A4
#endif
#ifdef CYBSP_A5
#define A5 CYBSP_A5
#endif
#ifdef CYBSP_D0
#define D0 CYBSP_D0
#endif
#ifdef CYBSP_D1
#define D1 CYBSP_D1
#endif
#ifdef CYBSP_D2
#define D2 CYBSP_D2
#endif
#ifdef CYBSP_D3
#define D3 CYBSP_D3
#endif
#ifdef CYBSP_D4
#define D4 CYBSP_D4
#endif
#ifdef CYBSP_D5
#define D5 CYBSP_D5
#endif
#ifdef CYBSP_D6
#define D6 CYBSP_D6
#endif
#ifdef CYBSP_D7
#define D7 CYBSP_D7
#endif
#ifdef CYBSP_D8
#define D8 CYBSP_D8
#endif
#ifdef CYBSP_D9
#define D9 CYBSP_D9
#endif
#ifdef CYBSP_D10
#define D10 CYBSP_D10
#endif
#ifdef CYBSP_D11
#define D11 CYBSP_D11
#endif
#ifdef CYBSP_D12
#define D12 CYBSP_D12
#endif
#ifdef CYBSP_D13
#define D13 CYBSP_D13
#endif
#ifdef CYBSP_D14
#define D14 CYBSP_D14
#endif
#ifdef CYBSP_D15
#define D15 CYBSP_D15
#ifdef TARGET_FF_ARDUINO_UNO
#define ARDUINO_UNO_A0 CYBSP_A0
#define ARDUINO_UNO_A1 CYBSP_A1
#define ARDUINO_UNO_A2 CYBSP_A2
#define ARDUINO_UNO_A3 CYBSP_A3
#define ARDUINO_UNO_A4 CYBSP_A4
#define ARDUINO_UNO_A5 CYBSP_A5
#define ARDUINO_UNO_D0 CYBSP_D0
#define ARDUINO_UNO_D1 CYBSP_D1
#define ARDUINO_UNO_D2 CYBSP_D2
#define ARDUINO_UNO_D3 CYBSP_D3
#define ARDUINO_UNO_D4 CYBSP_D4
#define ARDUINO_UNO_D5 CYBSP_D5
#define ARDUINO_UNO_D6 CYBSP_D6
#define ARDUINO_UNO_D7 CYBSP_D7
#define ARDUINO_UNO_D8 CYBSP_D8
#define ARDUINO_UNO_D9 CYBSP_D9
#define ARDUINO_UNO_D10 CYBSP_D10
#define ARDUINO_UNO_D11 CYBSP_D11
#define ARDUINO_UNO_D12 CYBSP_D12
#define ARDUINO_UNO_D13 CYBSP_D13
#define ARDUINO_UNO_D14 CYBSP_D14
#define ARDUINO_UNO_D15 CYBSP_D15
#endif

#endif // MBED_PINNAMES_H
14 changes: 7 additions & 7 deletions targets/targets.json5
Original file line number Diff line number Diff line change
Expand Up @@ -8867,7 +8867,7 @@
"CYW43XXX"
],
"supported_form_factors": [
"ARDUINO"
"ARDUINO_UNO"
],
"device_has_remove": [
"ANALOGOUT"
Expand Down Expand Up @@ -8955,7 +8955,7 @@
"CYW43XXX",
],
"supported_form_factors": [
"ARDUINO"
"ARDUINO_UNO"
],
"extra_labels_add": [
"PSOC6_01",
Expand Down Expand Up @@ -9002,7 +9002,7 @@
"USBDEVICE"
],
"supported_form_factors": [
"ARDUINO"
"ARDUINO_UNO"
],
"extra_labels_add": [
"PSOC6_01",
Expand Down Expand Up @@ -9041,7 +9041,7 @@
"BLE"
],
"supported_form_factors": [
"ARDUINO"
"ARDUINO_UNO"
],
"components_add": [
"WHD",
Expand Down Expand Up @@ -9095,7 +9095,7 @@
"BLE"
],
"supported_form_factors": [
"ARDUINO"
"ARDUINO_UNO"
],
"components_add": [
"WHD",
Expand Down Expand Up @@ -9139,7 +9139,7 @@
"MCU_PSOC6_M4"
],
"supported_form_factors": [
"ARDUINO"
"ARDUINO_UNO"
],
"features": [
"BLE"
Expand Down Expand Up @@ -9193,7 +9193,7 @@
"MCU_PSOC6_M4"
],
"supported_form_factors": [
"ARDUINO"
"ARDUINO_UNO"
],
"features_add": [
"BLE",
Expand Down

0 comments on commit 9b4e213

Please sign in to comment.