<?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>Unable to use FLASH_DT macros, lte_lc driver after updating to tag v1.3.0. lte_lc driver has a compilation issue and also doesnt work while calling &amp;quot;connect&amp;quot;. the zephyr OS halts. never seen this issue in 1.2.0.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/62884/unable-to-use-flash_dt-macros-lte_lc-driver-after-updating-to-tag-v1-3-0-lte_lc-driver-has-a-compilation-issue-and-also-doesnt-work-while-calling-connect-the-zephyr-os-halts-never-seen-this-issue-in-1-2-0</link><description>I want to repeat that everything worked great in 1.2.0. 
 ------------------------------------------------------------------- ------------------------------------------------------------------- --------------------------------------------------------</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 06 Jul 2020 23:20:06 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/62884/unable-to-use-flash_dt-macros-lte_lc-driver-after-updating-to-tag-v1-3-0-lte_lc-driver-has-a-compilation-issue-and-also-doesnt-work-while-calling-connect-the-zephyr-os-halts-never-seen-this-issue-in-1-2-0" /><item><title>RE: Unable to use FLASH_DT macros, lte_lc driver after updating to tag v1.3.0. lte_lc driver has a compilation issue and also doesnt work while calling "connect". the zephyr OS halts. never seen this issue in 1.2.0.</title><link>https://devzone.nordicsemi.com/thread/258688?ContentTypeID=1</link><pubDate>Mon, 06 Jul 2020 23:20:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:906e5ad5-789a-4722-8234-01fbb06d261d</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;At the moment a huge part of the support team is currently on vacation, and you may experience delayed answers.&lt;/p&gt;
&lt;p&gt;You could check out &lt;a href="https://github.com/zephyrproject-rtos/zephyr/issues/12820"&gt;this link&lt;/a&gt;, which discusses occurring usage faults when CONFIG_NO_OPTIMIZATION=y. However, it seems like that is for an older NCS version, so I&amp;#39;m not sure if it&amp;#39;s related.&lt;/p&gt;
&lt;p&gt;If that link didn&amp;#39;t help, please ask and I will look into it in more details/get in touch with the developers.&lt;/p&gt;
&lt;p&gt;However, if you had a simple way (step-by-step) for me to reproduce this behavior that would be helpful.&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: Unable to use FLASH_DT macros, lte_lc driver after updating to tag v1.3.0. lte_lc driver has a compilation issue and also doesnt work while calling "connect". the zephyr OS halts. never seen this issue in 1.2.0.</title><link>https://devzone.nordicsemi.com/thread/258603?ContentTypeID=1</link><pubDate>Mon, 06 Jul 2020 12:42:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:43717228-ed84-41f3-959f-553ecbc1705b</guid><dc:creator>emeralddragon</dc:creator><description>&lt;p&gt;Hi Simon, My colleague was debugging the same and recommends the following config:&lt;/p&gt;
&lt;p&gt;CONFIG_NO_OPTIMIZATIONS=n&lt;br /&gt;CONFIG_SIZE_OPTIMIZATIONS=n&lt;/p&gt;
&lt;p&gt;This fixed the fault and I can proceed. Apparently there are some constraints on the AT command buffers based on these settings. Can you help&amp;nbsp;us understand these configs better? why did it work?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to use FLASH_DT macros, lte_lc driver after updating to tag v1.3.0. lte_lc driver has a compilation issue and also doesnt work while calling "connect". the zephyr OS halts. never seen this issue in 1.2.0.</title><link>https://devzone.nordicsemi.com/thread/258102?ContentTypeID=1</link><pubDate>Thu, 02 Jul 2020 12:43:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:77658ef2-00fe-49bb-889f-67f925227f62</guid><dc:creator>emeralddragon</dc:creator><description>&lt;p&gt;Hi Simon,&lt;/p&gt;
&lt;p&gt;Yes let me clarify:&lt;strong&gt;&lt;span style="text-decoration:underline;"&gt;Flash issue is now compiling and i have tested that it works. Thanks.&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;For the lte_lc driver compilation issue, by including &amp;lt;zephyr.h&amp;gt; along with &amp;lt;modem/lte_lc.h&amp;gt; compilation issue is resolved. but when i run it, I get the usage fault. shown below:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/usagefault_5F00_1.3.0_5F00_lteconnect.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/zephyr.lst"&gt;devzone.nordicsemi.com/.../zephyr.lst&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#include &amp;lt;zephyr.h&amp;gt;
#include &amp;lt;modem/lte_lc.h&amp;gt;
#include &amp;lt;stdio.h&amp;gt;

int lte_init_connect(){
	int err= lte_lc_init();
	if (err) {
		printf(&amp;quot;lte_lc_init failed: %d\n&amp;quot;, err);
		return err;
	}
	else{
		int err = lte_lc_connect();
		if (err) {
			printf(&amp;quot;lte_lc_connect failed: %d\n&amp;quot;, err);
			return err;
		}
	}
	return 0;
}
void main(void){
	int err = lte_init_connect();
	if(err){
		return;
	}
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The &amp;quot;lst&amp;quot; file is attached. Let me know if I can provide further details. I hope you can help me because I am currently blocked by this issue. I have no choice but to revert to 1.2.0 which unfortunately does not support external flash addition which is my final goal. My prj.conf remains the same as shared earlier.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to use FLASH_DT macros, lte_lc driver after updating to tag v1.3.0. lte_lc driver has a compilation issue and also doesnt work while calling "connect". the zephyr OS halts. never seen this issue in 1.2.0.</title><link>https://devzone.nordicsemi.com/thread/257949?ContentTypeID=1</link><pubDate>Wed, 01 Jul 2020 22:09:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a7c038dd-a313-4c4b-bf71-f11501aeec13</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Okay, to make it clear: The&amp;nbsp; &amp;quot;&lt;span&gt;DT_FLASH issue&lt;/span&gt;&amp;quot; is resolved&amp;nbsp;and the &amp;quot;&lt;span&gt;Compilation/usage fault issue&lt;/span&gt;&amp;quot; is not?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to use FLASH_DT macros, lte_lc driver after updating to tag v1.3.0. lte_lc driver has a compilation issue and also doesnt work while calling "connect". the zephyr OS halts. never seen this issue in 1.2.0.</title><link>https://devzone.nordicsemi.com/thread/257845?ContentTypeID=1</link><pubDate>Wed, 01 Jul 2020 12:58:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bfc61f8b-a212-4fd1-88f4-82a7d84915b3</guid><dc:creator>emeralddragon</dc:creator><description>&lt;p&gt;Quick update: The changes you mentioned for flash macros similar to the nvs test&amp;nbsp;&lt;strong&gt;compile&amp;nbsp;&lt;/strong&gt;for v1.3.0.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to use FLASH_DT macros, lte_lc driver after updating to tag v1.3.0. lte_lc driver has a compilation issue and also doesnt work while calling "connect". the zephyr OS halts. never seen this issue in 1.2.0.</title><link>https://devzone.nordicsemi.com/thread/257793?ContentTypeID=1</link><pubDate>Wed, 01 Jul 2020 11:16:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:33789026-7839-4c4c-bc51-7d4c6b659caa</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Sorry for the delay, I&amp;#39;ve been quite busy lately. I will try to get to the bottom of this before Friday.&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: Unable to use FLASH_DT macros, lte_lc driver after updating to tag v1.3.0. lte_lc driver has a compilation issue and also doesnt work while calling "connect". the zephyr OS halts. never seen this issue in 1.2.0.</title><link>https://devzone.nordicsemi.com/thread/257102?ContentTypeID=1</link><pubDate>Fri, 26 Jun 2020 11:06:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:82a36434-ab80-4a90-b437-520b8aa1335b</guid><dc:creator>emeralddragon</dc:creator><description>&lt;p&gt;Sorry for the delayed response.&lt;/p&gt;
&lt;p&gt;&lt;span style="text-decoration:underline;"&gt;&lt;strong&gt;Compilation/usage fault issue: Simplified Code&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;void main(void){&lt;/p&gt;
&lt;p&gt;int err= lte_lc_init();&lt;br /&gt; if (err) {&lt;br /&gt; printf(&amp;quot;lte_lc_init failed: %d\n&amp;quot;, err);&lt;br /&gt; }&lt;/p&gt;
&lt;p&gt;else{&lt;/p&gt;
&lt;p&gt;int err = lte_lc_connect();&lt;br /&gt; if (err) {&lt;br /&gt; printf(&amp;quot;lte_lc_connect failed: %d\n&amp;quot;, err);&lt;br /&gt; }}&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;This doesn&amp;#39;t compile for me. here is my prj.conf:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;# General config&lt;br /&gt;CONFIG_ASSERT=y&lt;br /&gt;CONFIG_LOG=n&lt;br /&gt;CONFIG_LOG_IMMEDIATE=n&lt;br /&gt;#CONFIG_LOG_DEFAULT_LEVEL=4&lt;br /&gt;CONFIG_ZTEST=n&lt;/p&gt;
&lt;p&gt;#CONFIG_STACK_SENTINEL=y&lt;br /&gt;CONFIG_NEWLIB_LIBC=y&lt;br /&gt;CONFIG_CPLUSPLUS=y&lt;br /&gt;CONFIG_STD_CPP14=y&lt;br /&gt;CONFIG_LIB_CPLUSPLUS=y&lt;br /&gt;CONFIG_NO_OPTIMIZATIONS=y&lt;/p&gt;
&lt;p&gt;# Zephyr config&lt;br /&gt;CONFIG_NRFX_RTC=y&lt;br /&gt;CONFIG_NRFX_RTC0=y&lt;br /&gt;CONFIG_NRFX_CLOCK=y&lt;/p&gt;
&lt;p&gt;# Network&lt;br /&gt;CONFIG_NETWORKING=y&lt;br /&gt;CONFIG_NET_NATIVE=n&lt;br /&gt;CONFIG_NET_SOCKETS=y&lt;br /&gt;CONFIG_TLS_CREDENTIALS=y&lt;br /&gt;CONFIG_NET_SOCKETS_SOCKOPT_TLS=y&lt;br /&gt;#CONFIG_NET_SOCKETS_OFFLOAD=y&lt;br /&gt;CONFIG_NET_SOCKETS_LOG_LEVEL_DBG=n&lt;br /&gt;CONFIG_NET_IPV4=y&lt;br /&gt;CONFIG_NET_TCP=y&lt;/p&gt;
&lt;p&gt;# Network debug config&lt;br /&gt;CONFIG_NET_LOG=n&lt;br /&gt;CONFIG_NET_SOCKETS_LOG_LEVEL_DBG=n&lt;br /&gt;CONFIG_NET_HTTP_LOG_LEVEL_DBG=n&lt;/p&gt;
&lt;p&gt;# HTTP&lt;br /&gt;CONFIG_HTTP_CLIENT=y&lt;/p&gt;
&lt;p&gt;# UART interface&lt;br /&gt;CONFIG_SERIAL=n&lt;br /&gt;CONFIG_UART_INTERRUPT_DRIVEN=n&lt;br /&gt;#CONFIG_UART_2_NRF_UARTE=y&lt;br /&gt;#CONFIG_UART_2_NRF_FLOW_CONTROL=y&lt;/p&gt;
&lt;p&gt;# HTTP&lt;br /&gt;CONFIG_HTTP_CLIENT=y&lt;/p&gt;
&lt;p&gt;# BSD library&lt;br /&gt;CONFIG_BSD_LIBRARY=y&lt;br /&gt;# For trace collector&lt;br /&gt;#CONFIG_BSD_LIBRARY_TRACE_ENABLED=y&lt;/p&gt;
&lt;p&gt;# LTE link control&lt;br /&gt;CONFIG_LTE_LINK_CONTROL=y&lt;br /&gt;CONFIG_LTE_AUTO_INIT_AND_CONNECT=n&lt;br /&gt;CONFIG_LTE_NETWORK_MODE_LTE_M=y&lt;br /&gt;CONFIG_LTE_LINK_CONTROL_LOG_LEVEL_DBG=n&lt;br /&gt;CONFIG_LTE_PSM_REQ_RPTAU=&amp;quot;00000110&amp;quot;&lt;br /&gt;CONFIG_LTE_PSM_REQ_RAT=&amp;quot;00000000&amp;quot;&lt;br /&gt;CONFIG_LTE_LOCK_PLMN_STRING=&amp;quot;20408&amp;quot;&lt;br /&gt;CONFIG_LTE_LOCK_PLMN=y&lt;br /&gt;CONFIG_LTE_PDP_CMD=y&lt;br /&gt;CONFIG_LTE_PDP_CONTEXT=&amp;quot;1,\&amp;quot;IP\&amp;quot;,\&amp;quot;ibasis.iot\&amp;quot;&amp;quot;&lt;/p&gt;
&lt;p&gt;# Stacks and heaps: arbitrary&lt;br /&gt;CONFIG_MAIN_STACK_SIZE=4096&lt;br /&gt;CONFIG_HEAP_MEM_POOL_SIZE=16384&lt;br /&gt;#CONFIG_HW_STACK_PROTECTION=y&lt;/p&gt;
&lt;p&gt;# Power management&lt;br /&gt;CONFIG_DEVICE_POWER_MANAGEMENT=y&lt;br /&gt;#CONFIG_SYS_POWER_MANAGEMENT=y&lt;br /&gt;#CONFIG_POWER_OPTIMIZATION_ENABLE=y&lt;/p&gt;
&lt;p&gt;# Fatal error&lt;br /&gt;CONFIG_RESET_ON_FATAL_ERROR=n&lt;/p&gt;
&lt;p&gt;#enable MCUBoot bootloader&lt;br /&gt;#CONFIG_BOOTLOADER_MCUBOOT=y&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;My windows env variables have these set:&lt;/strong&gt;&lt;br /&gt; GNUARMEMB_TOOLCHAIN_PATH : C:\gnuarmemb\8-2019-q3-update&lt;br /&gt; NCS_BASE : C:\xxx&lt;br /&gt; ZEPHYR_TOOLCHAIN_VARIANT : gnuarmemb&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;And i use cmake and ninja to compile:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;cmake -B build -GNinja -DBOARD=nrf9160dk_nrf9160ns -G&amp;quot;Eclipse CDT4 - Ninja&amp;quot; .&amp;quot;&lt;br /&gt;ninja -C&amp;nbsp;build&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;For&amp;nbsp;&lt;span&gt;DT_FLASH issue: I will check and respond on Monday.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to use FLASH_DT macros, lte_lc driver after updating to tag v1.3.0. lte_lc driver has a compilation issue and also doesnt work while calling "connect". the zephyr OS halts. never seen this issue in 1.2.0.</title><link>https://devzone.nordicsemi.com/thread/256783?ContentTypeID=1</link><pubDate>Wed, 24 Jun 2020 21:28:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7e2f03a8-7632-46e8-963c-b2f400153ede</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;&lt;span style="text-decoration:underline;"&gt;Compilation/usage fault issue:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;How can I reproduce the compilation issue?&amp;nbsp;Could you provide me with some piece of code or upload your sample?&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Regarding the usage fault, could you check what function resides&amp;nbsp;at the faulting instruction address. Search for the address in the file&amp;nbsp;&lt;/span&gt;&lt;em&gt;build\zephyr\zephyr.lst&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="text-decoration:underline;"&gt;DT_FLASH issue:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I can see that the lines&amp;nbsp;&lt;em&gt;&lt;span&gt;fs.offset = DT_FLASH_AREA_STORAGE_OFFSET&amp;nbsp;&lt;/span&gt;&lt;/em&gt;and&lt;/p&gt;
&lt;p&gt;&lt;em&gt;flash_get_page_info_by_offs(device_get_binding(DT_FLASH_DEV_NAME)..)&amp;nbsp;&lt;/em&gt;fails. Could you try to use the approach in&amp;nbsp;&lt;em&gt;ncs\zephyr\tests\subsys\fs\nvs\src\main.c--&amp;gt;test_nvs_init()&lt;/em&gt;?&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#define TEST_FLASH_AREA_STORAGE_OFFSET	FLASH_AREA_OFFSET(storage)
.
.
void test_nvs_init(void)
{
.
.
int err;
const struct flash_area *fa;
struct flash_pages_info info;

err = flash_area_open(FLASH_AREA_ID(storage), &amp;amp;fa);
zassert_true(err == 0, &amp;quot;flash_area_open() fail: %d&amp;quot;, err);


fs.offset = TEST_FLASH_AREA_STORAGE_OFFSET;
err = flash_get_page_info_by_offs(flash_area_get_device(fa), fs.offset,
				  &amp;amp;info);
.
.&lt;/pre&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></channel></rss>