Skip to content

Commit 046a20b

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 322fbac commit 046a20b

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
@@ -610,7 +610,7 @@
610610
"supported_form_factors": ["ARDUINO"],
611611
"core": "Cortex-M4F",
612612
"supported_toolchains": ["ARM", "GCC_ARM", "IAR"],
613-
"extra_labels": ["Freescale", "MCUXpresso_MCUS", "KSDK2_MCUS", "FRDM", "KPSDK_MCUS", "KPSDK_CODE", "MCU_K64F"],
613+
"extra_labels": ["Freescale", "MCUXpresso_MCUS", "KSDK2_MCUS", "FRDM", "KPSDK_MCUS", "KPSDK_CODE", "MCU_K64F", "Freescale_EMAC"],
614614
"is_disk_virtual": true,
615615
"macros": ["CPU_MK64FN1M0VMD12", "FSL_RTOS_MBED"],
616616
"inherits": ["Target"],
@@ -674,7 +674,7 @@
674674
"supported_form_factors": ["ARDUINO"],
675675
"core": "Cortex-M4F",
676676
"supported_toolchains": ["ARM", "GCC_ARM", "IAR"],
677-
"extra_labels": ["Freescale", "MCUXpresso_MCUS", "KSDK2_MCUS", "FRDM"],
677+
"extra_labels": ["Freescale", "MCUXpresso_MCUS", "KSDK2_MCUS", "FRDM", "Freescale_EMAC"],
678678
"is_disk_virtual": true,
679679
"macros": ["CPU_MK66FN2M0VMD18", "FSL_RTOS_MBED"],
680680
"inherits": ["Target"],
@@ -913,7 +913,7 @@
913913
"inherits": ["FAMILY_STM32"],
914914
"supported_form_factors": ["ARDUINO", "MORPHO"],
915915
"core": "Cortex-M3",
916-
"extra_labels_add": ["STM32F2", "STM32F207ZG"],
916+
"extra_labels_add": ["STM32F2", "STM32F207ZG", "STM_EMAC"],
917917
"config": {
918918
"d11_configuration": {
919919
"help": "Value: PA_7 for the default board configuration, PB_5 in case of solder bridge update (SB121 off/ SB122 on)",
@@ -1239,7 +1239,7 @@
12391239
"macro_name": "CLOCK_SOURCE_USB"
12401240
}
12411241
},
1242-
"extra_labels_add": ["STM32F4", "STM32F429", "STM32F429ZI", "STM32F429xx", "STM32F429xI"],
1242+
"extra_labels_add": ["STM32F4", "STM32F429", "STM32F429ZI", "STM32F429xx", "STM32F429xI", "STM_EMAC"],
12431243
"macros_add": ["USB_STM_HAL", "USBHOST_OTHER"],
12441244
"device_has_add": ["ANALOGOUT", "CAN", "EMAC", "LOWPOWERTIMER", "SERIAL_ASYNCH", "SERIAL_FC", "TRNG", "FLASH"],
12451245
"detect_code": ["0796"],
@@ -1269,7 +1269,7 @@
12691269
"macro_name": "CLOCK_SOURCE_USB"
12701270
}
12711271
},
1272-
"extra_labels_add": ["STM32F4", "STM32F439", "STM32F439ZI", "STM32F439xx", "STM32F439xI"],
1272+
"extra_labels_add": ["STM32F4", "STM32F439", "STM32F439ZI", "STM32F439xx", "STM32F439xI", "STM_EMAC"],
12731273
"macros_add": ["MBEDTLS_CONFIG_HW_SUPPORT", "USB_STM_HAL", "USBHOST_OTHER"],
12741274
"device_has_add": ["ANALOGOUT", "CAN", "EMAC", "LOWPOWERTIMER", "SERIAL_FC", "TRNG", "FLASH"],
12751275
"detect_code": ["0797"],
@@ -1328,7 +1328,7 @@
13281328
"NUCLEO_F746ZG": {
13291329
"inherits": ["FAMILY_STM32"],
13301330
"core": "Cortex-M7F",
1331-
"extra_labels_add": ["STM32F7", "STM32F746", "STM32F746xG", "STM32F746ZG"],
1331+
"extra_labels_add": ["STM32F7", "STM32F746", "STM32F746xG", "STM32F746ZG", "STM_EMAC"],
13321332
"config": {
13331333
"d11_configuration": {
13341334
"help": "Value: PA_7 for the default board configuration, PB_5 in case of solder bridge update (SB121 off/ SB122 on)",
@@ -1357,7 +1357,7 @@
13571357
"NUCLEO_F756ZG": {
13581358
"inherits": ["FAMILY_STM32"],
13591359
"core": "Cortex-M7F",
1360-
"extra_labels_add": ["STM32F7", "STM32F756", "STM32F756xG", "STM32F756ZG"],
1360+
"extra_labels_add": ["STM32F7", "STM32F756", "STM32F756xG", "STM32F756ZG", "STM_EMAC"],
13611361
"config": {
13621362
"d11_configuration": {
13631363
"help": "Value: PA_7 for the default board configuration, PB_5 in case of solder bridge update (SB121 off/ SB122 on)",
@@ -1385,7 +1385,7 @@
13851385
"NUCLEO_F767ZI": {
13861386
"inherits": ["FAMILY_STM32"],
13871387
"core": "Cortex-M7FD",
1388-
"extra_labels_add": ["STM32F7", "STM32F767", "STM32F767xI", "STM32F767ZI"],
1388+
"extra_labels_add": ["STM32F7", "STM32F767", "STM32F767xI", "STM32F767ZI", "STM_EMAC"],
13891389
"config": {
13901390
"d11_configuration": {
13911391
"help": "Value: PA_7 for the default board configuration, PB_5 in case of solder bridge update (SB121 off/ SB122 on)",
@@ -1847,7 +1847,7 @@
18471847
"DISCO_F746NG": {
18481848
"inherits": ["FAMILY_STM32"],
18491849
"core": "Cortex-M7F",
1850-
"extra_labels_add": ["STM32F7", "STM32F746", "STM32F746xG", "STM32F746NG"],
1850+
"extra_labels_add": ["STM32F7", "STM32F746", "STM32F746xG", "STM32F746NG", "STM_EMAC"],
18511851
"supported_form_factors": ["ARDUINO"],
18521852
"config": {
18531853
"clock_source": {
@@ -1874,7 +1874,7 @@
18741874
"DISCO_F769NI": {
18751875
"inherits": ["FAMILY_STM32"],
18761876
"core": "Cortex-M7FD",
1877-
"extra_labels_add": ["STM32F7", "STM32F769", "STM32F769xI", "STM32F769NI"],
1877+
"extra_labels_add": ["STM32F7", "STM32F769", "STM32F769xI", "STM32F769NI", "STM_EMAC"],
18781878
"supported_form_factors": ["ARDUINO"],
18791879
"config": {
18801880
"clock_source": {
@@ -2094,7 +2094,7 @@
20942094
"MODULE_UBLOX_ODIN_W2": {
20952095
"inherits": ["FAMILY_STM32"],
20962096
"core": "Cortex-M4F",
2097-
"extra_labels_add": ["STM32F4", "STM32F439", "STM32F439ZI","STM32F439xx", "STM32F439xI"],
2097+
"extra_labels_add": ["STM32F4", "STM32F439", "STM32F439ZI","STM32F439xx", "STM32F439xI", "STM_EMAC"],
20982098
"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"],
20992099
"device_has_add": ["CAN", "EMAC", "TRNG", "FLASH"],
21002100
"device_has_remove": ["RTC", "SLEEP"],
@@ -2145,7 +2145,7 @@
21452145
"supported_form_factors": ["ARDUINO"],
21462146
"core": "Cortex-M4F",
21472147
"supported_toolchains": ["GCC_ARM", "ARM", "IAR"],
2148-
"extra_labels_add": ["STM32F4", "STM32F437", "STM32F437VG", "STM32F437xx", "STM32F437xG"],
2148+
"extra_labels_add": ["STM32F4", "STM32F437", "STM32F437VG", "STM32F437xx", "STM32F437xG", "STM_EMAC"],
21492149
"config": {
21502150
"modem_is_on_board": {
21512151
"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)