<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Using curl library (nrf/ext/curl)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/114266/using-curl-library-nrf-ext-curl</link><description>I would like to use the cURL libary that is included in the nRF Connect SDK (v2.6.1) a nrf/ext/curl 
 I started with the download sample (nrf/samples/net/download) 
 I&amp;#39;ve added this to CMakeLists.txt 
 
 
 And I&amp;#39;ve added this to the top of src.main.c</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 29 Aug 2024 13:11:52 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/114266/using-curl-library-nrf-ext-curl" /><item><title>RE: Using curl library (nrf/ext/curl)</title><link>https://devzone.nordicsemi.com/thread/500432?ContentTypeID=1</link><pubDate>Thu, 29 Aug 2024 13:11:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b1cd6827-8a3f-447a-bb87-ec0916a61619</guid><dc:creator>mark.blackburn.orpyx</dc:creator><description>&lt;p&gt;Thanks, I&amp;#39;ve got that to build.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using curl library (nrf/ext/curl)</title><link>https://devzone.nordicsemi.com/thread/500382?ContentTypeID=1</link><pubDate>Thu, 29 Aug 2024 09:02:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:652a40c6-f8f3-4310-b859-b6ebaad220d5</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;You could try out the changes shown below and build for nrf9160dk_nrf9160_ns board target.&lt;br /&gt;&lt;br /&gt;CMakeLists.txt&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;target_sources(app PRIVATE src/main.c)
target_include_directories(app PRIVATE C:/ncs/v2.6.1/nrf/ext/curl/include/)&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;main.c&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;#if !defined(CONFIG_NET_SOCKETS_POSIX_NAMES)
#include &amp;lt;zephyr/posix/sys/socket.h&amp;gt;
#else
#include &amp;lt;zephyr/net/socket.h&amp;gt;
#endif

#include &amp;lt;nrf_curl.h&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;prj.conf&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;#
# Copyright (c) 2021 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

CONFIG_DOWNLOAD_CLIENT=y
CONFIG_DOWNLOAD_CLIENT_STACK_SIZE=4096

# Networking
CONFIG_NETWORKING=y
CONFIG_NET_CONNECTION_MANAGER=y
CONFIG_NET_SOCKETS=y
#CONFIG_NET_SOCKETS_POSIX_NAMES=y
CONFIG_NET_IPV4=y
CONFIG_HEAP_MEM_POOL_SIZE=1024


CONFIG_POSIX_API=y
CONFIG_NEWLIB_LIBC=y
CONFIG_NRF_CURL=y
CONFIG_PTHREAD_IPC=n
CONFIG_NRF_CURL_INTEGRATION=y
&lt;/pre&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using curl library (nrf/ext/curl)</title><link>https://devzone.nordicsemi.com/thread/500246?ContentTypeID=1</link><pubDate>Wed, 28 Aug 2024 14:34:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1385b2d7-b5d9-4b5a-a3e0-dac7a4e36e3a</guid><dc:creator>mark.blackburn.orpyx</dc:creator><description>&lt;p&gt;I&amp;#39;m using nrf9160dk_nrf9160_ns.&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s the build command VS Code generated:&lt;/p&gt;
&lt;p&gt;west build --build-dir c:/Users/MarkBlackburn/Documents/git/nrf9160_samples/curl_test/build_dk c:/Users/MarkBlackburn/Documents/git/nrf9160_samples/curl_test --pristine --board nrf9160dk_nrf9160_ns --no-sysbuild -- -DNCS_TOOLCHAIN_VERSION=NONE -DBOARD_ROOT=c:/users/markblackburn/board-roots;c:/users/markblackburn/documents/git/nrf9160_samples/curl_test&lt;/p&gt;
&lt;p&gt;I had earlier renamed the download sample to curl_test&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve updated CMakeLists.txt to add the folder for the sys/socket.h include. Now I&amp;#39;m stuck on link errors as I don&amp;#39;t know how to add the .c files for the nrf/ext/curl folder.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;target_include_directories(app PRIVATE ${ZEPHYR_BASE}/../nrf/ext/curl/include/)
target_include_directories(app PRIVATE ${ZEPHYR_BASE}/include/zephyr/posix/)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using curl library (nrf/ext/curl)</title><link>https://devzone.nordicsemi.com/thread/500242?ContentTypeID=1</link><pubDate>Wed, 28 Aug 2024 14:25:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dfb042a2-1713-4923-a208-65fb78ad529e</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;Which board do you use?&lt;br /&gt;&lt;br /&gt;Can you provide your build command?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>