<?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>Project files problem with uart</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/86278/project-files-problem-with-uart</link><description>im trying to use the uart functionality in another project. i implemented uart using the uart example project and i got it working. the next stage is that i want to implement uart in another project. but i cant get it to work. i keep getting errors about</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 31 Mar 2022 08:43:41 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/86278/project-files-problem-with-uart" /><item><title>RE: Project files problem with uart</title><link>https://devzone.nordicsemi.com/thread/360949?ContentTypeID=1</link><pubDate>Thu, 31 Mar 2022 08:43:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:43cf243e-a613-4d61-b102-ad162b7e8d5e</guid><dc:creator>Karl Ylvisaker</dc:creator><description>[quote user="bido1234"]i got it working the problem was the sdk_config.h there were missing lines. so i copied the lines from the uart project sdk_config to the other projects sdk_config and it worked[/quote]
&lt;p&gt;I am happy to hear that you got it working! :)&amp;nbsp;&lt;/p&gt;
[quote user="bido1234"]my question is, what if i didnt see the missing lines in the sdk_config ? the sdk_config is a huge file and it would be understandable if i didnt go over the difference between it and the other sdk_config line by line so is there another way to do this ?[/quote]
&lt;p&gt;That is a fair question, and I suppose it comes down to familiarity with nRF5 SDK development, unfortunately.&lt;br /&gt;We have multiple guides that introduces the nRF5 SDK development and that establishes the importance of the sdk_config.h file, but other than that and its placement right next to main.c in the project hierarchy, there is no explanation for it or documentation in the development environment.&lt;br /&gt;&lt;br /&gt;On a general note about going over file differences I would highly recommend using the diff command (linux) or similar Windows tool to check for differences between two files, so that you may have all the differences highlighted.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Project files problem with uart</title><link>https://devzone.nordicsemi.com/thread/360266?ContentTypeID=1</link><pubDate>Mon, 28 Mar 2022 11:32:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2eb01961-8b2a-44c5-af46-ff456afe5c91</guid><dc:creator>bido1234</dc:creator><description>&lt;p&gt;i got it working the problem was the sdk_config.h there were missing lines. so i copied the lines from the uart project sdk_config to the other projects sdk_config and it worked. my question is, what if i didnt see the missing lines in the sdk_config ? the sdk_config is a huge file and it would be understandable if i didnt go over the difference between it and the other sdk_config line by line so is there another way to do this ?&lt;/p&gt;
&lt;p&gt;and thank you for replying&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Project files problem with uart</title><link>https://devzone.nordicsemi.com/thread/360263?ContentTypeID=1</link><pubDate>Mon, 28 Mar 2022 11:25:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:52c85322-de59-4636-86ec-222d6f2db2be</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello bido1234,&lt;/p&gt;
[quote user="bido1234"]&lt;p&gt;and what i did till now was insert the files of app_uart.c and app_uart_fifo.c and retarget.c to my project by usineg &amp;quot;add existing files&amp;quot;&lt;/p&gt;
&lt;p&gt;then i added the directory of app_uart.h by project-&amp;gt;options-&amp;gt;preprocessor-&amp;gt; user include directories&lt;/p&gt;
&lt;p&gt;right now it is giving me this error (undefined reference to `app_uart_init&amp;#39;) which is a function called in app_uart.h and is defined in app_uart_fifo.c&lt;/p&gt;
&lt;p&gt;any suggestions whether im in the right path or what am i missing ?&lt;/p&gt;[/quote]
&lt;p&gt;It sounds like you have done most of it correct already, but could you also confirm whether or not you have made any changes to the sdk_config.h file? This file will need to be edited to enable and configure new peripherals and libraries from the SDK. For the app_uart you will need APP_UART_ENABLED defined in your sdk_config.h.&lt;br /&gt;&lt;br /&gt;Furthermore, you should make sure that the sdk_config.h file does not contain any conflicting legacy defines and configurations when you are intending to use the nrfx drivers (such as the legacy UART_ENABLED define, when you intend to use the NRFX_UART_ENABLED, for example).&lt;br /&gt;If these legacy definitions are present they will through the apply_old_config file overwrite your nrfx driver configuration at compile-time.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Project files problem with uart</title><link>https://devzone.nordicsemi.com/thread/360117?ContentTypeID=1</link><pubDate>Sat, 26 Mar 2022 18:19:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:064b98c0-430c-4e95-b930-55903c1a335a</guid><dc:creator>bido1234</dc:creator><description>&lt;p&gt;for more details here is my main.c&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#include &amp;lt;stdbool.h&amp;gt;
#include &amp;lt;stdint.h&amp;gt;
#include &amp;lt;stdio.h&amp;gt;
#include &amp;quot;app_uart.h&amp;quot;
#include &amp;quot;nrf52840.h&amp;quot;
#include &amp;quot;nrf_delay.h&amp;quot;
#include &amp;quot;nrf.h&amp;quot;
#include &amp;quot;nrf_uart.h&amp;quot;
#include &amp;quot;boards.h&amp;quot;

#define UART_TX_BUFF_SIZE  128
#define UART_RX_BUFF_SIZE  128

#define UART_HWFC APP_UART_FLOW_CONTROL_DISABLED

void uart_err_handle(app_uart_evt_type_t* p)
{
    
}

int main(void)
{
   nrf_gpio_cfg_output(13);
   nrf_gpio_pin_set(13);
nrf_gpio_pin_clear(13);
uint32_t err_code;
   const app_uart_comm_params_t com_params = 
  {8, //RX
   6, //TX
   5,
   7,
   UART_HWFC,
   false,
   NRF_UART_BAUDRATE_9600};

   APP_UART_FIFO_INIT(&amp;amp;com_params,UART_RX_BUFF_SIZE,UART_TX_BUFF_SIZE,uart_err_handle,APP_IRQ_PRIORITY_LOWEST,err_code);
   
   while(1)
    {
      printf(&amp;quot;done&amp;quot;);
      nrf_delay_ms(500);
    }
   
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;and what i did till now was insert the files of app_uart.c and app_uart_fifo.c and retarget.c to my project by usineg &amp;quot;add existing files&amp;quot;&lt;/p&gt;
&lt;p&gt;then i added the directory of app_uart.h by project-&amp;gt;options-&amp;gt;preprocessor-&amp;gt; user include directories&lt;/p&gt;
&lt;p&gt;right now it is giving me this error (undefined reference to `app_uart_init&amp;#39;) which is a function called in app_uart.h and is defined in app_uart_fifo.c&lt;/p&gt;
&lt;p&gt;any suggestions whether im in the right path or what am i missing ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>