<?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>How to compile v3.0.x/modules/hal/nordic/nrfx/samples ?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/121946/how-to-compile-v3-0-x-modules-hal-nordic-nrfx-samples</link><description>I was able to complie many of the nrfx/samples under SDK v2.5.0 using VS Code IDE but cannot successfully compile any under SDK v3.0.0 . 
 The [Building and running]: &amp;lt;../../README.md#building-and-running&amp;gt; link referenced in the README.md file of each</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 10 Jun 2025 12:00:04 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/121946/how-to-compile-v3-0-x-modules-hal-nordic-nrfx-samples" /><item><title>RE: How to compile v3.0.x/modules/hal/nordic/nrfx/samples ?</title><link>https://devzone.nordicsemi.com/thread/538651?ContentTypeID=1</link><pubDate>Tue, 10 Jun 2025 12:00:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:42ba9c95-cca5-43dc-a3b6-baa18e57e95c</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi JLE,&lt;/p&gt;
&lt;p&gt;Sounds like a plan. I just want to quickly add that we also maintain a starting example application based on the one you found, but more tailored for NCS. You can find it here:&amp;nbsp;&lt;a href="https://github.com/nrfconnect/ncs-example-application/tree/main/"&gt;nrfconnect/ncs-example-application: NCS example application, based on https://github.com/zephyrproject-rtos/example-application&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If there are no other open topics, please feel free to close this case at your convenience.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Hieu&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to compile v3.0.x/modules/hal/nordic/nrfx/samples ?</title><link>https://devzone.nordicsemi.com/thread/538528?ContentTypeID=1</link><pubDate>Sun, 08 Jun 2025 16:14:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:16d5a435-a734-4727-b093-a17a4e5ac322</guid><dc:creator>jle</dc:creator><description>&lt;p&gt;I was able to build the spim non-blocking example successfully via &amp;#39;Use sysbuild&amp;#39; by modifying the CMakeLists.txt file as you suggested (which is as follows for those who may be interested):&lt;/p&gt;
&lt;p&gt;-------------------&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;cmake_minimum_required(VERSION 3.20.0)&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;if(DEFINED CUSTOM_BOILERPLATE)&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;&lt;span class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;include(${CUSTOM_BOILERPLATE})&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;&lt;span class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;return()&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;endif()&lt;/span&gt;&lt;/p&gt;
&lt;p class="p2"&gt;&lt;span class="s1"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;set(COMMON_PATH ${CMAKE_CURRENT_LIST_DIR}/../../../common)&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;include(${COMMON_PATH}/common.cmake)&lt;/span&gt;&lt;/p&gt;
&lt;p class="p2"&gt;&lt;span class="s1"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;zephyr_get(BOARD SYSBUILD GLOBAL)&lt;/span&gt;&lt;/p&gt;
&lt;p class="p2"&gt;&lt;span class="s1"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;GET_DEVICE_CONFIG_FILES(${BOARD} ../boards)&lt;/span&gt;&lt;/p&gt;
&lt;p class="p2"&gt;&lt;span class="s1"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;project(nrfx_example)&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;target_sources(app PRIVATE main.c)&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;target_include_directories(app PRIVATE ../../../common)&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;-----------------&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;As far as the &amp;#39;application type&amp;#39;&amp;nbsp; to use I will attempt to migrate my code via the &amp;#39;Creating an Application&amp;#39; section of the following guide:&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;&lt;a href="https://docs.zephyrproject.org/latest/develop/application/index.html#zephyr-workspace-app"&gt;https://docs.zephyrproject.org/latest/develop/application/index.html#zephyr-workspace-app&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;There is even a starting example application provided:&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;&lt;a id="" href="https://github.com/zephyrproject-rtos/example-application"&gt;https://github.com/zephyrproject-rtos/example-application&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;Thanks for your prompt and useful assistance.&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;Regards&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;JLE&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to compile v3.0.x/modules/hal/nordic/nrfx/samples ?</title><link>https://devzone.nordicsemi.com/thread/538482?ContentTypeID=1</link><pubDate>Fri, 06 Jun 2025 19:59:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8646b679-3475-4e14-a7bd-43049632de8d</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi JLE,&lt;/p&gt;
&lt;p&gt;The problem with the nrfx_rng sample is that on the nRF5340, only the network core can access&amp;nbsp;the RNG peripheral, so the sample must be built for the cpunet target.&lt;/p&gt;
&lt;p&gt;However, it still won&amp;#39;t work well because the sample isn&amp;#39;t setup to have an application core image. The&amp;nbsp;application core has ownership over all pins by default, so there must at least be a minimal application that pass the ownership of UART pins to the network core for the nrfx_rng sample to work.&lt;/p&gt;
&lt;p&gt;I will register an issue internally. My apology for the inconvenience. I hope this issue doesn&amp;#39;t block your project.&lt;/p&gt;
&lt;p&gt;Hieu&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to compile v3.0.x/modules/hal/nordic/nrfx/samples ?</title><link>https://devzone.nordicsemi.com/thread/538129?ContentTypeID=1</link><pubDate>Wed, 04 Jun 2025 18:57:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aebede0a-e4ea-4b5a-86e4-b01cfd41721f</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi JLE,&lt;/p&gt;
[quote user="jle"]Unfortunately I was trying to compile the &amp;#39;&lt;span&gt;nrfx-samples-v3.0.0/src/nrfx_rng&amp;#39; sample when I filed my report. That specific sample fails under &amp;#39;Use sysbuild&amp;#39;, &amp;#39;No sysbuild&amp;#39; , and &amp;#39;west ...&amp;#39; command line scenarios. That sample is a red herring for my underlying issue.&lt;/span&gt;[/quote]
&lt;p&gt;This is unfortunate. I will have to revisit this later to see what is wrong with that sample in particular.&lt;/p&gt;
&lt;p&gt;The fact that no-sysbuild works is a big clue. With that, I found that the BOARD variable stays in the list of Sysbuild CMake variable and isn&amp;#39;t passed down to the application build.&lt;/p&gt;
&lt;p&gt;Adding these lines before&amp;nbsp;GET_DEVICE_CONFIG_FILES() in the samples&amp;#39; CMakeLists.txt fixes that build issue:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
zephyr_get(BOARD SYSBUILD GLOBAL)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Having said that, I don&amp;#39;t think it&amp;#39;s a good idea to use the nrfx samples&amp;#39; structure everywhere. The nrfx samples try to be&amp;nbsp;as OS-agnostic as possible, so it has that peculiar setup with the &amp;quot;common&amp;quot; directory.&lt;/p&gt;
[quote user="jle"](2) Is there a guide for the correct way within the SDK v3.0.0 framework to develop (or use&amp;nbsp; available open source ) common source code used by multiple apps? I am not referring to a zephyr driver module for a sensor but more like a quaternion math library.&amp;nbsp;[/quote]
&lt;p&gt;I recommend going over the guides here:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-3.0.2/page/zephyr/connectivity/bluetooth/bluetooth-dev.html"&gt;https://docs.nordicsemi.com/bundle/ncs-3.0.2/page/zephyr/connectivity/bluetooth/bluetooth-dev.html&lt;br /&gt;&lt;/a&gt;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-3.0.2/page/zephyr/develop/application/index.html"&gt;https://docs.nordicsemi.com/bundle/ncs-3.0.2/page/zephyr/develop/application/index.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I believe the application types you are interested in would be Freestanding Application or Workspace Application.&lt;/p&gt;
&lt;p&gt;If you are not totally familiar with Zephyr concepts yet, I recommend the online courses on &lt;a href="https://academy.nordicsemi.com/"&gt;our Developer Academy website&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I hope that is enough for you to&amp;nbsp;progress now. I will figure out what&amp;nbsp;else is wrong with the RNG sample in one to three business days.&lt;/p&gt;
&lt;p&gt;Hieu&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to compile v3.0.x/modules/hal/nordic/nrfx/samples ?</title><link>https://devzone.nordicsemi.com/thread/537935?ContentTypeID=1</link><pubDate>Tue, 03 Jun 2025 18:23:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5c41ff90-fe10-4b06-af0c-fca006f7e773</guid><dc:creator>jle</dc:creator><description>&lt;p&gt;Hi Hieu,&lt;/p&gt;
&lt;p&gt;(1) The Cmake error is indeed what occurred when I was using sysbuild.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Note the &amp;#39;src/nrfx_spim/non_blocking&amp;#39; sample compiles for me when using &amp;#39;No sysbuild&amp;#39;.&lt;/p&gt;
&lt;p&gt;Unfortunately I was trying to compile the &amp;#39;&lt;span class="s1"&gt;nrfx-samples-v3.0.0/src/nrfx_rng&amp;#39; sample when I filed my report. That specific sample fails under &amp;#39;Use sysbuild&amp;#39;, &amp;#39;No sysbuild&amp;#39; , and &amp;#39;west ...&amp;#39; command line scenarios. That sample is a red herring for my underlying issue.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="s1"&gt;My desire is for &amp;#39;Use sysbuild&amp;#39; to work for all of the nrfx samples since I am trying to upgrade my project (which was organized using the directory structure of the nrfx samples) to SDK v3.0.0. In other words I have hierarchically organized&amp;nbsp; legacy library source code needed by many of my apps residing within the equivalent of a&amp;nbsp; &amp;#39;samples/common&amp;#39; directory&amp;#39;.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="s1"&gt;Looking forward to you update regarding the BOARD variable.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="s1"&gt;(2) Is there a guide for the correct way within the SDK v3.0.0 framework to develop (or use&amp;nbsp; available open source ) common source code used by multiple apps? I am not referring to a zephyr driver module for a sensor but more like a quaternion math library.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="s1"&gt;-jle&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to compile v3.0.x/modules/hal/nordic/nrfx/samples ?</title><link>https://devzone.nordicsemi.com/thread/537881?ContentTypeID=1</link><pubDate>Tue, 03 Jun 2025 13:00:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f9068b2c-49a9-447d-99a6-ec6be9002312</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi JLE,&lt;/p&gt;
&lt;p&gt;Is this the error you have got?&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CMake Error at CMakeLists.txt:11 (GET_DEVICE_CONFIG_FILES):
  GET_DEVICE_CONFIG_FILES Macro invoked with incorrect arguments for macro
  named: GET_DEVICE_CONFIG_FILES&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;If so, I have narrowed down the issue to the BOARD variable being not set when this CMake line is run:&lt;br /&gt;&lt;a style="font-family:inherit;" href="https://github.com/zephyrproject-rtos/hal_nordic/blob/nrfx-3.9.0/nrfx/samples/src/nrfx_spim/non_blocking/CMakeLists.txt#L11"&gt;hal_nordic/nrfx/samples/src/nrfx_spim/non_blocking/CMakeLists.txt at nrfx-3.9.0 · zephyrproject-rtos/hal_nordic&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I am unclear why yet. I will continue investigating it and update you this week.&lt;/p&gt;
&lt;p&gt;Hieu&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>