Skip to content

Commit 95f6df1

Browse files
committed
Add extra labels for Freescale & STM EMAC drivers
Just checking "does the chip have an EMAC" doesn't work - there are targets using those chips which do not have an Ethernet connector and don't provide the necessary surrounding infrastructure (eg DISCO_F429ZI, not providing the board emac config call, and HEXIWEAR not providing PHY info). Make the targets that actually do want EMAC define their own local Freescale_EMAC and STM_EMAC labels, and move the drivers into the corresponding TARGET_ directories, removing the #ifdefs.
1 parent de3234c commit 95f6df1

File tree

31 files changed

+12
-20
lines changed

31 files changed

+12
-20
lines changed

features/netsocket/emac-drivers/TARGET_Freescale/k64f_emac.cpp renamed to features/netsocket/emac-drivers/TARGET_Freescale_EMAC/k64f_emac.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@
4242
#include "netsocket/nsapi_types.h"
4343
#include "mbed_shared_queues.h"
4444

45-
#ifdef ENET_BASE
46-
4745
#include "fsl_phy.h"
4846

4947
#include "k64f_emac_config.h"
@@ -614,7 +612,5 @@ MBED_WEAK EMAC &EMAC::get_default_instance() {
614612
* @}
615613
*/
616614

617-
#endif // ENET_BASE
618-
619615
/* --------------------------------- End Of File ------------------------------ */
620616

features/netsocket/emac-drivers/TARGET_STM/stm32xx_emac.cpp renamed to features/netsocket/emac-drivers/TARGET_STM_EMAC/stm32xx_emac.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
#include "mbed_shared_queues.h"
88
#include "netsocket/nsapi_types.h"
99

10-
#ifdef ETH_BASE
11-
1210
#include "stm32xx_emac_config.h"
1311
#include "stm32xx_emac.h"
1412

