简体   繁体   中英

Hello World MQTT program in mbed

Was just testing a simple hello world mqtt program on my mbed board and I keep getting this error:

Error: Cannot open source input file "fsl_enet.h": No such file or directory in "EthernetInterface/lwip-eth/arch/TARGET_Freescale/k64f_emac_config.h", Line: 33, Col: 23. Error

I even tried fixing the error by doing what the compiler suggests by adding mbed-dev library, but the error is still there.

#ifndef K64F_EMAC_CONFIG_H__
#define K64F_EMAC_CONFIG_H__

#include "fsl_enet.h"

#define ENET_RX_RING_LEN              (16)
#define ENET_TX_RING_LEN              (8)

#define ENET_ETH_MAX_FLEN             (1522) // recommended size for a VLAN frame

#if defined(__cplusplus)
extern "C" {
#endif

int phy_link_status(void);

#if defined(__cplusplus)
}
#endif

#endif // #define K64F_EMAC_CONFIG_H__

Looks like the EthernetLibrary was broken recently for K64F. If you import https://developer.mbed.org/teams/mqtt/code/HelloMQTT/ , and choose NOT to update libraries it compiles fine for K64F.

thanks for reporting. The tools scripts were not updated (+ mbed lib), which caused this breakage in the ethernet library. Because ethernet lib requires some new KSDK files which are not yet available.

The next mbed SDK release is tomorrow, which should fix this. In the meantime, we will look at this, to find better solution - for instance to move the target code in the lwip/arch into HAL. I'll have a look today.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM