Giter Club home page Giter Club logo

amazon-freertos's People

Contributors

aggarg avatar aggarw13 avatar alexa-noxon avatar alfred2g avatar andysun2015 avatar aniruddhakanhere avatar cobusve avatar cyliangtw avatar dachalco avatar dan4thewin avatar dcgaws avatar ericyeh1995 avatar gordonwang0 avatar huguesbouvier avatar karkhaz avatar leegeth avatar lundinc2 avatar mingyue86010 avatar mmuesly avatar mradulan avatar muneebahmed10 avatar pavanmr94 avatar pvyawaha avatar ravibhagavandas avatar sarenameas avatar shubhamkulkarni97 avatar smanas546 avatar xuelix avatar yanjos-dev avatar yuhui-zheng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

amazon-freertos's Issues

Error while trying to compile

I have followed this link for setting up Amazon FreeRTOS for my ESP32 https://docs.aws.amazon.com/freertos/latest/userguide/getting_started_espressif.html

I am trying to compile the demo from the espressif folder but I am unable to do so.
I am getting this error while compiling ..

mahe@Hitesh MINGW32 /amazon-freertos-master/demos/espressif/esp32_devkitc_esp_wrover_kit/make
$ make flash monitor
CC build/lwip/apps/dhcpserver.o
In file included from D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:23:0:
D:/msys32/amazon-freertos-master/demos/espressif/esp32_devkitc_esp_wrover_kit/common/application_code/espressif_code/tcpip_adapter/include/tcpip_adapter.h:51:16: error: redefinition of 'struct ip4_addr'
typedef struct ip4_addr {
^
In file included from D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip_addr.h:38:0,
from D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/inet.h:45,
from D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:17:
D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip4_addr.h:46:8: note: originally defined here
struct ip4_addr {
^
In file included from D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:23:0:
D:/msys32/amazon-freertos-master/demos/espressif/esp32_devkitc_esp_wrover_kit/common/application_code/espressif_code/tcpip_adapter/include/tcpip_adapter.h:53:3: error: conflicting types for 'ip4_addr_t'
} ip4_addr_t;
^
In file included from D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip_addr.h:38:0,
from D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/inet.h:45,
from D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:17:
D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip4_addr.h:66:25: note: previous declaration of 'ip4_addr_t' was here
typedef struct ip4_addr ip4_addr_t;
^
In file included from D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:23:0:
D:/msys32/amazon-freertos-master/demos/espressif/esp32_devkitc_esp_wrover_kit/common/application_code/espressif_code/tcpip_adapter/include/tcpip_adapter.h:55:16: error: redefinition of 'struct ip6_addr'
typedef struct ip6_addr {
^
In file included from D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip_addr.h:39:0,
from D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/inet.h:45,
from D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:17:
D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip6_addr.h:57:8: note: originally defined here
struct ip6_addr {
^
In file included from D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:23:0:
D:/msys32/amazon-freertos-master/demos/espressif/esp32_devkitc_esp_wrover_kit/common/application_code/espressif_code/tcpip_adapter/include/tcpip_adapter.h:57:3: error: conflicting types for 'ip6_addr_t'
} ip6_addr_t;
^
In file included from D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip_addr.h:39:0,
from D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/inet.h:45,
from D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:17:
D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip6_addr.h:75:25: note: previous declaration of 'ip6_addr_t' was here
typedef struct ip6_addr ip6_addr_t;
^
In file included from D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:23:0:
D:/msys32/amazon-freertos-master/demos/espressif/esp32_devkitc_esp_wrover_kit/common/application_code/espressif_code/tcpip_adapter/include/tcpip_adapter.h:62:20: error: conflicting types for 'ip_addr_t'
typedef ip4_addr_t ip_addr_t;
^
In file included from D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/inet.h:45:0,
from D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:17:
D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip_addr.h:60:3: note: previous declaration of 'ip_addr_t' was here
} ip_addr_t;
^
In file included from D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:23:0:
D:/msys32/amazon-freertos-master/demos/espressif/esp32_devkitc_esp_wrover_kit/common/application_code/espressif_code/tcpip_adapter/include/tcpip_adapter.h:86:0: warning: "IP6_ADDR_BLOCK1" redefined
#define IP6_ADDR_BLOCK1(ip6addr) ((u16_t)(FreeRTOS_htonl((ip6addr)->addr[0]) >> 16) & 0xffff)
^
In file included from D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip_addr.h:39:0,
from D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/inet.h:45,
from D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:17:
D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip6_addr.h:105:0: note: this is the location of the previous definition
#define IP6_ADDR_BLOCK1(ip6addr) ((u16_t)(htonl((ip6addr)->addr[0]) >> 16) & 0xffff)
^
In file included from D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:23:0:
D:/msys32/amazon-freertos-master/demos/espressif/esp32_devkitc_esp_wrover_kit/common/application_code/espressif_code/tcpip_adapter/include/tcpip_adapter.h:87:0: warning: "IP6_ADDR_BLOCK2" redefined
#define IP6_ADDR_BLOCK2(ip6addr) ((u16_t)(FreeRTOS_htonl((ip6addr)->addr[0])) & 0xffff)
^
In file included from D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip_addr.h:39:0,
from D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/inet.h:45,
from D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:17:
D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip6_addr.h:106:0: note: this is the location of the previous definition
#define IP6_ADDR_BLOCK2(ip6addr) ((u16_t)(htonl((ip6addr)->addr[0])) & 0xffff)
^
In file included from D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:23:0:
D:/msys32/amazon-freertos-master/demos/espressif/esp32_devkitc_esp_wrover_kit/common/application_code/espressif_code/tcpip_adapter/include/tcpip_adapter.h:88:0: warning: "IP6_ADDR_BLOCK3" redefined
#define IP6_ADDR_BLOCK3(ip6addr) ((u16_t)(FreeRTOS_htonl((ip6addr)->addr[1]) >> 16) & 0xffff)
^
In file included from D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip_addr.h:39:0,
from D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/inet.h:45,
from D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:17:
D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip6_addr.h:107:0: note: this is the location of the previous definition
#define IP6_ADDR_BLOCK3(ip6addr) ((u16_t)(htonl((ip6addr)->addr[1]) >> 16) & 0xffff)
^
In file included from D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:23:0:
D:/msys32/amazon-freertos-master/demos/espressif/esp32_devkitc_esp_wrover_kit/common/application_code/espressif_code/tcpip_adapter/include/tcpip_adapter.h:89:0: warning: "IP6_ADDR_BLOCK4" redefined
#define IP6_ADDR_BLOCK4(ip6addr) ((u16_t)(FreeRTOS_htonl((ip6addr)->addr[1])) & 0xffff)
^
In file included from D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip_addr.h:39:0,
from D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/inet.h:45,
from D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:17:
D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip6_addr.h:108:0: note: this is the location of the previous definition
#define IP6_ADDR_BLOCK4(ip6addr) ((u16_t)(htonl((ip6addr)->addr[1])) & 0xffff)
^
In file included from D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:23:0:
D:/msys32/amazon-freertos-master/demos/espressif/esp32_devkitc_esp_wrover_kit/common/application_code/espressif_code/tcpip_adapter/include/tcpip_adapter.h:90:0: warning: "IP6_ADDR_BLOCK5" redefined
#define IP6_ADDR_BLOCK5(ip6addr) ((u16_t)(FreeRTOS_htonl((ip6addr)->addr[2]) >> 16) & 0xffff)
^
In file included from D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip_addr.h:39:0,
from D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/inet.h:45,
from D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:17:
D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip6_addr.h:109:0: note: this is the location of the previous definition
#define IP6_ADDR_BLOCK5(ip6addr) ((u16_t)(htonl((ip6addr)->addr[2]) >> 16) & 0xffff)
^
In file included from D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:23:0:
D:/msys32/amazon-freertos-master/demos/espressif/esp32_devkitc_esp_wrover_kit/common/application_code/espressif_code/tcpip_adapter/include/tcpip_adapter.h:91:0: warning: "IP6_ADDR_BLOCK6" redefined
#define IP6_ADDR_BLOCK6(ip6addr) ((u16_t)(FreeRTOS_htonl((ip6addr)->addr[2])) & 0xffff)
^
In file included from D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip_addr.h:39:0,
from D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/inet.h:45,
from D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:17:
D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip6_addr.h:110:0: note: this is the location of the previous definition
#define IP6_ADDR_BLOCK6(ip6addr) ((u16_t)(htonl((ip6addr)->addr[2])) & 0xffff)
^
In file included from D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:23:0:
D:/msys32/amazon-freertos-master/demos/espressif/esp32_devkitc_esp_wrover_kit/common/application_code/espressif_code/tcpip_adapter/include/tcpip_adapter.h:92:0: warning: "IP6_ADDR_BLOCK7" redefined
#define IP6_ADDR_BLOCK7(ip6addr) ((u16_t)(FreeRTOS_htonl((ip6addr)->addr[3]) >> 16) & 0xffff)
^
In file included from D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip_addr.h:39:0,
from D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/inet.h:45,
from D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:17:
D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip6_addr.h:111:0: note: this is the location of the previous definition
#define IP6_ADDR_BLOCK7(ip6addr) ((u16_t)(htonl((ip6addr)->addr[3]) >> 16) & 0xffff)
^
In file included from D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:23:0:
D:/msys32/amazon-freertos-master/demos/espressif/esp32_devkitc_esp_wrover_kit/common/application_code/espressif_code/tcpip_adapter/include/tcpip_adapter.h:93:0: warning: "IP6_ADDR_BLOCK8" redefined
#define IP6_ADDR_BLOCK8(ip6addr) ((u16_t)(FreeRTOS_htonl((ip6addr)->addr[3])) & 0xffff)
^
In file included from D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip_addr.h:39:0,
from D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/inet.h:45,
from D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:17:
D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip6_addr.h:112:0: note: this is the location of the previous definition
#define IP6_ADDR_BLOCK8(ip6addr) ((u16_t)(htonl((ip6addr)->addr[3])) & 0xffff)
^
In file included from D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:25:0:
D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/apps/dhcpserver.h:43:3: error: conflicting types for 'dhcps_lease_t'
} dhcps_lease_t;
^
In file included from D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:23:0:
D:/msys32/amazon-freertos-master/demos/espressif/esp32_devkitc_esp_wrover_kit/common/application_code/espressif_code/tcpip_adapter/include/tcpip_adapter.h:68:3: note: previous declaration of 'dhcps_lease_t' was here
} dhcps_lease_t;
^
D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c: In function 'send_offer':
D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:528:5: warning: braces around scalar initializer
ip_addr_t ip_temp = IPADDR4_INIT(0x0);
^
D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:528:5: note: (near initialization for 'ip_temp.addr')
D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:528:5: warning: braces around scalar initializer
D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:528:5: note: (near initialization for 'ip_temp.addr')
D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:528:5: warning: braces around scalar initializer
D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:528:5: note: (near initialization for 'ip_temp.addr')
In file included from D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/inet.h:45:0,
from D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:17:
D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip_addr.h:64:55: warning: excess elements in scalar initializer
#define IPADDR4_INIT(u32val) { { { { u32val, 0ul, 0ul, 0ul } } }, IPADDR_TYPE_V4 }
^
D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:528:25: note: in expansion of macro 'IPADDR4_INIT'
ip_addr_t ip_temp = IPADDR4_INIT(0x0);
^
D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip_addr.h:64:55: note: (near initialization for 'ip_temp.addr')
#define IPADDR4_INIT(u32val) { { { { u32val, 0ul, 0ul, 0ul } } }, IPADDR_TYPE_V4 }
^
D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:528:25: note: in expansion of macro 'IPADDR4_INIT'
ip_addr_t ip_temp = IPADDR4_INIT(0x0);
^
D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip_addr.h:64:60: warning: excess elements in scalar initializer
#define IPADDR4_INIT(u32val) { { { { u32val, 0ul, 0ul, 0ul } } }, IPADDR_TYPE_V4 }
^
D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:528:25: note: in expansion of macro 'IPADDR4_INIT'
ip_addr_t ip_temp = IPADDR4_INIT(0x0);
^
D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip_addr.h:64:60: note: (near initialization for 'ip_temp.addr')
#define IPADDR4_INIT(u32val) { { { { u32val, 0ul, 0ul, 0ul } } }, IPADDR_TYPE_V4 }
^
D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:528:25: note: in expansion of macro 'IPADDR4_INIT'
ip_addr_t ip_temp = IPADDR4_INIT(0x0);
^
D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip_addr.h:64:65: warning: excess elements in scalar initializer
#define IPADDR4_INIT(u32val) { { { { u32val, 0ul, 0ul, 0ul } } }, IPADDR_TYPE_V4 }
^
D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:528:25: note: in expansion of macro 'IPADDR4_INIT'
ip_addr_t ip_temp = IPADDR4_INIT(0x0);
^
D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip_addr.h:64:65: note: (near initialization for 'ip_temp.addr')
#define IPADDR4_INIT(u32val) { { { { u32val, 0ul, 0ul, 0ul } } }, IPADDR_TYPE_V4 }
^
D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:528:25: note: in expansion of macro 'IPADDR4_INIT'
ip_addr_t ip_temp = IPADDR4_INIT(0x0);
^
D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip_addr.h:46:39: warning: excess elements in struct initializer
#define IPADDR_TYPE_V4 0U
^
D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip_addr.h:64:76: note: in expansion of macro 'IPADDR_TYPE_V4'
#define IPADDR4_INIT(u32val) { { { { u32val, 0ul, 0ul, 0ul } } }, IPADDR_TYPE_V4 }
^
D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:528:25: note: in expansion of macro 'IPADDR4_INIT'
ip_addr_t ip_temp = IPADDR4_INIT(0x0);
^
D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip_addr.h:46:39: note: (near initialization for 'ip_temp')
#define IPADDR_TYPE_V4 0U
^
D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip_addr.h:64:76: note: in expansion of macro 'IPADDR_TYPE_V4'
#define IPADDR4_INIT(u32val) { { { { u32val, 0ul, 0ul, 0ul } } }, IPADDR_TYPE_V4 }
^
D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:528:25: note: in expansion of macro 'IPADDR4_INIT'
ip_addr_t ip_temp = IPADDR4_INIT(0x0);
^
In file included from D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip_addr.h:38:0,
from D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/inet.h:45,
from D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:17:
D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip_addr.h:85:39: error: 'ip_addr_t {aka struct ip4_addr}' has no member named 'u_addr'
#define ip_2_ip4(ipaddr) (&((ipaddr)->u_addr.ip4))
^
D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip4_addr.h:157:35: note: in definition of macro 'ip4_addr_set'
#define ip4_addr_set(dest, src) ((dest)->addr =
^
D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:529:18: note: in expansion of macro 'ip_2_ip4'
ip4_addr_set(ip_2_ip4(&ip_temp), &broadcast_dhcps);
^
D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:530:48: warning: passing argument 3 of 'udp_sendto' from incompatible pointer type [-Wincompatible-pointer-types]
SendOffer_err_t = udp_sendto(pcb_dhcps, p, &ip_temp, DHCPS_CLIENT_PORT);
^
In file included from D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:20:0:
D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/udp.h:141:18: note: expected 'const ip_addr_t * {aka const struct _ip_addr *}' but argument is of type 'ip_addr_t * {aka struct ip4_addr *}'
err_t udp_sendto (struct udp_pcb *pcb, struct pbuf *p,
^
D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c: In function 'send_nak':
D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:601:5: warning: braces around scalar initializer
ip_addr_t ip_temp = IPADDR4_INIT(0x0);
^
D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:601:5: note: (near initialization for 'ip_temp.addr')
D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:601:5: warning: braces around scalar initializer
D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:601:5: note: (near initialization for 'ip_temp.addr')
D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:601:5: warning: braces around scalar initializer
D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:601:5: note: (near initialization for 'ip_temp.addr')
In file included from D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/inet.h:45:0,
from D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:17:
D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip_addr.h:64:55: warning: excess elements in scalar initializer
#define IPADDR4_INIT(u32val) { { { { u32val, 0ul, 0ul, 0ul } } }, IPADDR_TYPE_V4 }
^
D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:601:25: note: in expansion of macro 'IPADDR4_INIT'
ip_addr_t ip_temp = IPADDR4_INIT(0x0);
^
D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip_addr.h:64:55: note: (near initialization for 'ip_temp.addr')
#define IPADDR4_INIT(u32val) { { { { u32val, 0ul, 0ul, 0ul } } }, IPADDR_TYPE_V4 }
^
D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:601:25: note: in expansion of macro 'IPADDR4_INIT'
ip_addr_t ip_temp = IPADDR4_INIT(0x0);
^
D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip_addr.h:64:60: warning: excess elements in scalar initializer
#define IPADDR4_INIT(u32val) { { { { u32val, 0ul, 0ul, 0ul } } }, IPADDR_TYPE_V4 }
^
D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:601:25: note: in expansion of macro 'IPADDR4_INIT'
ip_addr_t ip_temp = IPADDR4_INIT(0x0);
^
D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip_addr.h:64:60: note: (near initialization for 'ip_temp.addr')
#define IPADDR4_INIT(u32val) { { { { u32val, 0ul, 0ul, 0ul } } }, IPADDR_TYPE_V4 }
^
D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:601:25: note: in expansion of macro 'IPADDR4_INIT'
ip_addr_t ip_temp = IPADDR4_INIT(0x0);
^
D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip_addr.h:64:65: warning: excess elements in scalar initializer
#define IPADDR4_INIT(u32val) { { { { u32val, 0ul, 0ul, 0ul } } }, IPADDR_TYPE_V4 }
^
D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:601:25: note: in expansion of macro 'IPADDR4_INIT'
ip_addr_t ip_temp = IPADDR4_INIT(0x0);
^
D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip_addr.h:64:65: note: (near initialization for 'ip_temp.addr')
#define IPADDR4_INIT(u32val) { { { { u32val, 0ul, 0ul, 0ul } } }, IPADDR_TYPE_V4 }
^
D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:601:25: note: in expansion of macro 'IPADDR4_INIT'
ip_addr_t ip_temp = IPADDR4_INIT(0x0);
^
D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip_addr.h:46:39: warning: excess elements in struct initializer
#define IPADDR_TYPE_V4 0U
^
D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip_addr.h:64:76: note: in expansion of macro 'IPADDR_TYPE_V4'
#define IPADDR4_INIT(u32val) { { { { u32val, 0ul, 0ul, 0ul } } }, IPADDR_TYPE_V4 }
^
D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:601:25: note: in expansion of macro 'IPADDR4_INIT'
ip_addr_t ip_temp = IPADDR4_INIT(0x0);
^
D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip_addr.h:46:39: note: (near initialization for 'ip_temp')
#define IPADDR_TYPE_V4 0U
^
D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip_addr.h:64:76: note: in expansion of macro 'IPADDR_TYPE_V4'
#define IPADDR4_INIT(u32val) { { { { u32val, 0ul, 0ul, 0ul } } }, IPADDR_TYPE_V4 }
^
D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:601:25: note: in expansion of macro 'IPADDR4_INIT'
ip_addr_t ip_temp = IPADDR4_INIT(0x0);
^
In file included from D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip_addr.h:38:0,
from D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/inet.h:45,
from D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:17:
D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip_addr.h:85:39: error: 'ip_addr_t {aka struct ip4_addr}' has no member named 'u_addr'
#define ip_2_ip4(ipaddr) (&((ipaddr)->u_addr.ip4))
^
D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip4_addr.h:157:35: note: in definition of macro 'ip4_addr_set'
#define ip4_addr_set(dest, src) ((dest)->addr =
^
D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:602:18: note: in expansion of macro 'ip_2_ip4'
ip4_addr_set(ip_2_ip4(&ip_temp), &broadcast_dhcps);
^
D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:603:46: warning: passing argument 3 of 'udp_sendto' from incompatible pointer type [-Wincompatible-pointer-types]
SendNak_err_t = udp_sendto(pcb_dhcps, p, &ip_temp, DHCPS_CLIENT_PORT);
^
In file included from D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:20:0:
D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/udp.h:141:18: note: expected 'const ip_addr_t * {aka const struct _ip_addr *}' but argument is of type 'ip_addr_t * {aka struct ip4_addr *}'
err_t udp_sendto (struct udp_pcb *pcb, struct pbuf *p,
^
D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c: In function 'send_ack':
D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:675:5: warning: braces around scalar initializer
ip_addr_t ip_temp = IPADDR4_INIT(0x0);
^
D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:675:5: note: (near initialization for 'ip_temp.addr')
D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:675:5: warning: braces around scalar initializer
D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:675:5: note: (near initialization for 'ip_temp.addr')
D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:675:5: warning: braces around scalar initializer
D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:675:5: note: (near initialization for 'ip_temp.addr')
In file included from D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/inet.h:45:0,
from D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:17:
D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip_addr.h:64:55: warning: excess elements in scalar initializer
#define IPADDR4_INIT(u32val) { { { { u32val, 0ul, 0ul, 0ul } } }, IPADDR_TYPE_V4 }
^
D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:675:25: note: in expansion of macro 'IPADDR4_INIT'
ip_addr_t ip_temp = IPADDR4_INIT(0x0);
^
D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip_addr.h:64:55: note: (near initialization for 'ip_temp.addr')
#define IPADDR4_INIT(u32val) { { { { u32val, 0ul, 0ul, 0ul } } }, IPADDR_TYPE_V4 }
^
D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:675:25: note: in expansion of macro 'IPADDR4_INIT'
ip_addr_t ip_temp = IPADDR4_INIT(0x0);
^
D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip_addr.h:64:60: warning: excess elements in scalar initializer
#define IPADDR4_INIT(u32val) { { { { u32val, 0ul, 0ul, 0ul } } }, IPADDR_TYPE_V4 }
^
D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:675:25: note: in expansion of macro 'IPADDR4_INIT'
ip_addr_t ip_temp = IPADDR4_INIT(0x0);
^
D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip_addr.h:64:60: note: (near initialization for 'ip_temp.addr')
#define IPADDR4_INIT(u32val) { { { { u32val, 0ul, 0ul, 0ul } } }, IPADDR_TYPE_V4 }
^
D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:675:25: note: in expansion of macro 'IPADDR4_INIT'
ip_addr_t ip_temp = IPADDR4_INIT(0x0);
^
D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip_addr.h:64:65: warning: excess elements in scalar initializer
#define IPADDR4_INIT(u32val) { { { { u32val, 0ul, 0ul, 0ul } } }, IPADDR_TYPE_V4 }
^
D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:675:25: note: in expansion of macro 'IPADDR4_INIT'
ip_addr_t ip_temp = IPADDR4_INIT(0x0);
^
D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip_addr.h:64:65: note: (near initialization for 'ip_temp.addr')
#define IPADDR4_INIT(u32val) { { { { u32val, 0ul, 0ul, 0ul } } }, IPADDR_TYPE_V4 }
^
D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:675:25: note: in expansion of macro 'IPADDR4_INIT'
ip_addr_t ip_temp = IPADDR4_INIT(0x0);
^
D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip_addr.h:46:39: warning: excess elements in struct initializer
#define IPADDR_TYPE_V4 0U
^
D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip_addr.h:64:76: note: in expansion of macro 'IPADDR_TYPE_V4'
#define IPADDR4_INIT(u32val) { { { { u32val, 0ul, 0ul, 0ul } } }, IPADDR_TYPE_V4 }
^
D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:675:25: note: in expansion of macro 'IPADDR4_INIT'
ip_addr_t ip_temp = IPADDR4_INIT(0x0);
^
D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip_addr.h:46:39: note: (near initialization for 'ip_temp')
#define IPADDR_TYPE_V4 0U
^
D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip_addr.h:64:76: note: in expansion of macro 'IPADDR_TYPE_V4'
#define IPADDR4_INIT(u32val) { { { { u32val, 0ul, 0ul, 0ul } } }, IPADDR_TYPE_V4 }
^
D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:675:25: note: in expansion of macro 'IPADDR4_INIT'
ip_addr_t ip_temp = IPADDR4_INIT(0x0);
^
In file included from D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip_addr.h:38:0,
from D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/inet.h:45,
from D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:17:
D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip_addr.h:85:39: error: 'ip_addr_t {aka struct ip4_addr}' has no member named 'u_addr'
#define ip_2_ip4(ipaddr) (&((ipaddr)->u_addr.ip4))
^
D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip4_addr.h:157:35: note: in definition of macro 'ip4_addr_set'
#define ip4_addr_set(dest, src) ((dest)->addr =
^
D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:676:18: note: in expansion of macro 'ip_2_ip4'
ip4_addr_set(ip_2_ip4(&ip_temp), &broadcast_dhcps);
^
D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:677:46: warning: passing argument 3 of 'udp_sendto' from incompatible pointer type [-Wincompatible-pointer-types]
SendAck_err_t = udp_sendto(pcb_dhcps, p, &ip_temp, DHCPS_CLIENT_PORT);
^
In file included from D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:20:0:
D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/udp.h:141:18: note: expected 'const ip_addr_t * {aka const struct _ip_addr *}' but argument is of type 'ip_addr_t * {aka struct ip4_addr *}'
err_t udp_sendto (struct udp_pcb *pcb, struct pbuf p,
^
D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c: In function 'dhcps_start':
D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:1139:25: warning: passing argument 2 of 'udp_recv' from incompatible pointer type [-Wincompatible-pointer-types]
udp_recv(pcb_dhcps, handle_dhcp, NULL);
^
In file included from D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:20:0:
D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/udp.h:133:18: note: expected 'udp_recv_fn {aka void (
)(void *, struct udp_pcb *, struct pbuf *, const struct _ip_addr , short unsigned int)}' but argument is of type 'void ()(void *, struct udp_pcb *, struct pbuf *, const ip_addr_t , uint16_t) {aka void ()(void *, struct udp_pcb *, struct pbuf *, const struct ip4_addr *, short unsigned int)}'
void udp_recv (struct udp_pcb *pcb, udp_recv_fn recv,
^
In file included from D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/inet.h:45:0,
from D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:17:
D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c: In function 'dhcps_dns_setserver':
D:/msys32/home/mahe/esp-idf/components/lwip/include/lwip/lwip/ip_addr.h:85:39: error: 'ip_addr_t {aka const struct ip4_addr}' has no member named 'u_addr'
#define ip_2_ip4(ipaddr) (&((ipaddr)->u_addr.ip4))
^
D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:1291:24: note: in expansion of macro 'ip_2_ip4'
dns_server = *(ip_2_ip4(dnsserver));
^
D:/msys32/home/mahe/esp-idf/components/lwip/apps/dhcpserver.c:1293:20: error: incompatible types when assigning to type 'ip4_addr_t {aka struct ip4_addr}' from type 'ip4_addr_t {aka const struct ip4_addr}'
dns_server = *(ip_2_ip4(IP_ADDR_ANY));
^
make[1]: *** [/home/mahe/esp-idf/make/component_wrapper.mk:286: apps/dhcpserver.o] Error 1
make: *** [D:/msys32/home/mahe/esp-idf/make/project.mk:467: component-lwip-build] Error 2

Unpatched upstream vulnerabilities in mbedtls library

There are several unpatched upstream vulnerabilities in mbedtls library.

If possible, upgrade to the latest mbedtls 2.8.0 version

build warning on lib/FreeRTOS/tasks.c:5107

Hi:
When I was compiling FreeRTOS code using IAR or armgcc,I faced one warning ,which exists in task.c, "warning: 'freertos_tasks_c_additions_init' defined but not used [-Wunused-function]”

Reproduced way:
make definition for configINCLUDE_FREERTOS_TASK_C_ADDITIONS_H to 1 and no FREERTOS_TASKS_C_ADDITIONS_INIT definition

Source code:
#if( configINCLUDE_FREERTOS_TASK_C_ADDITIONS_H == 1 )

#include "freertos_tasks_c_additions.h"

static void freertos_tasks_c_additions_init( void )
{
	#ifdef FREERTOS_TASKS_C_ADDITIONS_INIT
		FREERTOS_TASKS_C_ADDITIONS_INIT();
	#endif
}

#endif

I think the “freertos_tasks_c_additions_init” definition should be wrapped by FREERTOS_TASKS_C_ADDITIONS_INIT,because this function is called only when this macro is present in the codes of other locations.

Otherwise, this makes the api freertos_tasks_c_additions_init defined but not used.

Could you please have a check on this.Thanks.

Complete PKCS11 Support for CC3220

I am having to define my own 'crypto lib' that uses the TI libraries directly as the PKCS11 crypto lib is not defined currently for the CC3220, specifically the ability to sign and verify data buffers. Having this defined would save future developers hours of work.

Co-routine support?

The croutine.c file is not included, but there is still some support in the files that are included. Is this support being dropped or was it an omission to not include this? Just curious to know if how to handle this change.

file system

But where is the file system? Virtual input / output system?

Amazon FreeRTOS does not compile

Hi, I am trying to get this to work - initially to compile:
*) NXP LPC54018 IoT Module
*) mcuxpressoide-10.1.1_606.x86_64.deb.bin
*) SDK_2.3.1_LPC54018-IoT-Module.zip
*) freertos-1526159674761.zip *)
on Ubuntu 16 64 bit.

