<?xml-stylesheet type="text/xsl" href="https://community.element14.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/"><channel><title>Renesas RX65 Envision Kit - part 3: Port an example from Renesas toolchain to GCC</title><link>/technologies/embedded/b/blog/posts/renesas-rx65-envision-kit---part-3-port-an-example-from-renesas-toolchain-to-gcc</link><description>I&amp;#39;m evaluating the Renesas RX65N MCU EV Kit .In this post, I&amp;#39;ll port the LCD driver example from the Renesas proprietary CC-RX Renesas offers a GCC toolchain that can build firware for the RX65 family. I have been using it for m...</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Renesas RX65 Envision Kit - part 3: Port an example from Renesas toolchain to GCC</title><link>https://community.element14.com/technologies/embedded/b/blog/posts/renesas-rx65-envision-kit---part-3-port-an-example-from-renesas-toolchain-to-gcc</link><pubDate>Mon, 01 Apr 2024 16:12:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:5d2595ef-e99c-4d72-8f6b-7aa5ffe2ba10</guid><dc:creator>Jan Cumps</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;I&amp;#39;m trying a few new things with this kit.&lt;/p&gt;
&lt;p&gt;Here, I&amp;#39;m using a different display:&amp;nbsp;EastRising 5&amp;quot; 480 * 272. It&amp;#39;s the same resolution as the original (an Newhaven), but larger. It doesn&amp;#39;t have a capacitive touch screen. I ordered one that (hopefully) matches.&lt;/p&gt;
&lt;p&gt;&lt;img height="308" src="/resized-image/__size/1000x616/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-5d2595ef-e99c-4d72-8f6b-7aa5ffe2ba10/20240401_5F00_180359.jpg" width="500" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Some sites mention that it has resistive touch, but I&amp;nbsp;don&amp;#39;t know how to enable that on RX65N.&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=8264&amp;AppID=7&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Renesas RX65 Envision Kit - part 3: Port an example from Renesas toolchain to GCC</title><link>https://community.element14.com/technologies/embedded/b/blog/posts/renesas-rx65-envision-kit---part-3-port-an-example-from-renesas-toolchain-to-gcc</link><pubDate>Wed, 11 Dec 2019 18:58:39 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:5d2595ef-e99c-4d72-8f6b-7aa5ffe2ba10</guid><dc:creator>Jan Cumps</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;In this blog, I took a shortcut to define the LCD frame buffer:&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;[embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:3ef06e6b-9b7d-4651-b12d-db8be7f5e991:type=c_cpp&amp;amp;text=%23define+FRAME_BUF_BASE_ADDR+++0x00800000]&lt;/p&gt;&lt;div&gt;&lt;/div&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The default GCC toolchain&amp;nbsp; loader file does not list this part of expansion RAM - not unexpected because frame buffer is application dependent.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The CC-RX linker settings in Renesas&amp;#39; example do handle this:&lt;/p&gt;&lt;p&gt;In the linker, the section start address is defined:&lt;/p&gt;&lt;p&gt;&lt;span&gt;[View:/resized-image/__size/331x458/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-5d2595ef-e99c-4d72-8f6b-7aa5ffe2ba10/4760.contentimage_5F00_205571.png:331:458]&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;and in the code a CC-RX specific construct is used to reference that memory section&amp;#39;s start address ( &lt;a class="jive-link-external-small" href="http://tool-support.renesas.com/autoupdate/support/onlinehelp/csp/V4.01.00/CS+.chm/Compiler-CCRL.chm/Output/cd_EXP_LANG10.html" rel="nofollow ugc noopener" target="_blank"&gt;__sectop()&lt;/a&gt; ):&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;[embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:3ef06e6b-9b7d-4651-b12d-db8be7f5e991:type=c_cpp&amp;amp;text=%23define+FRAME_BUF_BASE_ADDR++%28__sectop%28%22FRAME_BUFFER%22%29%29]&lt;/p&gt;&lt;div&gt;&lt;/div&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I think this is good practice, to avoid hard-coding the address in source, when you have the linker/loader that&amp;#39;s the guardian of memory sections.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Although I took a shortcut, there&amp;#39;s no real reason to do that. GCC has a construct that performs the same:&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Reserve the MEMORY block and define a SECTION for the buffer in the linker file:&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;[embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:3ef06e6b-9b7d-4651-b12d-db8be7f5e991:type=c_cpp&amp;amp;text=MEMORY%0A%7B%0A%2F%2F+...%0AFRAME_BUFFER+%3A+ORIGIN+%3D+0x800000%2C+LENGTH+%3D+0x80000%0A%7D%0A%2F%2F+...%0ASECTIONS%0A%7B%0A%2F%2F+...%0A.FRAME_BUFFER+0x00800000+%28NOLOAD%29+%3A+%0A++%7B%0A++++%22_FRAME_BUFFER%22+%3D+.%3B++++%0A++%7D+%3E+FRAME_BUFFER%0A%7D]&lt;/p&gt;&lt;div&gt;&lt;/div&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;This will define a virtual C variable _FRAME_BUFFER that does not take memory space but has an address. That address is available in our C code:&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;[embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:3ef06e6b-9b7d-4651-b12d-db8be7f5e991:type=c_cpp&amp;amp;text=extern+uint16_t+FRAME_BUFFER%3B%0A+%23define+FRAME_BUF_BASE_ADDR+++%26FRAME_BUFFER]&lt;/p&gt;&lt;div&gt;&lt;/div&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;You&amp;#39;ll see that, when the FRAME_BUF_BASE_ADDR is used, it points to the 0x008000000 location.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;[embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:3ef06e6b-9b7d-4651-b12d-db8be7f5e991:type=c_cpp&amp;amp;text=++++%2F*+Get+the+top+address+of+the+frame+buffer+*%2F%0A++++p_pixel_addr+%3D+%28uint16_t+*%29FRAME_BUF_BASE_ADDR%3B]&lt;/p&gt;&lt;div&gt;&lt;/div&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;[View:/resized-image/__size/620x86/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-5d2595ef-e99c-4d72-8f6b-7aa5ffe2ba10/7002.contentimage_5F00_205572.png:620:86]&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I don&amp;#39;t have a very strong opinion on what&amp;#39;s the best approach. If the LCD driver would come with a header file that has the address defined, I&amp;#39;d definitely use that.&lt;/p&gt;&lt;p&gt;In this case, where it&amp;#39;s dependent on memory mapping in the controller&amp;#39;s extended RAM, I prefer to put it in the loader because it sets clear boundaries of external resources that are memory mapped in a single location.&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=8264&amp;AppID=7&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Renesas RX65 Envision Kit - part 3: Port an example from Renesas toolchain to GCC</title><link>https://community.element14.com/technologies/embedded/b/blog/posts/renesas-rx65-envision-kit---part-3-port-an-example-from-renesas-toolchain-to-gcc</link><pubDate>Sun, 01 Dec 2019 15:15:47 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:5d2595ef-e99c-4d72-8f6b-7aa5ffe2ba10</guid><dc:creator>Jan Cumps</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Here&amp;#39;s a &lt;a class="jive-link-external-small" href="https://www.renesas.com/eu/en/products/microcontrollers-microprocessors/rx/rx600/rx65n-651.html#gui" rel="nofollow ugc noopener" target="_blank"&gt;list of all Renesas examples, application notes and downloads for the RX65 family&lt;/a&gt;. There&amp;#39;s a lot available.&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=8264&amp;AppID=7&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item></channel></rss>