<?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>getenv undefined reference</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/63705/getenv-undefined-reference</link><description>Hello, 
 
 I am trying to use lua script language on nrf52840 board using SES to compile and load code. 
 I already compiled and load some ble tutorials on nrf52840 and it works nicely. 
 My problem now is that I am trying to install lua script on the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 15 Jul 2020 10:19:46 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/63705/getenv-undefined-reference" /><item><title>RE: getenv undefined reference</title><link>https://devzone.nordicsemi.com/thread/260102?ContentTypeID=1</link><pubDate>Wed, 15 Jul 2020 10:19:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e6e4f3cd-0715-4320-8556-8a993172e13c</guid><dc:creator>Richix</dc:creator><description>&lt;p&gt;Hi again,&lt;/p&gt;
&lt;p&gt;With your help I figured out the problem. I just needed to remove some of the library from lua that need to use os dependent modules. Lua work fine from my very first tests. Ja I am beginner in lua so...&lt;/p&gt;
&lt;p&gt;To your question: I am not trying to develop any runtime environment on the nRF52840, therefore such getenv function does not make sens....&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks again&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: getenv undefined reference</title><link>https://devzone.nordicsemi.com/thread/259845?ContentTypeID=1</link><pubDate>Tue, 14 Jul 2020 09:11:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5c63c7d8-ef2b-44cd-b583-f9bd4f2a9586</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;Are you building a Lua runtime environment for the nRF52840?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: getenv undefined reference</title><link>https://devzone.nordicsemi.com/thread/259834?ContentTypeID=1</link><pubDate>Tue, 14 Jul 2020 08:52:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:312067c5-784d-4c02-b031-15cbb6aff219</guid><dc:creator>Richix</dc:creator><description>&lt;p&gt;OK haakonsh, you helped already a lot. I need to go deeper in the lua script and I think I will come back here with some solution in a few days. I will also answer your question later.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: getenv undefined reference</title><link>https://devzone.nordicsemi.com/thread/259833?ContentTypeID=1</link><pubDate>Tue, 14 Jul 2020 08:49:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e335c67f-fa31-402c-9ec3-ab6070e949ea</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;We have no support for Lua.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;What is it that the Lua library is trying to do with the getenv function though?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: getenv undefined reference</title><link>https://devzone.nordicsemi.com/thread/259825?ContentTypeID=1</link><pubDate>Tue, 14 Jul 2020 08:20:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3f2d34ee-8034-44c9-abd8-6e02546c3d44</guid><dc:creator>Richix</dc:creator><description>&lt;p&gt;OK, Indeed I am not si familiar with such environment function. I want to use lua script on the nrf52840 development kit. I imported the library of this script on the nrf52840. One module of the lua script use the getenv, therfore I get the error shwon&amp;nbsp; in my first message. Do you have some experience at nordic for the embedding of lua script (and not eLua) in nrf52840 platform?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: getenv undefined reference</title><link>https://devzone.nordicsemi.com/thread/259815?ContentTypeID=1</link><pubDate>Tue, 14 Jul 2020 08:00:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2f277a7b-7b6c-4b7c-97b5-22f70cf0c819</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;getenv does not make any sense on any platform without an os and a file system.&amp;nbsp;Why are you interrested in geting the path to an environmental variable?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: getenv undefined reference</title><link>https://devzone.nordicsemi.com/thread/259741?ContentTypeID=1</link><pubDate>Mon, 13 Jul 2020 15:20:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2e61a3b6-e6e9-45b7-a381-33b09fe5f49c</guid><dc:creator>Richix</dc:creator><description>&lt;p&gt;OK thank you for your reply.&lt;/p&gt;
&lt;p&gt;Would it be possible to use equivalent funtion such as getenv (or library) on embedded system like the nrf kit?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: getenv undefined reference</title><link>https://devzone.nordicsemi.com/thread/259738?ContentTypeID=1</link><pubDate>Mon, 13 Jul 2020 15:08:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ed3442e9-0286-4c12-945a-77342594f22c</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;I&amp;#39;m not familiar with getnv, but from its description in&amp;nbsp;&lt;a href="https://www.tutorialspoint.com/c_standard_library/c_function_getenv.htm"&gt;https://www.tutorialspoint.com/c_standard_library/c_function_getenv.htm&lt;/a&gt;&amp;nbsp;it sounds like a system call to an OS&amp;nbsp;with a file system.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I doubt there&amp;#39;s an implementation in the c libraries for arm embedded devices(gnuarmemb -&amp;nbsp;&lt;a href="https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm"&gt;https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm&lt;/a&gt;) for cortex-m family devices.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>