<?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>nrf52840dk not building with ssd1306 oled display</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/122661/nrf52840dk-not-building-with-ssd1306-oled-display</link><description>Having issues trying to use ssd1306 display with the nrf52840dk. When I try to use the lvgl sample code, I cannot make a build configuration (doesn&amp;#39;t compile), although if I use the given code and build for a nrf5340, then everything works. 
 In the steps</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 03 Jul 2025 09:27:37 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/122661/nrf52840dk-not-building-with-ssd1306-oled-display" /><item><title>RE: nrf52840dk not building with ssd1306 oled display</title><link>https://devzone.nordicsemi.com/thread/541295?ContentTypeID=1</link><pubDate>Thu, 03 Jul 2025 09:27:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4abfeae0-c3ec-431d-a21e-dc029b58d136</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Great!&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Aah, then I see that there might be quite a bit of porting work ahead. The guide you&amp;#39;re basing your application on is from NCS 2.1.0, whereas you&amp;#39;re currently working on the latest tagged release i.e NCS 3.0.1, but at the same time atleast the first part of the lesson is relatively straight forward&lt;/p&gt;
&lt;p&gt;I would recommend that you to some extent finish up the intermediate course as well to familiarize yourself better with &amp;quot;&lt;a href="https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-8-sysbuild/topic/sysbuild-explained/"&gt;sysbuild&lt;/a&gt;&amp;quot; in lesson 8, which is the new project structure system we have after NCS 2.7.0 as well as &lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/releases_and_maturity/migration/migration_hwmv2.html"&gt;hardware model 2&lt;/a&gt; (basically just naming your board targets &amp;quot;nrf5340dk/nrf5340/cpuapp/ns&amp;quot; instead of &amp;quot;nrf5340dk_nrf5340_cpuapp_ns&amp;quot;).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In the fundamentals course you should&amp;#39;ve seen a lesson w.r.t board files and overlay files, which brings me to the reason for why you&amp;#39;re successfull when compiling for the nrf5340 whereas you&amp;#39;re unsuccessfull with the rest. The overlay file, which the course explains, simply modifies the boards existing devicetree file (.dts file), with modifications specific for this project only. For cases where you&amp;#39;re using boards that are predefined within the SDK, such as a nRF based development kit, you can find the board files here:&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/main/boards/nordic/"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/main/boards/nordic/&lt;/a&gt;. Every DK that you build for will base their configuration on whats mentioned there, and the overlay will as mention modify that board for this specific build/project you&amp;#39;re working on.&lt;/p&gt;
&lt;p&gt;Back to your project, you have an overlay thats specific for the nrf5340, i.e&amp;nbsp;&lt;a href="https://github.com/hx91/oled-ssd1306-lvgl/blob/main/part-1/nrf5340dk_nrf5340_cpuapp.overlay"&gt;https://github.com/hx91/oled-ssd1306-lvgl/blob/main/part-1/nrf5340dk_nrf5340_cpuapp.overlay&lt;/a&gt;. The overlay file within either a &amp;lt;your_app&amp;gt;/boards repository or just within &amp;lt;your_app&amp;gt;/ will only be picked up if you&amp;#39;re building for the board target you build for. If you only have the nrf5340dk_nrf5340_cpuapp.overlay available, it will only be picked up the nrf5340dk/nrf5340/cpuapp build target (not even for&amp;nbsp;&lt;span&gt;nrf5340dk/nrf5340/cpuapp/&lt;span style="text-decoration:underline;"&gt;ns&lt;/span&gt;) it will be included.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;So to build it for the&amp;nbsp;nrf52840dk/nrf52840, which you&amp;#39;re using, you will have to add an overlay file for the nRF52840dk/nrf52840 specifying what peripheral to add (i.e to add the i2c communication) to the display you&amp;#39;re working with. Then you will have to state which GPIOs this board will use, and you can freely select &amp;quot;any &lt;em&gt;&lt;strong&gt;available/unused&amp;nbsp;&lt;/strong&gt;&lt;/em&gt;GPIO&amp;quot; on the DK. Note, that I emphasize &amp;quot;available/unused&amp;quot;. Every DK has a set of GPIOs that are preoccupied and requires either hardware modifications or software modifications to use (or both), some of them are the UART that goes between the SoC and the debugger and the NFC pins. You can find a list of the GPIOS in the datasheet for the DK, and you can have a look at the back side of the DK to see what GPIOs are already in use.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;To summarize what you need to do to get this sample up and running for a different board using NCS 3.0.1&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span&gt;Create a new overlay file with hardware model 2 and set up the I2C interface&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Update any deprecated APIs (I don&amp;#39;t think there should be any since the project in part 1 is relatively small)&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;If you wish to expand on it further with bootloaders and use the elements for lesson 8 and 9 in the intermediate course&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;If you have any issues, use the knowledge from the debugging lesson in the intermediate course to do some preliminary debugging&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;If you&amp;#39;re curious about overlay files and devicetree, spend some time in the fundamentals and intermediate lessons containing overlay files as well as play around with the exercises showcasing various peripherals since all of them uses and modifies the board files in one way or another.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;span&gt;I hope this is enough to get you going with porting this demo to the nrf52840dk and to a newer NCS version than the one used in the blogpost&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Kind regards,&lt;br /&gt;Andreas&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840dk not building with ssd1306 oled display</title><link>https://devzone.nordicsemi.com/thread/541224?ContentTypeID=1</link><pubDate>Wed, 02 Jul 2025 21:10:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a37e12a2-734d-4341-8098-304a48cbf1da</guid><dc:creator>grammy123</dc:creator><description>&lt;p&gt;I have just completed the fundamentals course and am starting the intermediate course.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I thought I linked it but I was following this tutorial:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/small-i2c-oled-displays-using-nrf-connect-sdk"&gt;Printing to an I2C OLED display using nRF Connect SDK&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;the example used is&amp;nbsp;&lt;span&gt;zephyr/samples/subsys/display/lvgl&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Thank you for the response.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840dk not building with ssd1306 oled display</title><link>https://devzone.nordicsemi.com/thread/541163?ContentTypeID=1</link><pubDate>Wed, 02 Jul 2025 12:11:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ba75f536-b8b8-4132-ae12-a39a92db8731</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user=""]although if I use the given code and build for a nrf5340, then everything works.&amp;nbsp;[/quote]
&lt;p&gt;I assume this is because the project only contains board files for the nRF5340 and nothing for any other boards. Could you share more about where you found the sample application? Is it from a Nordic sample repository or is it from a third party source showcasing how to interface with this specific display?&lt;/p&gt;
&lt;p&gt;I see that you&amp;#39;re relatively new to nRF Connect SDK, so I also want to strongly recommend you to go through our academy courses, namely the fundamentals course at&amp;nbsp;&lt;a href="https://academy.nordicsemi.com/courses/nrf-connect-sdk-fundamentals/"&gt;https://academy.nordicsemi.com/courses/nrf-connect-sdk-fundamentals/&lt;/a&gt;&amp;nbsp;and the intermediate course at&amp;nbsp;&lt;a href="https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/"&gt;https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Let me know about the sample repo and I&amp;#39;ll get back to you&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>