<?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>Difficult to use nRF5x SDK from scratch!</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/54157/difficult-to-use-nrf5x-sdk-from-scratch</link><description>Whose idea was it to make creating a new project from scratch so difficult (if not impossible)???? 
 I have created numerous projects using the nRF5x, but have always used an example project as the starting point. However, when I want to do something</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sun, 24 May 2020 22:05:25 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/54157/difficult-to-use-nrf5x-sdk-from-scratch" /><item><title>RE: Difficult to use nRF5x SDK from scratch!</title><link>https://devzone.nordicsemi.com/thread/251368?ContentTypeID=1</link><pubDate>Sun, 24 May 2020 22:05:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:290a3c86-e56b-4d23-a30d-e8ab6d46e829</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Thank you for the feedback. I have forwarded this ticket internally and hopefully we can use the feedback from you and the others to improve the nRF5 SDK.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;
&lt;div style="left:148px;top:22.331px;"&gt;
&lt;div&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Difficult to use nRF5x SDK from scratch!</title><link>https://devzone.nordicsemi.com/thread/248331?ContentTypeID=1</link><pubDate>Wed, 06 May 2020 06:09:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:88051503-56b0-415c-a395-8b76e3506a3b</guid><dc:creator>tim.hsu</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/hnhoan"&gt;Nguyen Hoan Hoang&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;As a experienced C++ developer, I can&amp;#39;t stand myself using example project as starting point. Most SDK examples are not minimal, they use their higher level abstraction with app library. Many components uses app library. Final binary are bloated.&lt;/p&gt;
&lt;p&gt;Yes, you don&amp;#39;t have to change your makefile even it is compiling unused component. The evil sdk_config look fine at first, but it limits you from every customization.&amp;nbsp;&amp;nbsp;sdk_config is like a second build system inside GNU make.&amp;nbsp; It will change the compiled logic in the SDK and your program. A single line of change in sdk_config.h will cause complete rebuild of whole project.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;- &amp;quot;&lt;span&gt;I think configurations can be quite useful when developing an application. It enables the developer to pick and choose specific features and libraries, and to configure the pins and parameters of a particluar peripheral (e.g. baudrate and CTS pin of the UART peripheral). I might be wrong, and it may exist other ways of doing it. Do you have any suggestions?&lt;/span&gt;&amp;quot;&lt;/p&gt;
&lt;p&gt;Pin configuration is okay, but we seldom use old project as starting point because they are too different. Sdk_config really has too many fatal drawback. And there indeed exists other solution, cmake. What should I turn on when enabling a UART? Which lines should I change when I want to use hfclk? The fastest way currently is googling instead of reading document...&lt;/p&gt;
&lt;p&gt;There are too many multi line macro of macro that I should rely on good InteliSense system. I found some macro even insert a new section in silence(&lt;span&gt;NRF_SDH_BLE_OBSERVER). It&amp;#39;s not suppose to be used twice (even the function is not called.)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;void BLE::services_init()
{
    // ...
    NRF_SDH_BLE_OBSERVER(m_qwr_obs, NRF_BLE_QWR_BLE_OBSERVER_PRIO, nullptr, &amp;amp;m_qwr);
    
}

