I want to import a project for the MCB1700 onto my LCP1769 and I am getting like 130 warnings. Why could that be? I think I loaded the right packs.
C:/Keil_v5/ARM/PACK/Keil/LPC1700_DFP/2.6.0/RTE_Driver/EMAC_LPC17xx.h(59): warning: 'RTE_ENET_MII' is not defined, evaluates to 0 [-Wundef] #if (RTE_ENET_MII && RTE_ENET_RMII) ^ C:/Keil_v5/ARM/PACK/Keil/LPC1700_DFP/2.6.0/RTE_Driver/EMAC_LPC17xx.c(96): warning: 'RTE_ENET_MII' is not defined, evaluates to 0 [-Wundef] #if (RTE_ENET_MII) ^ C:/Keil_v5/ARM/PACK/Keil/LPC1700_DFP/2.6.0/RTE_Driver/EMAC_LPC17xx.c(136): warning: 'RTE_ENET_MII' is not defined, evaluates to 0 [-Wundef] #if (RTE_ENET_MII) ^ C:/Keil_v5/ARM/PACK/Keil/LPC1700_DFP/2.6.0/RTE_Driver/EMAC_LPC17xx.c(178): warning: missing field 'reserved' initializer [-Wmissing-field-initializers] }; ^ C:/Keil_v5/ARM/PACK/Keil/LPC1700_DFP/2.6.0/RTE_Driver/EMAC_LPC17xx.c(195): warning: no previous extern declaration for non-static variable 'iap_entry' [-Wmissing-variable-declarations] IAP iap_entry = (IAP)0x1FFF1FF1; ^ C:/Keil_v5/ARM/PACK/Keil/LPC1700_DFP/2.6.0/RTE_Driver/EMAC_LPC17xx.c(70): warning: In file included from... C:/Keil_v5/ARM/PACK/Keil/LPC1700_DFP/2.6.0/RTE_Driver/EMAC_LPC17xx.h(337): warning: padding struct 'EMAC_CTRL' with 2 bytes to align 'frame_end' [-Wpadded] uint8_t *frame_end; // End of assembled frame fragments ^ C:/Keil_v5/ARM/PACK/Keil/LPC1700_DFP/2.6.0/RTE_Driver/EMAC_LPC17xx.c(641): warning: default label in switch which covers all enumeration values [-Wcovered-switch-default] default: ^ C:/Keil_v5/ARM/PACK/Keil/LPC1700_DFP/2.6.0/RTE_Driver/EMAC_LPC17xx.c(699): warning: implicit conversion changes signedness: 'int' to 'uint32_t' (aka 'unsigned int') [-Wsign-conversion] LPC_EMAC->SA0 = (ptr_addr->b[5] << 8) | ptr_addr->b[4]; ~ ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~ C:/Keil_v5/ARM/PACK/Keil/LPC1700_DFP/2.6.0/RTE_Driver/EMAC_LPC17xx.c(700): warning: implicit conversion changes signedness: 'int' to 'uint32_t' (aka 'unsigned int') [-Wsign-conversion] LPC_EMAC->SA1 = (ptr_addr->b[3] << 8) | ptr_addr->b[2]; ~ ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~ C:/Keil_v5/ARM/PACK/Keil/LPC1700_DFP/2.6.0/RTE_Driver/EMAC_LPC17xx.c(701): warning: implicit conversion changes signedness: 'int' to 'uint32_t' (aka 'unsigned int') [-Wsign-conversion] LPC_EMAC->SA2 = (ptr_addr->b[1] << 8) | ptr_addr->b[0]; ~ ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~ C:/Keil_v5/ARM/PACK/Keil/LPC1700_DFP/2.6.0/RTE_Driver/EMAC_LPC17xx.c(886): warning: no previous prototype for function 'ENET_IRQHandler' [-Wmissing-prototypes]
Always good to specify the compiler used and DFP version.
This is ARMCLANG being correct about issues with the middleware. Which is part of the blessing/curse of Keil's PACK system: it seems that arm/Keil are releasing compiler versions faster than the DFP teams can test and update.
For example, looking at the very first warning: RTE_Device.h configured for an LPC176x device defines RTE_ENET_RMII but does not define RTE_ENET_MII. Then ARMCLANG complains about the undefined macro RTE_MNET_MII in the test defined in the middleware headers because the header is using an old-school test for 'is defined'. If you use the Keil IDE "out of the box" to use and configure Ethernet for an LPC176x-based board like the MCB1700 you cannot avoid these warnings. (How to best fix errors in EMAC_LPC17xx.c?)
Well if I can't do something about it I will just leave them
Adam Lins said:the header is using an old-school test for 'is defined'.
Actually, it is just assuming that it is defined - and testing its value.
There should be a #ifdef or a #if defined before that.