I followed the instructions:
https://docs.aws.amazon.com/freertos/latest/userguide/getting_started_nxp.html
But "Build all" has issues to find various header files.

This is how a fresh install looks like:
https://pastebin.com/3WfVsi3R

fatal error: wifi_common.h: No such file or directory #include "wifi_common.h" ^ compilation terminated.

Please help

Regards,

Robert

Espressif: Detected overlap at address: 0x1000 for file: .../bootloader.bin

I get this error with devkitC and the wrover. I selected two partitions.

Flashing binaries to serial port /dev/cu.SLAB_USBtoUART (app at offset 0x2)...
usage: esptool write_flash [-h] [--flash_freq {keep,40m,26m,20m,80m}]
                           [--flash_mode {keep,qio,qout,dio,dout}]
                           [--flash_size FLASH_SIZE]
                           [--spi-connection SPI_CONNECTION] [--no-progress]
                           [--verify] [--compress | --no-compress]
                           <address> <filename> [<address> <filename> ...]
esptool write_flash: error: argument <address> <filename>: Detected overlap at address: 0x1000 for file: .../bootloader.bin
make: *** [flash] Error 2

How can I reset my selections?

Support for Espressif ESP32

Similar to #1, support for the ESP32 micro-controller opens up a large number of inexpensive edge devices that come stock with wifi, bluetooth and crypto.