@@ -569,5 +567,3 @@ STM32_EMAC &STM32_EMAC::get_instance() {
569567
MBED_WEAK EMAC &EMAC::get_default_instance() {
570568
return STM32_EMAC::get_instance();
571569
}
572-
573-
#endif

targets/targets.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@
603603
"supported_form_factors": ["ARDUINO"],
604604
"core": "Cortex-M4F",
605605
"supported_toolchains": ["ARM", "GCC_ARM", "IAR"],
606-
"extra_labels": ["Freescale", "MCUXpresso_MCUS", "KSDK2_MCUS", "FRDM", "KPSDK_MCUS", "KPSDK_CODE", "MCU_K64F"],
606+
"extra_labels": ["Freescale", "MCUXpresso_MCUS", "KSDK2_MCUS", "FRDM", "KPSDK_MCUS", "KPSDK_CODE", "MCU_K64F", "Freescale_EMAC"],
607607
"is_disk_virtual": true,
608608
"macros": ["CPU_MK64FN1M0VMD12", "FSL_RTOS_MBED"],
609609
"inherits": ["Target"],
@@ -665,7 +665,7 @@
665665
"supported_form_factors": ["ARDUINO"],
666666
"core": "Cortex-M4F",
667667
"supported_toolchains": ["ARM", "GCC_ARM", "IAR"],
668-
"extra_labels": ["Freescale", "MCUXpresso_MCUS", "KSDK2_MCUS", "FRDM"],
668+
"extra_labels": ["Freescale", "MCUXpresso_MCUS", "KSDK2_MCUS", "FRDM", "Freescale_EMAC"],
669669
"is_disk_virtual": true,
670670
"macros": ["CPU_MK66FN2M0VMD18", "FSL_RTOS_MBED"],
671671
"inherits": ["Target"],
@@ -904,7 +904,7 @@
904904
"inherits": ["FAMILY_STM32"],
905905
"supported_form_factors": ["ARDUINO", "MORPHO"],
906906
"core": "Cortex-M3",
907-
"extra_labels_add": ["STM32F2", "STM32F207ZG"],
907+
"extra_labels_add": ["STM32F2", "STM32F207ZG", "STM_EMAC"],
908908
"config": {
909909
"d11_configuration": {
910910
"help": "Value: PA_7 for the default board configuration, PB_5 in case of solder bridge update (SB121 off/ SB122 on)",
@@ -1219,7 +1219,7 @@
12191219
"macro_name": "CLOCK_SOURCE_USB"
12201220
}
12211221
},
1222-
"extra_labels_add": ["STM32F4", "STM32F429", "STM32F429ZI", "STM32F429xx", "STM32F429xI"],
1222+
"extra_labels_add": ["STM32F4", "STM32F429", "STM32F429ZI", "STM32F429xx", "STM32F429xI", "STM_EMAC"],
12231223
"macros_add": ["USB_STM_HAL", "USBHOST_OTHER"],
12241224
"device_has_add": ["ANALOGOUT", "CAN", "EMAC", "LOWPOWERTIMER", "SERIAL_ASYNCH", "SERIAL_FC", "TRNG", "FLASH"],
12251225
"detect_code": ["0796"],
@@ -1249,7 +1249,7 @@
12491249
"macro_name": "CLOCK_SOURCE_USB"
12501250
}
12511251
},
1252-
"extra_labels_add": ["STM32F4", "STM32F439", "STM32F439ZI", "STM32F439xx", "STM32F439xI"],
1252+
"extra_labels_add": ["STM32F4", "STM32F439", "STM32F439ZI", "STM32F439xx", "STM32F439xI", "STM_EMAC"],
12531253
"macros_add": ["MBEDTLS_CONFIG_HW_SUPPORT", "USB_STM_HAL", "USBHOST_OTHER"],
12541254
"device_has_add": ["ANALOGOUT", "CAN", "EMAC", "LOWPOWERTIMER", "SERIAL_FC", "TRNG", "FLASH"],
12551255
"detect_code": ["0797"],
@@ -1308,7 +1308,7 @@
13081308
"NUCLEO_F746ZG": {
13091309
"inherits": ["FAMILY_STM32"],
13101310
"core": "Cortex-M7F",
1311-
"extra_labels_add": ["STM32F7", "STM32F746", "STM32F746xG", "STM32F746ZG"],
1311+
"extra_labels_add": ["STM32F7", "STM32F746", "STM32F746xG", "STM32F746ZG", "STM_EMAC"],
13121312
"config": {
13131313
"d11_configuration": {
13141314
"help": "Value: PA_7 for the default board configuration, PB_5 in case of solder bridge update (SB121 off/ SB122 on)",
@@ -1337,7 +1337,7 @@
13371337
"NUCLEO_F756ZG": {
13381338
"inherits": ["FAMILY_STM32"],
13391339
"core": "Cortex-M7F",
1340-
"extra_labels_add": ["STM32F7", "STM32F756", "STM32F756xG", "STM32F756ZG"],
1340+
"extra_labels_add": ["STM32F7", "STM32F756", "STM32F756xG", "STM32F756ZG", "STM_EMAC"],
13411341
"config": {
13421342
"d11_configuration": {
13431343
"help": "Value: PA_7 for the default board configuration, PB_5 in case of solder bridge update (SB121 off/ SB122 on)",
@@ -1365,7 +1365,7 @@
13651365
"NUCLEO_F767ZI": {
13661366
"inherits": ["FAMILY_STM32"],
13671367
"core": "Cortex-M7FD",
1368-
"extra_labels_add": ["STM32F7", "STM32F767", "STM32F767xI", "STM32F767ZI"],
1368+
"extra_labels_add": ["STM32F7", "STM32F767", "STM32F767xI", "STM32F767ZI", "STM_EMAC"],
13691369
"config": {
13701370
"d11_configuration": {
13711371
"help": "Value: PA_7 for the default board configuration, PB_5 in case of solder bridge update (SB121 off/ SB122 on)",
@@ -1827,7 +1827,7 @@
18271827
"DISCO_F746NG": {
18281828
"inherits": ["FAMILY_STM32"],
18291829
"core": "Cortex-M7F",
1830-
"extra_labels_add": ["STM32F7", "STM32F746", "STM32F746xG", "STM32F746NG"],
1830+
"extra_labels_add": ["STM32F7", "STM32F746", "STM32F746xG", "STM32F746NG", "STM_EMAC"],
18311831
"supported_form_factors": ["ARDUINO"],
18321832
"config": {
18331833
"clock_source": {
@@ -1854,7 +1854,7 @@
18541854
"DISCO_F769NI": {
18551855
"inherits": ["FAMILY_STM32"],
18561856
"core": "Cortex-M7FD",
1857-
"extra_labels_add": ["STM32F7", "STM32F769", "STM32F769xI", "STM32F769NI"],
1857+
"extra_labels_add": ["STM32F7", "STM32F769", "STM32F769xI", "STM32F769NI", "STM_EMAC"],
18581858
"supported_form_factors": ["ARDUINO"],
18591859
"config": {
18601860
"clock_source": {
@@ -2074,7 +2074,7 @@
20742074
"MODULE_UBLOX_ODIN_W2": {
20752075
"inherits": ["FAMILY_STM32"],
20762076
"core": "Cortex-M4F",
2077-
"extra_labels_add": ["STM32F4", "STM32F439", "STM32F439ZI","STM32F439xx", "STM32F439xI"],
2077+
"extra_labels_add": ["STM32F4", "STM32F439", "STM32F439ZI","STM32F439xx", "STM32F439xI", "STM_EMAC"],
20782078
"macros": ["MBEDTLS_CONFIG_HW_SUPPORT", "HSE_VALUE=24000000", "HSE_STARTUP_TIMEOUT=5000", "CB_INTERFACE_SDIO","CB_CHIP_WL18XX","SUPPORT_80211D_ALWAYS","WLAN_ENABLED","MBEDTLS_ARC4_C","MBEDTLS_DES_C","MBEDTLS_MD4_C","MBEDTLS_MD5_C","MBEDTLS_SHA1_C"],
20792079
"device_has_add": ["CAN", "EMAC", "TRNG", "FLASH"],
20802080
"device_has_remove": ["RTC", "SLEEP"],
@@ -2125,7 +2125,7 @@
21252125
"supported_form_factors": ["ARDUINO"],
21262126
"core": "Cortex-M4F",
21272127
"supported_toolchains": ["GCC_ARM", "ARM", "IAR"],
2128-
"extra_labels_add": ["STM32F4", "STM32F437", "STM32F437VG", "STM32F437xx", "STM32F437xG"],
2128+
"extra_labels_add": ["STM32F4", "STM32F437", "STM32F437VG", "STM32F437xx", "STM32F437xG", "STM_EMAC"],
21292129
"config": {
21302130
"modem_is_on_board": {
21312131
"help": "Value: Tells the build system that the modem is on-board as oppose to a plug-in shield/module.",

0 commit comments

Comments
 (0)