<?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>How to set a function run in ram in NCS 2.8</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/116730/how-to-set-a-function-run-in-ram-in-ncs-2-8</link><description>HI, 
 I have a function testfun from a customer-provided .a library, and I hope to run this testfun function in RAM. I am currently using NCS 2.8 based on the nRF52840. I’ve looked up some information but encountered a few issues: 
 
 After building the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 26 Nov 2024 14:12:30 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/116730/how-to-set-a-function-run-in-ram-in-ncs-2-8" /><item><title>RE: How to set a function run in ram in NCS 2.8</title><link>https://devzone.nordicsemi.com/thread/512161?ContentTypeID=1</link><pubDate>Tue, 26 Nov 2024 14:12:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3bf8100f-d9e6-4d10-8400-1f39703823f5</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The code_relocation_nocopy sample at&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/tree/main/samples/application_development/code_relocation_nocopy"&gt;https://github.com/nrfconnect/sdk-zephyr/tree/main/samples/application_development/code_relocation_nocopy&lt;/a&gt;&amp;nbsp; demonstrates how you can create custom linker sections to relocate your code. This example is specifically made to demonstrate how you can relocate code to ext. flash but it can also be modified to relocate code to ram. I&amp;#39;m not sure if you will be able to relocate a single function from the library, or if you have to copy the entire library to RAM. Is the goal to improve the execution speed? In that case, you need to use the CODE RAM.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>