MQTT echo test could not connect to broker

Hi,

I am trying to connect my PIC32MZ EF curiosity board. Unfortunatly I am not able to know what is going wrong >

Firmware ver : 4.2.1
Min driver ver : 4.2.1
Curr driver ver: 4.2.1
WILC1000: Initialization successful!

Start Wi-Fi Connection...
Wi-Fi Connected
2 7991 [IP-task] vDHCPProcess: offer ac140a08ip
3 13282 [IP-task] vDHCPProcess: offer ac140a08ip
4 13283 [IP-task] Creating MQTT Echo Task...
5 13283 [IP-task]

IP Address: xxx.xxx.xxx.xxx
6 13283 [IP-task] Subnet Mask: xxx.xxx.xxx.xxx
7 13283 [IP-task] Gateway Address: xxx.xxx.xxx.xxx
8 13283 [IP-task] DNS Server Address: xxx.xxx.xxx.xxx

9 13285 [MQTTEcho] MQTT echo attempting to connect to .iot.eu-central-1.amazonaws.com.
10 13285 [MQTTEcho] Sending command to MQTT task.
11 13285 [MQTT] Received message 10000 from queue.
12 13543 [IP-task] Socket sending wakeup to MQTT task.
13 17602 [MQTT] Received message 0 from queue.
14 17689 [IP-task] Socket sending wakeup to MQTT task.
15 17689 [MQTT] Received message 0 from queue.
16 17701 [IP-task] Socket sending wakeup to MQTT task.
17 17701 [MQTT] Received message 0 from queue.
18 17703 [MQTT] About to close socket.
19 17802 [IP-task] Socket sending wakeup to MQTT task.
20 17865 [MQTT] Socket closed.
21 17865 [MQTT] Notifying task.
22 17865 [MQTT] Received message 0 from queue.
23 17866 [MQTTEcho] Command sent to MQTT task failed.
24 17866 [MQTTEcho] ERROR: MQTT echo failed to connect.
25 17866 [MQTTEcho] MQTT echo test could not connect to broker.
26 17866 [MQTTEcho] Sending command to MQTT task.
27 17866 [MQTT] Received message 20000 from queue.
28 17866 [MQTT] Notifying task.
29 17867 [MQTTEcho] Command sent to MQTT task passed.
30 17867 [MQTTEcho] MQTT echo demo finished.

