Skip to content

Commit e7483e1

Browse files
committed
WIP HTTP on the MCXN947
1 parent 31ed316 commit e7483e1

File tree

4 files changed

+18
-2
lines changed

4 files changed

+18
-2
lines changed

overlay-http.conf

+11
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ CONFIG_MBEDTLS_SERVER_NAME_INDICATION=y
2121
CONFIG_TLS_CREDENTIALS=y
2222
CONFIG_DNS_SERVER_IP_ADDRESSES=y
2323
CONFIG_DNS_SERVER1="1.1.1.1"
24+
# TODO, the PEM certs fail to parse, I suspect due to OOM
25+
CONFIG_MEMFAULT_TLS_CERTS_USE_DER=y
2426

2527
# not sure these help?
2628
# CONFIG_MBEDTLS_ENABLE_HEAP=y
@@ -32,7 +34,16 @@ CONFIG_MBEDTLS_ENABLE_HEAP=y
3234
CONFIG_MBEDTLS_HEAP_SIZE=34000
3335
CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN=4096
3436

37+
# 1536 seems to be the minimum for the MCXN947 when we send memfault data
38+
# CONFIG_NET_BUF_DATA_SIZE=512
39+
CONFIG_NET_BUF_DATA_SIZE=1536
40+
3541
# debug
3642
CONFIG_MBEDTLS_DEBUG=y
3743
CONFIG_MBEDTLS_LOG_LEVEL_DBG=y
3844
CONFIG_NET_SOCKETS_LOG_LEVEL_DBG=y
45+
CONFIG_NET_LOG=y
46+
CONFIG_NET_BUF_LOG=y
47+
CONFIG_NET_BUF_LOG_LEVEL_DBG=y
48+
# CONFIG_NET_BUF_SIMPLE_LOG=y
49+
# CONFIG_NET_L2_ETHERNET_LOG_LEVEL_DBG=y

prj.conf

+2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ CONFIG_LOG_PRINTK=n
2121

2222
CONFIG_HEAP_MEM_POOL_SIZE=4096
2323
CONFIG_MAIN_STACK_SIZE=4096
24+
CONFIG_SHELL_STACK_SIZE=4096
25+
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
2426

2527
CONFIG_ASSERT=y
2628
CONFIG_COMPILER_WARNINGS_AS_ERRORS=y

src/main.c

+2
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,8 @@ void k_sys_fatal_error_handler(unsigned int reason, const z_arch_esf_t *esf) {
215215
#include "memfault/ports/zephyr/http.h"
216216
static void initialize_net(void) {
217217
#if defined(CONFIG_NETWORKING)
218+
memfault_zephyr_port_install_root_certs();
219+
218220
struct net_if *iface = net_if_get_default();
219221

220222
if (!iface) {

west.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ manifest:
77
# https://github.com/zephyrproject-rtos/zephyr/commit/e4e463af812e61bb5bfb4b1087d48e1dbcd9d8d5
88
# And board support was added here:
99
# https://github.com/zephyrproject-rtos/zephyr/commit/8fa1c6d9c6cbc7972f482b17584c48b4ea952e55
10-
# Use a commit that's a little later, that seems more stable.
10+
# And this PR as of 2024-03-23 has the ETH QoS driver added, required for
11+
# the HTTP example:
1112
url: https://github.com/zephyrproject-rtos/zephyr
12-
revision: 369e40b27bca1f08fefe23924f7dc82dd096c53f
13+
revision: refs/pull/70637/head
1314

1415
import:
1516
# Limit the Zephyr modules to the required set

0 commit comments

Comments
 (0)