Skip to content

Commit

Permalink
samples: net: sockets: echo: enable socket offload for cc3220sf_launchxl
Browse files Browse the repository at this point in the history
Add a prj conf file for the TI cc3220sf_launchxl board
to enable socket offload to the simplelink WiFi driver.

Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
  • Loading branch information
Gil Pitney authored and jukkar committed Sep 11, 2018
1 parent 71182cb commit 844e6f5
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 1 deletion.
13 changes: 12 additions & 1 deletion samples/net/sockets/echo/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
cmake_minimum_required(VERSION 3.8.2)
macro(set_conf_file)
if(EXISTS ${APPLICATION_SOURCE_DIR}/prj_${BOARD}.conf)
set(CONF_FILE "${APPLICATION_SOURCE_DIR}/prj_${BOARD}.conf")
elseif(EXISTS ${APPLICATION_SOURCE_DIR}/boards/${BOARD}.conf)
set(CONF_FILE
"prj.conf ${APPLICATION_SOURCE_DIR}/boards/${BOARD}.conf")
else()
set(CONF_FILE "prj.conf")
endif()
endmacro()

include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE)
project(NONE)

FILE(GLOB app_sources src/*.c)
target_sources(app PRIVATE ${app_sources})

include($ENV{ZEPHYR_BASE}/samples/net/common/common.cmake)
include($ENV{ZEPHYR_BASE}/samples/net/common/common.cmake)
12 changes: 12 additions & 0 deletions samples/net/sockets/echo/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,15 @@ To test:
As can be seen, the behavior of the application is the same as the Zephyr
version.

Running on cc3220sf_launchxl
============================

See the note on Provisioning and Fast Connect in :ref:`cc3220sf_launchxl`.

After having connected to an Access Point using the sample WiFi shell,
the IP address will be printed to the console upon running this echo
application.

Proceed to test as above.

23 changes: 23 additions & 0 deletions samples/net/sockets/echo/boards/cc3220sf_launchxl.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Networking Config:
CONFIG_NETWORKING=y
CONFIG_NET_IPV4=y
CONFIG_NET_IPV6=n
CONFIG_NET_SOCKETS=y

# Enable SimpleLink WiFi Driver and Socket Offload
CONFIG_WIFI=y
CONFIG_WIFI_SIMPLELINK=y
CONFIG_NET_SOCKETS_OFFLOAD=y

# Disable unneeded settings from the base prj.conf:
CONFIG_TEST_RANDOM_GENERATOR=n
CONFIG_NET_CONFIG_SETTINGS=n
CONFIG_NET_CONFIG_MY_IPV4_ADDR=""
CONFIG_NET_CONFIG_PEER_IPV4_ADDR=""

# Debugging
CONFIG_NET_LOG=y
CONFIG_SYS_LOG_WIFI_LEVEL=4
CONFIG_DEBUG=y
#CONFIG_SYS_LOG=y
#CONFIG_ASSERT=y

0 comments on commit 844e6f5

Please sign in to comment.