Somebody can help me with this issue ?

FreeRTOS+TCP: Accept call does not return on connect if bPassQueued is not set (+ proposed fix)

Hello!

I'm using FreeRTOS + TCP/IP stack with K64 MCU from NXP.

I have written a simple TCP echo server, and found that FreeRTOS_accept call does not return when connection is established. Wireshark shows correct SYN/SYN-ACK/ACK procedure, but an application does not receive any events.

I found that the application task does not receive eSOCKET_ACCEPT (from the internal FreeRTOS task) event on a listening socket .

Instead, eSOCKET_CONNECT is set for a child socket that nobody waits for (FreeRTOS_accept waits for the listening socket, as I mentioned):

{
pxSocket->xEventBits |= eSOCKET_CONNECT;
#if( ipconfigSUPPORT_SELECT_FUNCTION == 1 )
{
if( pxSocket->xSelectBits & eSELECT_WRITE )
{
pxSocket->xEventBits |= ( eSELECT_WRITE << SOCKET_EVENT_BIT_COUNT );
}
}
#endif
}

FreeRTOS+TCP/IP version

I'm using v2.0.1

FreeRTOS configuration

#define ipconfigTCP_MSS                             522
#define ipconfigTCP_TX_BUFFER_LENGTH                ( 2 * ipconfigTCP_MSS )
#define ipconfigTCP_RX_BUFFER_LENGTH                ( 2 * ipconfigTCP_MSS )
#define ipconfigNETWORK_MTU                         586
#define ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS      4
#define ipconfigEVENT_QUEUE_LENGTH                  10
#define ipconfigUSE_LINKED_RX_MESSAGES              0
#define ipconfigBYTE_ORDER                          ( pdFREERTOS_LITTLE_ENDIAN )
#define ipconfigUSE_TCP_TIMESTAMPS                  0
#define ipconfigRAND32()                            rng_rand()
#define ipconfigUSE_NETWORK_EVENT_HOOK              1
#define ipconfigUSE_CALLBACKS                       1
#define ipconfigIP_TASK_STACK_SIZE_WORDS            256
#define ipconfigIP_TASK_PRIORITY                    3
#define ipconfigDHCP_SEND_DISCOVER_AFTER_AUTO_IP    0
#define ipconfigUSE_TCP_WIN                         0