void BLE::services_init2_notcalled()
{
    // ....
    NRF_SDH_BLE_OBSERVER(m_qwr_obs, NRF_BLE_QWR_BLE_OBSERVER_PRIO, nullptr, &amp;amp;m_qwr);
    
}&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Writing a custom linker script is hard too. There are too many pre-defined symbol secretly used by SDK. I have two chips on my board. The bootloader example is pretty much useless too.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;At first glance, I think SoftDevice occupying my 0x0 address is rude. But the experience of using sdk is even worse. I&amp;#39;d rather it behave like SoftDevice, a standalone library.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Difficult to use nRF5x SDK from scratch!</title><link>https://devzone.nordicsemi.com/thread/234088?ContentTypeID=1</link><pubDate>Thu, 13 Feb 2020 04:50:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9d5c4fe8-7bc5-49a1-aa54-5d34d17071d2</guid><dc:creator>jcondon</dc:creator><description>&lt;p&gt;A couple tips to make the SDK better:&lt;/p&gt;
&lt;p&gt;1) Use relative path structures for includes (e.g. #include &amp;quot;/components/ble/nrf_ble_gatt.h&amp;quot;). This way developers only need to include the base path in their project and not dozens.&lt;/p&gt;
&lt;p&gt;2) Avoid preprocessor definitions buried in project definitions. This obfuscates functionality and makes setup difficult&lt;/p&gt;
&lt;p&gt;3) Avoid multi-layer macros. For example, the NRF_SDH_STATE_OBSERVER&amp;nbsp;could be replaced by allowing the user to&amp;nbsp;register a function pointer during boot.&lt;/p&gt;
&lt;p&gt;4)&amp;nbsp;Limit/Avoid the huge multi-layer structures of structures of structures.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;5) Update ALL examples and tutorials to use the latest, best practices when a new SDK is released e.g. v15-&amp;gt;v16) and then test them. Yea, it&amp;#39;s a lot of work, but so is digging through broken example code.&lt;/p&gt;
&lt;p&gt;6) Include explicit examples of &amp;quot;best practices&amp;quot; for functionality&amp;nbsp;not things buried in other examples. I shouldn&amp;#39;t have to figure out that the&amp;nbsp;hrs example handles advertising in a different way than the uart example.&lt;/p&gt;
&lt;p&gt;Bonus Points: It&amp;#39;s 2020. Release a C++ based SDK! It can create a clean, type-safe, well defined interface. Rather than littered globals, make private members. Rather than #defines, use const and constexpr. Hide members as private and provide clearly defined methods to initialize, set, and get the object.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Difficult to use nRF5x SDK from scratch!</title><link>https://devzone.nordicsemi.com/thread/234086?ContentTypeID=1</link><pubDate>Thu, 13 Feb 2020 04:27:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:98cfa73c-81c1-424d-a376-4ddd27f5a3e1</guid><dc:creator>jcondon</dc:creator><description>&lt;p&gt;100% Agree. I have worked with many SDKs from various manufacturers and this is close to the worst.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Difficult to use nRF5x SDK from scratch!</title><link>https://devzone.nordicsemi.com/thread/230891?ContentTypeID=1</link><pubDate>Fri, 24 Jan 2020 14:12:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7ce17e6f-36d6-4956-8e64-013afa1a47da</guid><dc:creator>Steven</dc:creator><description>&lt;p&gt;Thanks both, will read and reflect :o)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Difficult to use nRF5x SDK from scratch!</title><link>https://devzone.nordicsemi.com/thread/230877?ContentTypeID=1</link><pubDate>Fri, 24 Jan 2020 13:53:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3743c3fe-a255-4e1e-9b6c-1d0bbc6772e9</guid><dc:creator>Nguyen Hoan Hoang</dc:creator><description>&lt;p&gt;That is how this library &lt;a href="https://github.com/IOsonata/IOsonata"&gt;https://github.com/IOsonata/IOsonata&lt;/a&gt; is implemented. &amp;nbsp;No hardcoded compilation define, such thing as sdk_config. &amp;nbsp;Although documentation are not yet avail. The code are self-explanatory and simple to use. &amp;nbsp;See Blog how to write BLE firmware in a few lines of code&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/writing-ble-firmware-with-a-few-lines-of-code-part"&gt;https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/writing-ble-firmware-with-a-few-lines-of-code-part&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;many peripheral&amp;nbsp;examples :&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/IOsonata/IOsonata/tree/master/exemples"&gt;https://github.com/IOsonata/IOsonata/tree/master/exemples&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;BLE examples :&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/IOsonata/IOsonata/tree/master/ARM/Nordic/exemples"&gt;https://github.com/IOsonata/IOsonata/tree/master/ARM/Nordic/exemples&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;To use periph simply file out the config data structure with the pins to se, rate,.. &amp;nbsp;Call Init function with it to initialize. &amp;nbsp;Then use Tx/Rx ... No hassle. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;Writing BLE firmware is the same configuration data structure to set service/chrac, ble type and call Init. Then just handle event callbacks. &amp;nbsp;See blogs&amp;nbsp;&lt;a href="https://embeddedsoftdev.blogspot.com/2018/02/bluetooth-le-with-nordic-nrf51-nrf52.html"&gt;https://embeddedsoftdev.blogspot.com/2018/02/bluetooth-le-with-nordic-nrf51-nrf52.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Difficult to use nRF5x SDK from scratch!</title><link>https://devzone.nordicsemi.com/thread/230870?ContentTypeID=1</link><pubDate>Fri, 24 Jan 2020 13:33:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b12462b3-a09b-42f7-97d4-100497c05f93</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Here are some snippets that might be of interest:&amp;nbsp;&lt;a href="https://github.com/andenore/NordicSnippets"&gt;https://github.com/andenore/NordicSnippets&lt;/a&gt;. It includes a set of examples showing how to use the different peripherals, using the registers directly and without any layers of abstractions.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Difficult to use nRF5x SDK from scratch!</title><link>https://devzone.nordicsemi.com/thread/230860?ContentTypeID=1</link><pubDate>Fri, 24 Jan 2020 13:01:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:315f054d-78d7-44d6-bd8e-8c3830543590</guid><dc:creator>Steven</dc:creator><description>&lt;p&gt;Agree completely with this. The SDK is a bloated mess, too many layers of abstraction.&amp;nbsp;What I want from Nordic:&lt;/p&gt;
&lt;p&gt;1. Driver files for each peripheral type eg adc, uart, i2c, spi, gpio, timers, counters etc. Helper functions/macros to initialise/configure the peripheral and read/write, enable/disable each. At a level that I can plainly follow the hardware datasheet and see the relationship between the code and the hardware, poke and prod and play around until I can get to grips with how it works.&lt;br /&gt; &lt;br /&gt;2. I want to bring up custom hardware from scratch to basic functionality (eg GPIO configured, UART active) in 30 minutes. I am talking a basic blinky, &amp;quot;hello world&amp;quot; level of operation where I can validate that the hardware works/doesn&amp;#39;t smoke.&lt;/p&gt;
&lt;p&gt;3. I want to be able to add the features I need by doing a #include to ONE FILE for EACH feature/peripheral. No massively complex interdependencies with 13000 lines of macros just to setup a project.&lt;/p&gt;
&lt;p&gt;4. I want to be able to bring up/code each peripheral in stages. So I can test each part of the board in isolation. Incremental development.&lt;/p&gt;
&lt;p&gt;5. RTOS features to be OPTIONAL and MINIMAL, easily explained and understood and well documented with comprehensive examples. Often I don&amp;#39;t need these features at all - a simple state machine is adequate. If I do I want RTOS features I want them to be simple and relate-able. INTERRUPT&amp;gt;EVENT&amp;gt;QUEUE&amp;gt;HANDLER&amp;gt;CALLBACK is sufficient.&lt;/p&gt;
&lt;p&gt;6. I want to be able to sit and write code, to be creative, develop solutions and not spend all my time reading through pages and pages of documents just to get started. At present the sdk requires too much mental overhead and this I am sure makes for less reliable solutions.I have been working with the nrf52832 for 18 months now, with the sdk, mbed and now zephyr and all of these just feel brittle, with simple features (power management)&amp;nbsp;not working predictably. I am convinced that it is because of the weakness of the sdk.&lt;/p&gt;
&lt;p&gt;Rant over ;o)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Difficult to use nRF5x SDK from scratch!</title><link>https://devzone.nordicsemi.com/thread/220938?ContentTypeID=1</link><pubDate>Tue, 19 Nov 2019 18:10:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:25269e45-2dca-4102-8a7c-bc4aa1f1941d</guid><dc:creator>sgetz</dc:creator><description>&lt;p&gt;I would be interested in you &amp;quot;base project&amp;quot;.&lt;/p&gt;
&lt;p&gt;Recently, I have been writing my own simplified version of many of the libraries to avoid using the overly complex ones in the SDK.&amp;nbsp; For instance, I can turn on the LFCLK and configure it with a few register writes.&amp;nbsp; The SDK way involves multiple libraries and effect a number of other things that are not known unless you reverse engineer the SDK.&lt;/p&gt;
&lt;p&gt;The libraries provided by mBed and Arduino may not cover everything, but they are infinitely easier to use and configure!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Difficult to use nRF5x SDK from scratch!</title><link>https://devzone.nordicsemi.com/thread/220935?ContentTypeID=1</link><pubDate>Tue, 19 Nov 2019 17:45:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2ad1faf0-495c-4cbd-8bd9-dfa74831b436</guid><dc:creator>Duy</dc:creator><description>&lt;p&gt;I created a base project from scratch and I store it in the master branch of gitlab, whenever I have new project, I will create a new branch from master. If you want the use it, I can share the gitlab repository with you, it is already be updated to 16.0.0 There are both advantages and disadvantages of creating a project from scratch:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Advantages:&lt;/p&gt;
&lt;p&gt;1. You will understand the SDK + peripehral better and deeper.&lt;/p&gt;
&lt;p&gt;2. You can manage and develope your programme better.&lt;/p&gt;
&lt;p&gt;3. You learn to be more patient.&lt;/p&gt;
&lt;p&gt;4. Your reading skill and coding management skill is improved.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Disadvantages:&lt;/p&gt;
&lt;p&gt;1. Time consuming.&lt;/p&gt;
&lt;p&gt;2. Hard to start for a newbie. I started using Nordic in July 2017 when I was a senior year student working on my thesis and I almost went crazy. But now I love Nordic Semi.&lt;/p&gt;
&lt;p&gt;3. You gonna go crazy when there is a new update comming.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Just a small sharing with you. Hope you enjoy it.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; Duy&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Difficult to use nRF5x SDK from scratch!</title><link>https://devzone.nordicsemi.com/thread/219772?ContentTypeID=1</link><pubDate>Tue, 12 Nov 2019 22:45:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f45f0dd9-3250-49a8-88b5-ebdbf853bae4</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Thanks for the feedback from everybody, it is appreciated. I will get in touch with the developers responsible for creating the nRF5 SDK, who also has more insight about this.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Difficult to use nRF5x SDK from scratch!</title><link>https://devzone.nordicsemi.com/thread/219749?ContentTypeID=1</link><pubDate>Tue, 12 Nov 2019 17:26:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bc391afa-6624-43b6-9d2c-cb2fd3865b02</guid><dc:creator>Billy-IV</dc:creator><description>&lt;p&gt;Simon,&lt;/p&gt;
&lt;p&gt;I am relatively new to developing with Nordic Semiconductor.&amp;nbsp; Therefore, I cannot reference early SDK versions.&amp;nbsp; As such I have the perspective of someone who is constantly trying to learn from scratch how the SDK works and how to get the stack and hardware to do what I need it to do. In this process I have found a number of things difficult when using the NRF5 and the NRF Mesh SDK&amp;#39;s.&amp;nbsp;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;First, the documentation of lower layers and configuration files lack all the needed information to quickly use them.&amp;nbsp; Often comments for variables, type def&amp;#39;s, and functions say &amp;quot;X is X.&amp;quot;&amp;nbsp; The infocenter usually says the same thing as in the code. Therefore, connections between different configure variables are not apparent.&amp;nbsp; For instance, my colleague set the max value for an element but did not realize that there was a max value for the whole node as well.&amp;nbsp; When provisioning the node failed he spent nearly a week troubleshooting the provisioner and element instances.&amp;nbsp; It&amp;#39;s instances like this that reveal the weak points in the documentation.&lt;br /&gt;&lt;br /&gt;The config.h file is exceptionally long as previously mentioned. The steps provided by Simon see quote can be quite labor intensive, and speaks to the reality that there is not an easy way to start a project from scratch without having to use an example as a base.&amp;nbsp; Finally, I am not sure if I saw any explanation of the &amp;lt;e&amp;gt; to &amp;lt;/e&amp;gt; before reading this post.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote userid="72692" url="~/f/nordic-q-a/54157/difficult-to-use-nrf5x-sdk-from-scratch/219370"]&lt;ul&gt;&lt;li&gt;&lt;span&gt;Look into drivers/sub drivers, ...&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span&gt;Search for the config in the sdk_config.h of ...&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span&gt;Copy this config, and the associated configs into the sdk_config.h file of the ble_app_uart project&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span&gt;E.g. if SPI_ENABLED is the config you are looking for, then include all the configs that are &amp;quot;caught&amp;quot; between &lt;em&gt;&amp;lt;e&amp;gt;&lt;/em&gt; and&amp;nbsp;&amp;nbsp;&lt;em&gt;&amp;lt;/e&amp;gt;&amp;nbsp;&lt;/em&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span&gt;// &amp;lt;e&amp;gt; SPI_ENABLED ...&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;[/quote]
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;To address my statement of bloat within the code, I use abstraction to make development easier and so does the SDK code.&amp;nbsp; However, there are points that have unnecessary levels of abstraction.&amp;nbsp; There are declarations like this&amp;nbsp;&amp;quot;typedef struct __generic_onoff_server_t generic_onoff_server_t;&amp;quot; where the __generic_onoff_server_t is only used to define generic_onoff_server_t.&amp;nbsp; It is a typedef that just references a different typedef.&amp;nbsp; These are all over the place function definitions that only reference other function definitions.&amp;nbsp; This makes it difficult to track what is happening or what is defined as what when diving into the code.&amp;nbsp; I do not understand why this is being done.&amp;nbsp; It adds extra lines of code and hurts the readability of the code.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:inherit;"&gt;Respectfully,&lt;br /&gt;Billy Ivy&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Difficult to use nRF5x SDK from scratch!</title><link>https://devzone.nordicsemi.com/thread/219742?ContentTypeID=1</link><pubDate>Tue, 12 Nov 2019 16:29:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a96187ff-e34d-4372-947d-35fd5602f146</guid><dc:creator>Nguyen Hoan Hoang</dc:creator><description>&lt;p&gt;I second Mojo on that and also add this. &amp;nbsp;The much older SDK has all the includes files in 1 place with few folders underneath for grouping. &amp;nbsp;It was supper easy to add includes path. &amp;nbsp;Now it is all over the places and have to search for them and add a bunch of paths. &amp;nbsp;This is also bad programming practice as well.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Difficult to use nRF5x SDK from scratch!</title><link>https://devzone.nordicsemi.com/thread/219736?ContentTypeID=1</link><pubDate>Tue, 12 Nov 2019 15:56:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c8774ae4-3723-40b8-ad58-34ad09b18e2e</guid><dc:creator>Mojo</dc:creator><description>&lt;p&gt;It is not at all useful, instead it is a useless jungle. &amp;nbsp;The older SDK didn&amp;#39;t have and it was super great and simple. &amp;nbsp;To configure a UART we just need to fill a config data structure with pins, baud rate and call init by passing it as parameter. The same for initializing the Softdevice, we can configure crystal/rc at will. &amp;nbsp;It was simple no mess and nothing was hardcoded. Since the introduction somewhere along the line of SDK10 I think, things got a lot messier with sdk_config.h, everything is hardcoded in it. &amp;nbsp;Due to that, it is not possible to compile the SDK into a lib and reuse in multiple projects. Now we have to add SDK source files to each project and every time we need to add one there is a min of 3 &amp;nbsp;to 20 defines to add to the sdk_config.h. &amp;nbsp;The sdk_config.h ended up with over 300KB near 10000 lines of defines. &amp;nbsp;Isn&amp;#39;t it ridiculous ? Thanks to the new scheme of the SDK I was able to teach the interns a great&amp;nbsp;examples of what a bad programming practice is about. &amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Difficult to use nRF5x SDK from scratch!</title><link>https://devzone.nordicsemi.com/thread/219669?ContentTypeID=1</link><pubDate>Tue, 12 Nov 2019 13:18:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d541dffc-5ebe-464c-97a7-154865769b7c</guid><dc:creator>RSA</dc:creator><description>&lt;p&gt;i Would say that thorough tutorials, about which elements need to be in a standard project, and when to change the cinfig.h (i know that the team is capable of this, since the BLE tutorials were pretty good.). IF i remember correctly it&amp;#39;s rarely mentioned when you need to set a flag when reading in the infocenter. apart from that it&amp;#39;s also often hard to figure out which headerfile to use when looking at functions. I always end up using Atom to search the directory. &lt;/p&gt;
&lt;p&gt;After exploring the SDK for a while i notice alot of the things i spend time trying to figure out in the beginning, are written in the infocenter. Problem is that it&amp;#39;s a labyrinth to navigate.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Difficult to use nRF5x SDK from scratch!</title><link>https://devzone.nordicsemi.com/thread/219639?ContentTypeID=1</link><pubDate>Tue, 12 Nov 2019 11:41:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9d25b498-7c3b-4600-856d-30ea73d7358e</guid><dc:creator>Simon</dc:creator><description>[quote userid="14934" url="~/f/nordic-q-a/54157/difficult-to-use-nrf5x-sdk-from-scratch/219516"]I know the SDK can not be changed quickly, but please bring the concern to the right people in hopes an easier method is found in the future.[/quote]
&lt;p&gt;Do you have any specific suggestions on how to improve the nRF5 SDK? If so, I would appreciate if you could share it with us.&lt;/p&gt;
[quote userid="74486" url="~/f/nordic-q-a/54157/difficult-to-use-nrf5x-sdk-from-scratch/219536"]Another how-to I&amp;#39;d like to see is how to eliminate sdk_config.h completely please and all other config.h as well nrfx, mesh[/quote]
&lt;p&gt;I think configurations can be quite useful when developing an application. It enables the developer to pick and choose specific features and libraries, and to configure the pins and parameters of a particluar peripheral (e.g. baudrate and CTS pin of the UART peripheral). I might be wrong, and it may exist other ways of doing it. Do you have any suggestions?&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;One of our newest products, the nRF9160, supports the nRF Connect SDK. This is a framework based on the &lt;a href="https://www.zephyrproject.org/"&gt;Zephyr Project&lt;/a&gt;, and is quite different from the nRF5 SDK. Check out the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.0.0/nrf/getting_started.html"&gt;nRF Connect SDK documentation&lt;/a&gt; for more information.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Difficult to use nRF5x SDK from scratch!</title><link>https://devzone.nordicsemi.com/thread/219536?ContentTypeID=1</link><pubDate>Mon, 11 Nov 2019 17:45:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:71a2a45a-a937-4519-943f-750daa37553c</guid><dc:creator>Mojo</dc:creator><description>&lt;p&gt;Thanks for the link. &amp;nbsp;Another how-to I&amp;#39;d like to see is how to eliminate sdk_config.h completely please and all other config.h as well nrfx, mesh,.....&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Difficult to use nRF5x SDK from scratch!</title><link>https://devzone.nordicsemi.com/thread/219516?ContentTypeID=1</link><pubDate>Mon, 11 Nov 2019 14:56:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:87f4d289-cc10-4557-8abc-9fe73228f99d</guid><dc:creator>sgetz</dc:creator><description>&lt;p&gt;Thanks Simon.&amp;nbsp; That is what I was attempting to do.&amp;nbsp; Had some problems and got frustrated.&amp;nbsp; I will check out the links you provided.&amp;nbsp; I appreciate your help.&amp;nbsp; I know the SDK can not be changed quickly, but please bring the concern to the right people in hopes an easier method is found in the future.&amp;nbsp; Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Difficult to use nRF5x SDK from scratch!</title><link>https://devzone.nordicsemi.com/thread/219370?ContentTypeID=1</link><pubDate>Sun, 10 Nov 2019 22:15:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:34785ee2-2c25-4eb2-8f54-f3e1d0116462</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;I am sorry that you feel this way and I am thankful for the feedback. I will try to present to you my approach for developing a project and give a collection of links that may help you as well.&lt;/p&gt;
&lt;p&gt;&lt;span style="text-decoration:underline;"&gt;My approach:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;I always start with an existing project, most similar to the end goal and build on that&lt;/li&gt;
&lt;li&gt;I always use a BLE example (if your solution uses BLE, which I assume) as the base project and merge functionality from other projects into that. From my experience that is the easiest approach, not the other way around.
&lt;ul&gt;
&lt;li&gt;E.g. if I want to develop a solution with SPI and BLE, then I start with a BLE project (e.g. examples\ble_app_uart) and use an SPI example (e.g.&lt;em&gt; examples\peripheral\spi&lt;/em&gt;) as a guideline of what to add into it&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Then I add the specific functions into the BLE example, for example, the function&amp;nbsp;&lt;em&gt;nrf_drv_spi_init(..)&amp;nbsp;&lt;/em&gt;from&amp;nbsp;&lt;em&gt;examples\peripheral\spi.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Then I go through these steps:
&lt;ul&gt;
&lt;li&gt;Put the function into &lt;em&gt;main()&lt;/em&gt; and build the example&lt;/li&gt;
&lt;li&gt;Get error messages&lt;/li&gt;
&lt;li&gt;Go into main.c of&amp;nbsp;&lt;em&gt;examples\peripheral\spi&amp;nbsp;&lt;/em&gt;right click on the function&amp;nbsp;&lt;em&gt;nrf_drv_spi_init(..)&amp;nbsp;&lt;/em&gt;and&amp;nbsp;go to the definition (source file) and declaration (header file) of the function&lt;/li&gt;
&lt;li&gt;include the header file at the top of main.c of&amp;nbsp;&lt;span&gt;examples\ble_app_uart&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Add the path of the header file as explained &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/31247/linker-error---segger-embedded-studio/123471#123471"&gt;here&lt;/a&gt;&amp;nbsp;and the source file as explained &lt;a href="https://www.youtube.com/watch?v=t-kh1EbesvI&amp;amp;list=PLx_tBuQ_KSqGHmzdEL2GWEOeix-S5rgTV&amp;amp;index=6"&gt;here&lt;/a&gt;&amp;nbsp;into&amp;nbsp;&lt;span&gt;examples\ble_app_uart&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Build the example (examples\ble_app_uart)&lt;/span&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span&gt;If&amp;nbsp;no errors appear, you have successfully implemented the function&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;If an error appears, follow the steps below&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Look into drivers/sub drivers, and check if the called function is grayed out,&amp;nbsp;and check for the specific config that causes this (in examples\ble_app_uart)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Search for the config in the sdk_config.h of the SPI example (e.g. inside &lt;em&gt;examples\peripheral\spi\pca10040\blank\config&lt;/em&gt;)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Copy this config, and the associated configs into the sdk_config.h file of the ble_app_uart project&lt;/span&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span&gt;E.g. if SPI_ENABLED is the config you are looking for, then include all the configs that are &amp;quot;caught&amp;quot; between &lt;em&gt;&amp;lt;e&amp;gt;&lt;/em&gt; and&amp;nbsp;&amp;nbsp;&lt;em&gt;&amp;lt;/e&amp;gt;&amp;nbsp;&lt;/em&gt;&lt;/span&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span&gt;// &amp;lt;e&amp;gt; SPI_ENABLED - nrf_drv_spi - SPI/SPIM peripheral driver - legacy layer&lt;br /&gt;//==========================================================&lt;br /&gt;#ifndef SPI_ENABLED&lt;br /&gt;#define SPI_ENABLED 1&lt;br /&gt;#endif&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Repeat these steps for all the functions you wish to implement&lt;/span&gt;&lt;span&gt;&lt;/span&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span&gt;Be aware that most of the other SPI functions will work fine after completing this once, and you don&amp;#39;t need to do it again&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span&gt;Following this approach has worked fine for me, and I have never really had any problems&amp;nbsp;merging two projects. If you encounter any specific problems, please create a Devzone ticket and explain it in detail, and someone will help you. I also recommend you to read &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/38149/iar-error-pe020-identifier-nrfx_timer1_inst_idx-is-undefined"&gt;this&lt;/a&gt; and &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/41707/fails-to-use-nrfx-modules"&gt;this&lt;/a&gt; thread regarding NRFX vs. legacy configurations.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="text-decoration:underline;"&gt;Some links&amp;nbsp;you may find helpful:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="text-decoration:underline;"&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/30862/create-a-new-project-in-segger-embedded-stuido/129639#129639"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/30862/create-a-new-project-in-segger-embedded-stuido/129639#129639&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="text-decoration:underline;"&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/28196/graduating-from-example-to-production-project-file-structure"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/28196/graduating-from-example-to-production-project-file-structure&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="text-decoration:underline;"&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/39240/starting-a-new-project-from-scratch"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/39240/starting-a-new-project-from-scratch&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="text-decoration:underline;"&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/20093/what-is-the-best-way-to-merge-two-existing-examples-with-segger-embedded-studio"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/20093/what-is-the-best-way-to-merge-two-existing-examples-with-segger-embedded-studio&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="text-decoration:underline;"&gt;&lt;a href="https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/merging-two-ble-examples-together"&gt;https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/merging-two-ble-examples-together&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="text-decoration:underline;"&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/38054/how-to-combine-two-sdk_config-h-file"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/38054/how-to-combine-two-sdk_config-h-file&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="text-decoration:underline;"&gt;&lt;a href="https://www.youtube.com/watch?v=YZouRE_Ol8g&amp;amp;list=PLx_tBuQ_KSqGHmzdEL2GWEOeix-S5rgTV&amp;amp;index=1"&gt;https://www.youtube.com/watch?v=YZouRE_Ol8g&amp;amp;list=PLx_tBuQ_KSqGHmzdEL2GWEOeix-S5rgTV&amp;amp;index=1&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="text-decoration:underline;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Difficult to use nRF5x SDK from scratch!</title><link>https://devzone.nordicsemi.com/thread/219184?ContentTypeID=1</link><pubDate>Thu, 07 Nov 2019 23:47:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:605f0464-9ed1-45a8-b1a4-5778a491a8de</guid><dc:creator>Nguyen Hoan Hoang</dc:creator><description>&lt;p&gt;Yeah, the sdk_config jungle is absolutely ridiculous. &amp;nbsp;Thousands of compilation definitions. &amp;nbsp;Min of 3 per file to compile,&lt;/p&gt;
&lt;p&gt;I use Eclipse with this library which bypass the low level driver and most of the sdk_config.h stuff. &amp;nbsp;Creating new project with Eclipse is also pretty easy. &amp;nbsp;The library also supports IAR.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/IOsonata/IOsonata"&gt;https://github.com/IOsonata/IOsonata&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Difficult to use nRF5x SDK from scratch!</title><link>https://devzone.nordicsemi.com/thread/219177?ContentTypeID=1</link><pubDate>Thu, 07 Nov 2019 22:03:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:11303148-7a6a-4353-917f-bee21186286e</guid><dc:creator>sgetz</dc:creator><description>&lt;p&gt;I have only been able to do 1 simple one.&amp;nbsp; I tried a complex one and gave up.&lt;/p&gt;
&lt;p&gt;The only hints I can give are that the examples use an abbreviated sdk_config.h file.&amp;nbsp; Using that wil not allow you to select peripherals that are not used in the example.&amp;nbsp; However, there a full generic sdk_config.h for each chip under config/nrf52832/config. (pick the appropriate processor).&amp;nbsp; That is suppose to have all the peripherals in it.&amp;nbsp; You go in and enable periphs. (There is a java tool in external_tools/cmsisconfig/CMSIS_Configurations_Wizard.jar that helps a little.&amp;nbsp; But you still need to know the names of the various thing you are enabling.&amp;nbsp; (Not always easy)&amp;nbsp; Also, the full generic config seems to lack certain things in the example configs.&amp;nbsp; So when I tried to use the full config for an example project, I still could not get it going sometimes.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I edited the include path list in IAR-&amp;gt;Options-&amp;gt;preprocessor.&amp;nbsp; But it takes a long time, and that assumes you understand all the includes needed for what you are doing.&lt;/p&gt;
&lt;p&gt;Hope that helps, but I am still wandering in the wilderness too.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Difficult to use nRF5x SDK from scratch!</title><link>https://devzone.nordicsemi.com/thread/219175?ContentTypeID=1</link><pubDate>Thu, 07 Nov 2019 21:49:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8c303389-4815-4389-afe4-b57b0c26d7f1</guid><dc:creator>Billy-IV</dc:creator><description>&lt;p&gt;I agree the SDK examples are bloated.&amp;nbsp; There are often layers of abstraction that are completely unnecessary.&amp;nbsp; My team has based several aspects on example code only to spend exorbitant amounts of time after we truly understand how it works to write the code more simply.&amp;nbsp; As a question to &lt;a href="https://devzone.nordicsemi.com/members/sgetz"&gt;sgetz&lt;/a&gt; it seems as if you have figure out how to setup a project from scratch.&amp;nbsp; Could you point me in the direction of th 25 documents and 3 classes?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Difficult to use nRF5x SDK from scratch!</title><link>https://devzone.nordicsemi.com/thread/219169?ContentTypeID=1</link><pubDate>Thu, 07 Nov 2019 20:49:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:57261a59-c095-40fa-8287-5205b7e907aa</guid><dc:creator>lobaro-theo</dc:creator><description>&lt;p&gt;Agree in most points.&lt;/p&gt;
&lt;p&gt;I was scared after creating a project from zero just using the softdevice calls how few pieces of software are actually needed to get a simple ble uart runnning...the sdk examples seemed very bloated to me, too.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>