<?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>Facing issue in RTC</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/113239/facing-issue-in-rtc</link><description>I want to use RTC in my project. I&amp;#39;m facing build issue (undefined reference to `__device_dts_ord_113&amp;#39;) in my project . 
 STEPS TAKEN: 1. I have enabled the RTC configuration in your prj.conf file. 2. I have define the RTC node and alias in my DTS file</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 24 Jul 2024 09:23:21 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/113239/facing-issue-in-rtc" /><item><title>RE: Facing issue in RTC</title><link>https://devzone.nordicsemi.com/thread/495378?ContentTypeID=1</link><pubDate>Wed, 24 Jul 2024 09:23:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:05fe7589-3df1-423e-883b-64d619e587bd</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Can you try:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Removing everything in main(). Does it build successfully?&lt;/li&gt;
&lt;li&gt;Try adding line by line, until it fails to build and produces the same error message.&lt;/li&gt;
&lt;li&gt;After what line added, does it produce the same error message?&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Facing issue in RTC</title><link>https://devzone.nordicsemi.com/thread/494956?ContentTypeID=1</link><pubDate>Mon, 22 Jul 2024 05:16:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:16d411c2-0aaa-4bbf-8319-eb743f86b754</guid><dc:creator>sasikumar p</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have shared the file here.&lt;/p&gt;
&lt;p&gt;The 390th line is the last line of the code.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;I have built the code with the commented lines so that it shows 390 lines, but my actual code is given below. I have done this to ensure that line 390 corresponds to the last line of the code. Please review the provided code to help identify any issues or errors that might be present&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#include &amp;lt;zephyr/drivers/rtc.h&amp;gt;

#include &amp;lt;zephyr/logging/log.h&amp;gt;
LOG_MODULE_REGISTER(main, CONFIG_APP_LOG_LEVEL);

/*
===========================
 project Includes
===========================
*/
#include &amp;quot;main.h&amp;quot;

/*
=================================
 Macro Definitions
=================================
*/

#define RTC_TEST_ALARM_SET_TIME		      (1609507790)

static const struct device *rtc = DEVICE_DT_GET(DT_ALIAS(rtc));



#include &amp;lt;zephyr/types.h&amp;gt;
#include &amp;lt;stddef.h&amp;gt;
#include &amp;lt;string.h&amp;gt;
#include &amp;lt;errno.h&amp;gt;
#include &amp;lt;zephyr/sys/printk.h&amp;gt;
#include &amp;lt;zephyr/sys/byteorder.h&amp;gt;
#include &amp;lt;soc.h&amp;gt;
int main(void)
{
	int err;
	int ret;
    time_t timer_set;
  //  time_t timer_get;
	struct rtc_time time_set;


	printk(&amp;quot;Starting GATT Discovery Manager example\n&amp;quot;);
	/* Initialize RTC time to set */
	timer_set = RTC_TEST_ALARM_SET_TIME;

	gmtime_r(&amp;amp;timer_set, (struct tm *)(&amp;amp;time_set));

	time_set.tm_isdst = -1;
	time_set.tm_nsec = 0;

	
	/* Set RTC time */
	ret = rtc_set_time(rtc, &amp;amp;time_set);
	printk(&amp;quot;rtc_set_time done\n&amp;quot;);
	//printk(&amp;quot;Failed to set time&amp;quot;);
	
      //  ret = rtc_get_time(rtc, &amp;amp;time_get);
		printk(&amp;quot;rtc_get_time done\n&amp;quot;);

	
	return 0;
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Sasikumar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Facing issue in RTC</title><link>https://devzone.nordicsemi.com/thread/494831?ContentTypeID=1</link><pubDate>Fri, 19 Jul 2024 13:36:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fcc8b916-a593-4185-802f-e6e73baf7e31</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;can you share that file?&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Facing issue in RTC</title><link>https://devzone.nordicsemi.com/thread/494798?ContentTypeID=1</link><pubDate>Fri, 19 Jul 2024 12:15:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6647a487-f0b2-483b-b85a-2ed7e2d542cb</guid><dc:creator>sasikumar p</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;span&gt;/main.c:390:&amp;nbsp;}&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Line 390 is closed curly bracket&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Facing issue in RTC</title><link>https://devzone.nordicsemi.com/thread/494781?ContentTypeID=1</link><pubDate>Fri, 19 Jul 2024 11:42:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:062aeb91-7757-4a3f-bc9f-c049b978a59c</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]/main.c:390: undefined reference to `__device_dts_ord_113&amp;#39;[/quote]
&lt;p&gt;What is at line 390 in the main.c file?&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>