Test application code

static void echo_demo(void)
{
    struct freertos_sockaddr xClient, xBindAddress;
    Socket_t xListeningSocket, xConnectedSocket;
    socklen_t xSize = sizeof( xClient );
    static const TickType_t xReceiveTimeOut = portMAX_DELAY;
    const BaseType_t xBacklog = 20;
    #define BUFFER_SIZE 512
    static char cRxedData[ BUFFER_SIZE ];
    BaseType_t xResult;

    /* Attempt to open the socket. */
    xListeningSocket = FreeRTOS_socket( FREERTOS_AF_INET,
                                        FREERTOS_SOCK_STREAM,  /* SOCK_STREAM for TCP. */
                                        FREERTOS_IPPROTO_TCP );

    /* Check the socket was created. */
    configASSERT( xListeningSocket != FREERTOS_INVALID_SOCKET );

    /* If FREERTOS_SO_RCVBUF or FREERTOS_SO_SNDBUF are to be used with
    FreeRTOS_setsockopt() to change the buffer sizes from their default then do
    it here!.  (see the FreeRTOS_setsockopt() documentation. */

    /* If ipconfigUSE_TCP_WIN is set to 1 and FREERTOS_SO_WIN_PROPERTIES is to
    be used with FreeRTOS_setsockopt() to change the sliding window size from
    its default then do it here! (see the FreeRTOS_setsockopt()
    documentation. */

    /* Set a time out so accept() will just wait for a connection. */
    xResult = FreeRTOS_setsockopt( xListeningSocket,
                         0,
                         FREERTOS_SO_RCVTIMEO,
                         &xReceiveTimeOut,
                         sizeof( xReceiveTimeOut ) );
    configASSERT( xResult == 0 );

    /* Set the listening port to 9999. */
    xBindAddress.sin_port = 9999;
    xBindAddress.sin_port = FreeRTOS_htons( xBindAddress.sin_port );

    /* Bind the socket to the port that the client RTOS task will send to. */
    FreeRTOS_bind( xListeningSocket, &xBindAddress, sizeof( xBindAddress ) );
    configASSERT( xResult == 0 );

    PRINTF("Start listening for incoming connections on port 9999\r\n");

    /* Set the socket into a listening state so it can accept connections.
    The maximum number of simultaneous connections is limited to 20. */
    xResult = FreeRTOS_listen( xListeningSocket, xBacklog );
    configASSERT( xResult == 0 );

    for( ;; )
    {
        /* Wait for incoming connections. */
        PRINTF("Waiting for client connection\r\n");
        /* WTF with accept? https://sourceforge.net/p/freertos/discussion/382005/thread/31374882/ */
        xConnectedSocket = FreeRTOS_accept( xListeningSocket, &xClient, &xSize );
        configASSERT( xConnectedSocket != FREERTOS_INVALID_SOCKET );

        PRINTF("Client connected!\r\n");

        for( ;; )
        {
            memset(cRxedData, 0, BUFFER_SIZE);
            /* Receive another block of data into the cRxedData buffer. */
            BaseType_t lBytesReceived = FreeRTOS_recv( xConnectedSocket, cRxedData, BUFFER_SIZE, 0 );

            if( lBytesReceived > 0 )
            {
                /* Data was received, send it back. */

                PRINTF("Received data %ld bytes: %s\r\n", lBytesReceived, cRxedData);

                FreeRTOS_send( xConnectedSocket,
                                /* The data being sent. */
                                cRxedData,
                                /* The remaining length of data to send. */
                                lBytesReceived,
                                /* ulFlags. */
                                0 );

                /* No error checks: whatever */

            }
            else if( lBytesReceived == 0 )
            {
                /* No data was received, but FreeRTOS_recv() did not return an error.
                Timeout? */
                PRINTF("No data received");
            }
            else
            {
                /* Error (maybe the connected socket already shut down the socket?).
                Attempt graceful shutdown. */
                PRINTF("Error reading, shutdown a connection\r\n");
                FreeRTOS_shutdown( xConnectedSocket, FREERTOS_SHUT_RDWR );
                break;
            }
        }

        /* The RTOS task will get here if an error is received on a read.  Ensure the
        socket has shut down (indicated by FreeRTOS_recv() returning a FREERTOS_EINVAL
        error before closing the socket). */

        while( FreeRTOS_recv( xConnectedSocket, cRxedData, BUFFER_SIZE, 0 ) >= 0 )
        {
            /* Wait for shutdown to complete.  If a receive block time is used then
            this delay will not be necessary as FreeRTOS_recv() will place the RTOS task
            into the Blocked state anyway. */
            vTaskDelay( pdTICKS_TO_MS( 250 ) );

            /* Note - real applications should implement a timeout here, not just
            loop forever. */
        }

        /* Shutdown is complete and the socket can be safely closed. */
        FreeRTOS_closesocket( xConnectedSocket );
    }

    #undef BUFFER_SIZE
}

Proposed fix

See #29

Proposed fix (suitable for my version (v2.0.1) of FreeRTOS+TCP/IP)

From c8fd4dbbd657c9eb86f6f5dbfd7f1168395504e4 Mon Sep 17 00:00:00 2001
From: Max Olender <[email protected]>
Date: Thu, 17 May 2018 17:16:56 +0300
Subject: [PATCH] Fix FreeRTOS accept call not returning when connected

---
 freertos-tcp/Source/FreeRTOS_TCP_IP.c | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/freertos-tcp/Source/FreeRTOS_TCP_IP.c b/freertos-tcp/Source/FreeRTOS_TCP_IP.c
index 14982d9..c2763e4 100644
--- a/freertos-tcp/Source/FreeRTOS_TCP_IP.c
+++ b/freertos-tcp/Source/FreeRTOS_TCP_IP.c
@@ -1026,7 +1026,7 @@ BaseType_t xReturn = pdTRUE;
 		default:
 			/* Count the number of times it couldn't find the ARP address. */
 			pxSocket->u.xTCP.ucRepCount++;
-	
+
 			FreeRTOS_debug_printf( ( "ARP for %lxip (using %lxip): rc=%d %02X:%02X:%02X %02X:%02X:%02X\n",
 				pxSocket->u.xTCP.ulRemoteIP,
 				FreeRTOS_htonl( ulRemoteIP ),
@@ -1037,10 +1037,10 @@ BaseType_t xReturn = pdTRUE;
 				xEthAddress.ucBytes[ 3 ],
 				xEthAddress.ucBytes[ 4 ],
 				xEthAddress.ucBytes[ 5 ] ) );
-	
+
 			/* And issue a (new) ARP request */
 			FreeRTOS_OutputARPRequest( ulRemoteIP );
-	
+
 			xReturn = pdFALSE;
 			break;
 	}
@@ -1455,6 +1455,8 @@ BaseType_t bAfter  = ( BaseType_t ) NOW_CONNECTED( eTCPState );						/* Is it co
 				}
 				else
 				{
+					/* Parent can (must?) be found in pxSocket->u.xTCP.pxPeerSocket,
+					otherwise setting bPassQueued for new sockets is meaningless */
 					xParent = pxSocket->u.xTCP.pxPeerSocket;
 					configASSERT( xParent != NULL );
 				}
@@ -3234,7 +3236,13 @@ struct freertos_sockaddr xAddress;
 	xAddress.sin_addr = *ipLOCAL_IP_ADDRESS_POINTER;
 	xAddress.sin_port = FreeRTOS_htons( pxSocket->usLocalPort );
 
