CONFIG_BUILD_OUTPUT_BIN=y
CONFIG_BUILD_OUTPUT_HEX=y
CONFIG_REBOOT=y

CONFIG_STDOUT_CONSOLE=y
CONFIG_CONSOLE_HANDLER=y
CONFIG_UART_CONSOLE_DEBUG_SERVER_HOOKS=y

CONFIG_CONSOLE_SUBSYS=y
CONFIG_CONSOLE_GETCHAR=y
CONFIG_CONSOLE_GETCHAR_BUFSIZE=258
CONFIG_CONSOLE_PUTCHAR_BUFSIZE=128

CONFIG_NEWLIB_LIBC=y
CONFIG_FPU=y
CONFIG_MAIN_STACK_SIZE=4736
CONFIG_POLL=y

CONFIG_DEVICE_DT_METADATA=y



# Enable sensor subsystem (doesn't add code if not used).
# Specific sensors should be enabled per-board.
CONFIG_SENSOR=y

# Networking config
CONFIG_NETWORKING=y
CONFIG_NET_IPV4=y
# CONFIG_NET_IPV6=y
CONFIG_NET_UDP=y
CONFIG_NET_TCP=y
CONFIG_NET_SOCKETS=y
# CONFIG_NET_SOCKETS_POSIX_NAMES=n
CONFIG_TEST_RANDOM_GENERATOR=y

CONFIG_NET_CONFIG_SETTINGS=y
CONFIG_NET_CONFIG_INIT_TIMEOUT=3
CONFIG_NET_CONFIG_NEED_IPV6=y
CONFIG_NET_CONFIG_NEED_IPV4=y

# DNS
CONFIG_DNS_RESOLVER=y
CONFIG_DNS_RESOLVER_ADDITIONAL_QUERIES=2
CONFIG_DNS_SERVER_IP_ADDRESSES=y

# Static IP addresses
CONFIG_NET_CONFIG_MY_IPV6_ADDR="2001:db8::1"
CONFIG_NET_CONFIG_MY_IPV4_ADDR="192.168.1.98"
CONFIG_NET_CONFIG_MY_IPV4_NETMASK="255.255.255.0"
CONFIG_NET_CONFIG_MY_IPV4_GW="192.168.1.1"
CONFIG_DNS_SERVER1="192.0.2.2"

# DHCP configuration. Until DHCP address is assigned,
# static configuration above is used instead.
CONFIG_NET_DHCPV4=y

# Diagnostics and debugging

# Required for zephyr.stack_analyze()
CONFIG_THREAD_ANALYZER=y
CONFIG_THREAD_ANALYZER_USE_PRINTK=y
CONFIG_THREAD_NAME=y

# Required for socket.pkt_get_info()
CONFIG_NET_BUF_POOL_USAGE=y

# Required for zephyr.shell_exec()
#CONFIG_SHELL=y
#CONFIG_SHELL_BACKEND_SERIAL_INTERRUPT_DRIVEN=n

# Required for zephyr.shell_exec("net iface")
#CONFIG_NET_SHELL=y

# MicroPython options
CONFIG_MICROPY_CONFIGFILE="mpconfigport.h"
CONFIG_MICROPY_VFS_FAT=y
CONFIG_MICROPY_VFS_LFS2=y

CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_NVS=y
CONFIG_MPU_ALLOW_FLASH_WRITE=y


### These need to be DISABLED to enable AP mode:

# CONFIG_NET_SOCKETS_POSIX_NAMES=n