-	#if( ipconfigTCP_HANG_PROTECTION == 1 )
+	/* Without bPassQueued and pxPeerSocket being set, the server socket
+	will not receive eSOCKET_ACCEPT event on child socket (instead,
+	eSOCKET_CONNECT will be used). See respective xEventGroupWaitBits()
+	call FreeRTOS_accept() and bPassQueued handling in vTCPStateChange().
+	*/
+	/* #if( ipconfigTCP_HANG_PROTECTION == 1 ) */
+	#if( 1 )
 	{
 		/* Only when there is anti-hanging protection, a socket may become an
 		orphan temporarily.  Once this socket is really connected, the owner of
-- 
2.16.2

Multiple File OTA

Hi,

I am using the Window Simulator to understand the AWS OTA system before using on a embedded platform.

I have tested a multiple file OTA with 2 files in the OTA stream. The Windows Simulator reports :

[prvUpdateJobStatus] Msg: {"status":"FAILED","statusDetails":{"reason":"0x24000000: 0x00000005"}}

It complains about duplicate JSON entry.

What limitation exist with the current OTA implementation ?

Regards
Stan

Arm compiler 6 support for Keil MDK 5

I would like to kindly ask for improvement. Could you add support for ARM Compiler 6 (Clang/LLVM)?
Differences are described here: www.keil.com/appnotes/files/apnt_298.pdf

I have found following potentially conflicting cases in RVDS port:

__forceinline
amazon-freertos\lib\FreeRTOS\portable\RVDS\ARM_CM3\portmacro.h
amazon-freertos\lib\FreeRTOS\portable\RVDS\ARM_CM4_MPU\portmacro.h
amazon-freertos\lib\FreeRTOS\portable\RVDS\ARM_CM4F\portmacro.h
amazon-freertos\lib\FreeRTOS\portable\RVDS\ARM_CM7\r0p1\portmacro.h
__asm{
amazon-freertos\lib\FreeRTOS\portable\RVDS\ARM_CM4_MPU\portmacro.h
amazon-freertos\lib\FreeRTOS\portable\RVDS\ARM7_LPC21xx\portmacro.h

Regards,
David

Connection to MQTT fails as ping response is not received

Hi,

In our set up we are observing that as ping response is not received, the connection to MQTT server fails with MQTTTimeout error, does application needs to reestablish the connection when this error happens. And why does the ping response stop coming from server?

Porting to other platforms guide

I know there will never be enough time to support all devices, but please add a porting guide to other platforms, so other developers can do it.

can I use dynamic allocation for MQTT?

Hi, Amazon FreeRTOS expert

The buffer allocation scheme uses a static method. In my use case, I need use Shadow_Get API to get the full document from the cloud and its size is quite large (close to 8KB), and if the block number assigned is too small, I will get the message drop hint. So I have to assign 20 x 8KB = 160KB buffer dedicated to MQTT, it wastes a lot for the most time.

Can I use replace the GET and FREE pointer by pvPortMalloc() and vPortFree()? So that I can use the memory more efficient. Are there any risks? (alignment requirement or fragmentation?)

BTW, I'm using the heap_4 algorithm.

Building ESP32 demo not enough space

Hi

While compiling I get this error.

/amazon-freertos/demos/espressif/esp32_devkitc_esp_wrover_kit/make/partitions_example.csv' occupy 2.2MB of flash (2293760 bytes) which does not fit in configured flash size 2MB. Change the flash size in menuconfig under the 'Serial Flasher Config' menu.

I assume changing the flash size is here in this situation not the correct solution. Anybody that can reproduce this?

Thanks!

Improvement: Confine semantic versioning to one (or two files)

It would be helpful for developers if the semantic version bump was confined to only a few files (e.g. VERSION, README.md).

For example in commit 8b6f157:

  • 246 changed files with 262 additions and 252 subtractions.

However the actual code changes were:

  • 3 changes in: lib/ota/portable/pc/windows/aws_ota_pal.c
  • 4 changes in: tests/pc/windows/common/config_files/aws_test_ota_config.h

In observing the files that were changed are in the board specific trees extrapolating from the existing 6 trees its reasonable to say that as more boards are approved that the files changed in each release will grow - to 500 at 10 and 1000 by the time there are 20 different boards and so on.

quick start SetupAWS.py option to use _existing_ Thing/Policy/Cert

This is like day two for me so I might be missing something.

  1. Set up a new device with SetupAWS.py setup
  2. git clean and lose all your local state.
  3. Try to setup again, and get errors because the Thing already exists. Read through the other available options and scratch your head.

Is there a way to fetch details for an existing Thing, and use those?

Reconnect (the Paho library style)

The Eclipse Paho MQTT library provides a method mosquitto_reconnect() useful in order to restart a broken connection to a broker. Is there anything similar here? What's the suggested policy?

May I know the relationship between this repo and FreeRTOS website?

Hi,

Our previous development was based on this FreeRTOS. I'm a little confused about this repo.
May I know the purpose of this repo besides that FreeRTOS website? Is it a full package delivered as FreeRTOS kernel + diverse libraries?
Besides, may I know the difference between the FreeRTOS code in this repo and that downloaded from FreeRTOS website? Is this repo only available for official FreeRTOS code development?

If I'd like to contribute some vendor platform support, shall I continue to upload it to FreeRTOS interactive forum or shall I bring up a pull request here?

Thank you.

Project cannot link when attempting to use esp_smartconfig_start()

The project will compile successfully, but fails at the link stage, if I attempt to use the smartconfig feature of esp-idf.

/home/hm/controller-0-10v/lib/third_party/mcu_vendor/espressif/esp-idf/components/esp32/lib/libsmartconfig.a(sc_airkiss.o):(.literal.airkiss_get_net_errno+0x4): undefined reference to lwip_getsockopt_r' /home/hm/controller-0-10v/lib/third_party/mcu_vendor/espressif/esp-idf/components/esp32/lib/libsmartconfig.a(sc_airkiss.o):(.literal.KISS_Send_task+0xc): undefined reference to lwip_htons'
/home/hm/controller-0-10v/lib/third_party/mcu_vendor/espressif/esp-idf/components/esp32/lib/libsmartconfig.a(sc_airkiss.o):(.literal.KISS_Send_task+0x10): undefined reference to lwip_socket' /home/hm/controller-0-10v/lib/third_party/mcu_vendor/espressif/esp-idf/components/esp32/lib/libsmartconfig.a(sc_airkiss.o):(.literal.KISS_Send_task+0x14): undefined reference to lwip_setsockopt_r'
/home/hm/controller-0-10v/lib/third_party/mcu_vendor/espressif/esp-idf/components/esp32/lib/libsmartconfig.a(sc_airkiss.o):(.literal.KISS_Send_task+0x18): undefined reference to lwip_sendto_r' /home/hm/controller-0-10v/lib/third_party/mcu_vendor/espressif/esp-idf/components/esp32/lib/libsmartconfig.a(sc_airkiss.o):(.text.airkiss_get_net_errno+0x1b): undefined referenceto lwip_getsockopt_r'
/home/hm/controller-0-10v/lib/third_party/mcu_vendor/espressif/esp-idf/components/esp32/lib/libsmartconfig.a(sc_airkiss.o):(.text.KISS_Send_task+0x26): undefined reference to lwip_htons' /home/hm/controller-0-10v/lib/third_party/mcu_vendor/espressif/esp-idf/components/esp32/lib/libsmartconfig.a(sc_airkiss.o):(.text.KISS_Send_task+0x7f): undefined reference to lwip_socket'
/home/hm/controller-0-10v/lib/third_party/mcu_vendor/espressif/esp-idf/components/esp32/lib/libsmartconfig.a(sc_airkiss.o):(.text.KISS_Send_task+0xba): undefined reference to lwip_setsockopt_r' /home/hm/controller-0-10v/lib/third_party/mcu_vendor/espressif/esp-idf/components/esp32/lib/libsmartconfig.a(sc_airkiss.o):(.text.KISS_Send_task+0xda): undefined reference to lwip_sendto_r'
/home/hm/controller-0-10v/lib/third_party/mcu_vendor/espressif/esp-idf/components/esp32/lib/libsmartconfig.a(sc_esptouch.o):(.literal.TOUCH_Send_task+0xc): undefined reference toipaddr_addr' /home/hm/controller-0-10v/lib/third_party/mcu_vendor/espressif/esp-idf/components/esp32/lib/libsmartconfig.a(sc_esptouch.o):(.text.get_net_errno+0x1b): undefined reference to lwip_getsockopt_r'
/home/hm/controller-0-10v/lib/third_party/mcu_vendor/espressif/esp-idf/components/esp32/lib/libsmartconfig.a(sc_esptouch.o):(.text.TOUCH_Send_task+0x28): undefined reference to ipaddr_addr' /home/hm/controller-0-10v/lib/third_party/mcu_vendor/espressif/esp-idf/components/esp32/lib/libsmartconfig.a(sc_esptouch.o):(.text.TOUCH_Send_task+0x3b): undefined reference to lwip_htons'
/home/hm/controller-0-10v/lib/third_party/mcu_vendor/espressif/esp-idf/components/esp32/lib/libsmartconfig.a(sc_esptouch.o):(.text.TOUCH_Send_task+0xcb): undefined reference to lwip_socket' /home/hm/controller-0-10v/lib/third_party/mcu_vendor/espressif/esp-idf/components/esp32/lib/libsmartconfig.a(sc_esptouch.o):(.text.TOUCH_Send_task+0x106): undefined reference to lwip_setsockopt_r'
/home/hm/controller-0-10v/lib/third_party/mcu_vendor/espressif/esp-idf/components/esp32/lib/libsmartconfig.a(sc_esptouch.o):(.text.TOUCH_Send_task+0x126): undefined reference to `lwip_sendto_r'
collect2: error: ld returned 1 exit status
/home/hm/controller-0-10v/demos/espressif/esp32_devkitc_esp_wrover_kit/make/../../../../lib/third_party/mcu_vendor/espressif/esp-idf/make/project.mk:393: recipe for target '/home/hm/controller-0-10v/demos/espressif/esp32_devkitc_esp_wrover_kit/make/build/aws_demos.elf' failed
make: *** [/home/hm/controller-0-10v/demos/espressif/esp32_devkitc_esp_wrover_kit/make/build/aws_demos.elf] Error 1

I then copied the lwip component folder from the official esp-idf to the esp-idf found in a:FreeRTOS. This yields an error stating that sys/select.h does not exit. I then copied that file (esp-idf/components/newlib/include/sys/select.h) to the equivalent place in a:FreeRTOS.

This leads to an error, "unknown type name 'fd_set'". fd_set is defined in esp-idf/components/newlib/include/sys/types.h, but not for the ESP_PLATFORM tool.

Is there any way to get smartconfig working on the ESP32 and using a:FreeRTOS?

2G Modules

Hi ,
the current code sends data over wifi. is there a port available for 2G M2M modules like via AT commands.
If not, where can one start?

Support for ESP8266

Howdy,

Support for ESP8266 would be wonderful, as it would open up this to a large group of IOT devices.

PIC32 MAC address not working

as in file
amazon-freertos/demos/microchip/curiosity_pic32mzef/common/config_files/FreeRTOSConfig.h

Lines 208-216
/* PIC32 note: PIC32 processors have a factory programmed MAC address.

  • This address setting will override the factory programmed address.
  • Use all 0's to use the factory programmed address */

After setting all variables to 0 and running the demo device on my network appears with MAC address with all zeros instead of factory preprogrammed PIC32 MAC address.

ESP32 WiFi Low Power Save Modes

Board: Sparkfun ESP32 Thing
OS: Ubuntu 17.04

I'm working on research with a PhD student and I need to run an MQTT protocol with Wifi Power Save Mode on the Sparkfun ESP32 Thing board. We are using an unsecured WiFi network and simply connecting to an MQTT broker on a raspberry pi, publishing a message, and disconnecting.

  1. We were looking into the power save modes and under lib/wifi/portable/espressif/esp32_devkitc_esp_wrover_kit, we noticed that the source code returns eWifiNotSupported for the PM modes. Is this not a supported feature on the esp32 boards? And if so, why is that? The esp-idf used the power save modes.

  2. We need to modify part of the U-APSD operation. I need to keep the board alive for a few ms after it would receive some data.
    A similar function is shown in the image. This was used on a Cypress board using WICED and allowed us to modify the return to sleep delay of the wifi power save. I've looked all over the API but wasn't able to find anything that worked similarly. Is this a supported feature?
    return_to_sleep_delay

Unexpected socket close using Amazon FreeRTOS demo on NXP LPC54018 board

I’m trying to run the Amazon FreeRTOS demo on the NXP LPC54018 board, using SEGGER Embedded Studio.

https://www.segger.com/aws/
https://www.segger.com/downloads/eval/amazon-freertos-lpc54018.zip

Everything looks good and I’m getting all the way to the end, and then the socket gets closed unexpectedly…

As a result, the Hello World messages can't get published.
See Debug Terminal output below.

Any ideas why that would be?
Thanks!

Starting key provisioning...
Write root certificate...
Write device private key...
Write device certificate...
Key provisioning done...
Starting WiFi...
WiFi module initialized.
WiFi connected to AP cerano359.
IP Address acquired 10.0.0.30
Creating MQTT Echo Task...
MQTT echo attempting to connect to a2raen285ovswb.iot.us-east-2.amazonaws.com.
Sending command to MQTT task.
Received message 10000 from queue.
Looked up a2raen285ovswb.iot.us-east-2.amazonaws.com as 18.218.105.213
MQTT Connect was accepted. Connection established.
Notifying task.
Command sent to MQTT task passed.
MQTT echo connected.
MQTT echo test echoing task created.
Sending command to MQTT task.
Received message 20000 from queue.
MQTT Subscribe was accepted. Subscribed.
Notifying task.
Command sent to MQTT task passed.
MQTT Echo demo subscribed to freertos/demos/echo
Sending command to MQTT task.
Received message 30000 from queue.
About to close socket.
Socket closed.

Notifying task.
Command sent to MQTT task failed.
ERROR: Echo failed to publish 'Hello World 0'

Sending command to MQTT task.
Received message 40000 from queue.
MQTT_Publish failed!
Notifying task.
Command sent to MQTT task failed.
ERROR: Echo failed to publish 'Hello World 1'

Sending command to MQTT task.
Received message 50000 from queue.
MQTT_Publish failed!
Notifying task.
...
...

typo in lib/crypto/aws_crypto.c

`

diff --git a/lib/crypto/aws_crypto.c b/lib/crypto/aws_crypto.c
index 653e5ad..de969f7 100644
--- a/lib/crypto/aws_crypto.c
+++ b/lib/crypto/aws_crypto.c
@@ -34,7 +34,7 @@
#include "mbedtls/config.h"
#include "mbedtls/platform.h"
#include "mbedtls/sha256.h"
-#include "mbedTLS/sha1.h"
+#include "mbedtls/sha1.h"
#include "mbedtls/pk.h"
#include "mbedtls/x509_crt.h"

`

Unreliable ESP32 demo

Hi,

I'm testing the demo for the ESP32 and I get unreliable results.
usually, I get this scenario.
-Flash the ESP32
-I get this

I (15238) event: sta ip: 192.168.8.24, mask: 255.255.255.0, gw: 192.168.8.1
I (15238) WIFI: SYSTEM_EVENT_STA_GOT_IP
3 1478 [IP-task] vDHCPProcess: offer c0a80818ip
4 1478 [main] WiFi Connected to AP. Creating tasks which use network...
5 1479 [main] Creating MQTT Echo Task...
6 1479 [MQTTEcho] MQTT echo attempting to connect to xxxxxxxx.iot.eu-west-2.amazonaws.com.
7 1988 [MQTTEcho] ERROR: MQTT echo failed to connect.
8 1988 [MQTTEcho] MQTT echo test could not connect to broker.
9 1988 [MQTTEcho] MQTT echo demo finished.
10 1988 [MQTTEcho] ----Demo finished----

-Send a reset via command line
-ESP32 reboots
-Then it works

I (32448) event: sta ip: 192.168.8.24, mask: 255.255.255.0, gw: 192.168.8.1
I (32448) WIFI: SYSTEM_EVENT_STA_GOT_IP
3 3199 [IP-task] vDHCPProcess: offer c0a80818ip
4 3200 [main] WiFi Connected to AP. Creating tasks which use network...
5 3200 [main] Creating MQTT Echo Task...
6 3201 [MQTTEcho] MQTT echo attempting to connect to xxxxxxxxx.iot.eu-west-2.amazonaws.com.
I (39568) PKCS11: Initializing SPIFFS
I (39568) PKCS11: Partition size: total: 52961, used: 0
7 4886 [MQTTEcho] MQTT echo connected.
8 4886 [MQTTEcho] MQTT echo test echoing task created.
9 4892 [MQTTEcho] MQTT Echo demo subscribed to freertos/demos/echo
10 4896 [MQTTEcho] Echo successfully published 'Hello World 0'
11 4903 [Echoing] Message returned with ACK: 'Hello World 0 ACK'
12 5412 [MQTTEcho] Echo successfully published 'Hello World 1'

if I send again a reset command, it's a 50/50 chance if the demo will work.
It seems it needs the SPIFFS to work. But i have no idea why it initializes so slowly. Any ideas?

Thanks in advance
VELBN

No OTA on the Espressif boards?

Currently it is stated that the Espressif boards do not support OTA.
Is that temporary or is there a technical limitation?
What does this mean for the meaning of "Supported Hardware"? Is there a minimal subset that needs to work?

Update request pic32mzef MHC

Could we get an updated Harmony configuration file?

amazon-freertos/demos/microchip/curiosity_pic32mzef/common/application_code/microchip_code/pic32mz_ef_curiosity.mhc

Which includes newest wifi configurations.

Thanks

OTA Demo on ESP32 Does Not Link

I'm using Ubuntu 16.04 and Visual Studio Code as an IDE. I've uncommented out to the OTA demo, but the linker complains that vStartOTAUpdateDemoTask is not defined. I'm able to build and test the MQTT and Shadow demo without any issues.

Is plain freertos dead?

Is it dead? Will we be stuck with Amazon pushing IoT libraries the majority of embedded projects don't use?

Long wait on MQTT Connect

Hello,

I am playing with Amazon FreeRTOS and when I connect to the broker I observe a delay equal to the timeout value (something like 12 or 14 seconds) before the ACK is processed.

I think the problem is that after sending the connection message the prvManageConnections function does not get anything in the socket read and then sets the next timeout to the full timeout. I think it should check the socket often before waiting for the full time.

Maybe it is a naive fix but I changed in MQTT_Periodic the following:

/* If this Tx operation has not timed out yet, update when the next earliest timeout will happen. */
ulNextTimeoutTicks = mqttMIN( ulNextTimeoutTicks, mqttbufferGET_PACKET_TIMEOUT_TICKS( xBuffer ) );

to the following (including the FreeRTOS header):

/* If this Tx operation has not timed out yet, update when the next earliest timeout will happen. */
ulNextTimeoutTicks = mqttMIN( ulNextTimeoutTicks, 300 / portTICK_PERIOD_MS );

This way, it will check every 300ms for data in the socket instead of waiting.

Is this correct?

fatal error: xtensa/tie/xt_core.h: No such file or directory

While Make of the project this error is thrown.

/home/kaushikdas/esp/amazon-freertos/lib/FreeRTOS/portable/ThirdParty/GCC/Xtensa_ESP32/include/portmacro.h:77:32: fatal error: xtensa/tie/xt_core.h: No such file or directory
compilation terminated.
/home/kaushikdas/esp/esp-idf/make/component_wrapper.mk:285: recipe for target 'lib/mqtt/aws_mqtt_agent.o' failed
make[1]: *** [lib/mqtt/aws_mqtt_agent.o] Error 1
/home/kaushikdas/esp/esp-idf/make/project.mk:467: recipe for target 'component-amazon-freertos-common-build' failed
make: *** [component-amazon-freertos-common-build] Error 2

Update device shadow fails

Hi, Expert

I'm running a sample project with Amazon FreeRTOS.
I got a problem when update device shadow by updating LED status. If QoS=0, I will not receive Updated topic and lead to timeout, If QoS=1, i will not be able to publish. It seems the packet was not accept by AWS MQTT broker.
But it is always OK to update device shadow when I build a sensor packet.

They follow the same API, the only difference is the JSON document, but I can't see problem.
Check two SHADOW_Update() below

Thanks.

int buildJsonAccel()
{
    /* Read data from accelerometer */
    vector_t vec = {0};
    bool read_ok = false;
    read_mag_accel(&vec, &read_ok, g_accelResolution);
    if (read_ok == false)
    {
        return -1;
    }

    /* Convert raw data from accelerometer to acceleration range multiplied by 1000 (for range -2/+2 the values will be
     * in range -2000/+2000) */
    vec.A_x = (int16_t)((int32_t)vec.A_x * g_accelDataScale * 1000 / (1 << (g_accelResolution - 1)));
    vec.A_y = (int16_t)((int32_t)vec.A_y * g_accelDataScale * 1000 / (1 << (g_accelResolution - 1)));
    vec.A_z = (int16_t)((int32_t)vec.A_z * g_accelDataScale * 1000 / (1 << (g_accelResolution - 1)));

    char tmpBufAccel[128] = {0};
    sprintf(tmpBufAccel, "{\"accel\":{\"x\":%d,\"y\":%d,\"z\":%d}}", vec.A_x, vec.A_y, vec.A_z);

    int ret = 0;
    ret = snprintf(pcUpdateBuffer, shadowBUFFER_LENGTH,
                   "{\"state\":{"
                   "\"desired\":{"
                   "\"accelUpdate\":null"
                   "},"
                   "\"reported\":%s},"
                   "\"clientToken\": \"token-%d\""
                   "}",
                   tmpBufAccel, (int)xTaskGetTickCount());

    if (ret >= shadowBUFFER_LENGTH || ret < 0)
    {
        return -1;
    }
    else
    {
        return ret;
    }
}

/* Reports current state to shadow */
static uint32_t prvReportShadowJSON()
{
    memset(pcUpdateBuffer, 0, shadowBUFFER_LENGTH);
    return snprintf(pcUpdateBuffer, shadowBUFFER_LENGTH,
                    "{"
                    "\"state\":{"
                    "\"reported\":{"
                    "\"LEDstate\":%d"
                    "}"
                    "},"
                    "\"clientToken\": \"token-%d\""
                    "}",
                    ledState, (int)xTaskGetTickCount());
}

//  Received delta update from Apps, change LED or report sensor      
...
 if (parsedLedState != ledState)
            {
                for (int i = 0; i < ledCount; i++)
                {
                    /* change from 0 to 1 */
                    if (((ledState & (1 << i)) == 0) && ((parsedLedState & (1 << i)) != 0))
                    {
                        /* turn on led */
                        configPRINTF(("Turn on %s\n", ledName[i]));
                        turnOnLed(i);
                    }

                    /* change from 1 to 0 */
                    if (((ledState & (1 << i)) != 0) && ((parsedLedState & (1 << i)) == 0))
                    {
                        /* turn off led */
                        configPRINTF(("Turn off %s\n", ledName[i]));
                        turnOffLed(i);
                    }
                }
                ledState = parsedLedState;

                /* update device shadow */
                xOperationParams.ulDataLength = prvReportShadowJSON();
                xReturn = SHADOW_Update(xClientHandle, &xOperationParams, shadowDemoTIMEOUT);
                if (xReturn == eShadowSuccess)
                {
                    configPRINTF(("Successfully performed update.\r\n"));
                }
                else
                {
                    configPRINTF(("Update failed, returned %d.\r\n", xReturn));
                }
            }
            if (parsedAccState == 1)
            {
                configPRINTF(("Update accelerometer.\r\n"));
                xOperationParams.ulDataLength = buildJsonAccel();
                xReturn = SHADOW_Update(xClientHandle, &xOperationParams, shadowDemoTIMEOUT);
                if (xReturn == eShadowSuccess)
                {
                    configPRINTF(("Successfully performed update.\r\n"));
                }
                else
                {
                    configPRINTF(("Update failed, returned %d.\r\n", xReturn));
                }
                parsedAccState = 0;
            }

Can I add '\0' to the end of income payload

Now MQTT or Shadow API return the pointer to the buffer and the length of the buffer. I understand the buffer is allocated from a static buffer and belongs to xBuffer pointer. '\0' is not in buffer.

I want to use the buffer as a string and pass to cJSON for further parsing. Is it safe to modify buffer[len] to '\0' to make the payload as a NULL terminated string?

Thanks.

ERROR: MQTT echo failed to connect.

Hi,

I'm trying to run the FreeRTOS example on STM32L4 IOT board.
I followed this guide and I ran the FreeRTOS sample. This is the log I'm getting:

0 523 [Tmr Svc] WiFi module initialized.
1 527 [Tmr Svc] Starting key provisioning...
2 531 [Tmr Svc] Write root certificate...
3 544 [Tmr Svc] Write device private key...
4 996 [Tmr Svc] Key provisioning done...
5 6077 [Tmr Svc] WiFi connected to AP MY_WIFI_NAME.
6 6082 [Tmr Svc] IP Address acquired <IP_ADDRESS>
7 6087 [Tmr Svc] WiFi firmware version is: C3.5.2.3.BETA9
8 6092 [Tmr Svc] [WARN] WiFi firmware needs to be updated.
9 6097 [Tmr Svc] Creating MQTT Echo Task...
10 6101 [MQTTEcho] MQTT echo attempting to connect to <MY_ENDPOINT>.
11 6283 [MQTTEcho] ERROR: MQTT echo failed to connect.
12 6288 [MQTTEcho] MQTT echo test could not connect to broker.
13 6294 [MQTTEcho] MQTT echo demo finished.
14 6298 [MQTTEcho] ----Demo finished----

In the subscription topic in AWS IoT I typed freertos/demos/echoas it's instructed in the tutorial...
My endpoint is correct - it's copied from AWS Console > Settings > Endpoint (and there it appears as Enabled).

What could be causing this MQTT echo error?

TI CC3220 Secure Socket Key and Certs File Names

The file names for the AWS client certificate, root CA certificate, and private key should be defined by the application. As it is, the files are defined as /certs/ClientCert.crt, /certs/PrivateKey.key, and /certs/RootCA.crt. These file names are much more generic than desired and embedded in aws_pkcs11_pal.c and aws_secure_sockets.c files.

#defines for these 3 things in the file aws_secure_sockets_config.h either directly or through a portable *.h file.

GetIPandCertificateFromJSON couldn't find certificate

In Full_GGD test, GetIPandCertificateFromJSON got "Couldn't find certificate" error. Details of error message as below. However, to check the capture packets, everything seems good. In GGD test, the server IP address is 18.223.9.190 & port 8443, is it the right setting ?

TEST(Full_GGD, GetIPandCertificateFromJSON)About to close socket.
Socket closed.
JSON parsing: Couldn't find certificate
..\..\..\common\greengrass\aws_test_greengrass_discovery.c:282::FAIL: Expected 1 Was 0

aws_ggd

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.