<?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>Error building with Custom board</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/101099/error-building-with-custom-board</link><description>Hello 
 I get the following error code, when I try to build the button sample with my custom board. I try to build and flash via RTT Hello World with my custom board and it works. However the button sample doesnt work. I think there is something wrong</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 16 Jun 2025 08:42:44 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/101099/error-building-with-custom-board" /><item><title>RE: Error building with Custom board</title><link>https://devzone.nordicsemi.com/thread/539330?ContentTypeID=1</link><pubDate>Mon, 16 Jun 2025 08:42:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eda9b1f6-9272-49de-bac9-8e7e5e712a96</guid><dc:creator>LaceyHood</dc:creator><description>&lt;p&gt;Your custom board device tree lacks proper GPIO node definitions or aliases for LEDs/buttons expected by the sample. Fix those in your &lt;code data-start="2248" data-end="2254"&gt;.dts&lt;/code&gt; or overlay files to match the sample&amp;rsquo;s GPIO usage.&lt;/p&gt;
&lt;p style="text-align:right;"&gt;&lt;span style="color:#ffffff;font-size:75%;"&gt;&lt;a style="color:#ffffff;" href="https://awesometanks2game.com"&gt;awesome tanks 2&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error building with Custom board</title><link>https://devzone.nordicsemi.com/thread/436229?ContentTypeID=1</link><pubDate>Thu, 13 Jul 2023 11:38:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:60192583-a057-4a7f-ab3c-7a49ac1d01a1</guid><dc:creator>&amp;#216;ivind</dc:creator><description>&lt;p&gt;Hi again sorry for the delay, are you still having this issue?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error building with Custom board</title><link>https://devzone.nordicsemi.com/thread/434817?ContentTypeID=1</link><pubDate>Thu, 06 Jul 2023 03:28:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d22ac75a-3413-468d-adb3-138c4e1180cc</guid><dc:creator>adelebrown68</dc:creator><description>&lt;p&gt;&lt;span class="MUxGbd wuQ4Ob WZ8Tjf"&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;I am trying to&amp;nbsp;&lt;em&gt;build&lt;/em&gt;&amp;nbsp;zephyr for a&amp;nbsp;&lt;em&gt;custom&lt;/em&gt;&amp;nbsp;soc+&lt;em&gt;board&lt;/em&gt;,I have followed the steps as in the main website.Now&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#ffffff;font-size:75%;"&gt;&lt;a style="color:#ffffff;" href="https://papas-games.io"&gt;papa&amp;#39;s games&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error building with Custom board</title><link>https://devzone.nordicsemi.com/thread/432913?ContentTypeID=1</link><pubDate>Mon, 26 Jun 2023 10:34:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:725983e8-a3c8-4f59-a297-a3b23ba555b1</guid><dc:creator>Tal.</dc:creator><description>&lt;p&gt;Hey, thank you for your answer. However, It doesnt work this way.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error building with Custom board</title><link>https://devzone.nordicsemi.com/thread/432564?ContentTypeID=1</link><pubDate>Thu, 22 Jun 2023 15:52:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a1cea9a9-d1a3-4918-8662-2dd0dccad08f</guid><dc:creator>&amp;#216;ivind</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Could you try deleting the build folder and rebuilding? A pristine build is required when changes are made to the devicetree or configs.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error building with Custom board</title><link>https://devzone.nordicsemi.com/thread/432477?ContentTypeID=1</link><pubDate>Thu, 22 Jun 2023 09:31:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5fef22b1-dbdd-4d59-aced-7274c02359ed</guid><dc:creator>Tal.</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#include &amp;lt;zephyr/kernel.h&amp;gt;
#include &amp;lt;zephyr/device.h&amp;gt;
#include &amp;lt;zephyr/devicetree.h&amp;gt;
#include &amp;lt;zephyr/drivers/gpio.h&amp;gt;

#define SLEEP_TIME_MS   10*60*1000

/* SW0_NODE is the devicetree node identifier for the node with alias &amp;quot;sw0&amp;quot; */
#define SW0_NODE	DT_ALIAS(btn-mode) 
static const struct gpio_dt_spec button = GPIO_DT_SPEC_GET(SW0_NODE, gpios);

/* LED0_NODE is the devicetree node identifier for the node with alias &amp;quot;led0&amp;quot;. */
#define LED1_NODE	DT_ALIAS(led1)
static const struct gpio_dt_spec led1 = GPIO_DT_SPEC_GET(LED1_NODE, gpios);


//Define the callback function */
void button_pressed(const struct device *dev, struct gpio_callback *cb, uint32_t pins)
{
	gpio_pin_toggle_dt(&amp;amp;led1);
	printk(&amp;quot;Button pressed!&amp;quot;);
}


/*  Define a variable of type static struct gpio_callback */
static struct gpio_callback button_cb_data;

void main(void)
{
	int ret;

	

	if (!device_is_ready(led1.port)) {
		return;
	}

	if (!device_is_ready(button.port)) {
		return;
	}

	

	ret = gpio_pin_configure_dt(&amp;amp;led1, GPIO_OUTPUT_ACTIVE);
	if (ret &amp;lt; 0) {
		return;
	}


	ret = gpio_pin_configure_dt(&amp;amp;button, GPIO_INPUT);
	if (ret &amp;lt; 0) {
		return;
	}
	/*  Configure the interrupt on the button&amp;#39;s pin */
	ret = gpio_pin_interrupt_configure_dt(&amp;amp;button, GPIO_INT_EDGE_TO_ACTIVE );

	/*  Initialize the static struct gpio_callback variable   */
    gpio_init_callback(&amp;amp;button_cb_data, button_pressed, BIT(button.pin)); 	
	
	/*  Add the callback function by calling gpio_add_callback()   */
	 gpio_add_callback(button.port, &amp;amp;button_cb_data);
	 
	while (1) {
		/* Remove the polling code */

        k_msleep(SLEEP_TIME_MS);
	}
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;and I forget to add my devicetree files and source code&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;// Copyright (c) 2023 Nordic Semiconductor ASA
// SPDX-License-Identifier: Apache-2.0

/dts-v1/;
#include &amp;lt;nordic/nrf52832_qfaa.dtsi&amp;gt;

/ {
	model = &amp;quot;test_LED&amp;quot;;
	compatible = &amp;quot;test-led&amp;quot;;

	chosen {
		zephyr,sram = &amp;amp;sram0;
		zephyr,flash = &amp;amp;flash0;
		zephyr,code-partition = &amp;amp;slot0_partition;
	};

	leds {
		compatible = &amp;quot;gpio-leds&amp;quot;;
		//LED_CON_B: Bluetooth Blau
		led1: led_1 {
			gpios = &amp;lt;&amp;amp;gpio0 7 GPIO_ACTIVE_HIGH&amp;gt;;
			label = &amp;quot;LED_CON_B&amp;quot;;
		};
	};


	buttons {
		compatible = &amp;quot;gpio-keys&amp;quot;;
		//Button Mode
		button1: button_1 {
			gpios = &amp;lt;&amp;amp;gpio0 30 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)&amp;gt;;
			label = &amp;quot;BTN_MODE &amp;quot;;
		};
};


	aliases {

		led1 = &amp;amp;led1;
		btn-mode = &amp;amp;button1;
	};

};

&amp;amp;gpio0 {
	status = &amp;quot;okay&amp;quot;;
};

&amp;amp;gpiote {
	status = &amp;quot;okay&amp;quot;;
};


&amp;amp;flash0 {
	partitions {
		compatible = &amp;quot;fixed-partitions&amp;quot;;
		#address-cells = &amp;lt;1&amp;gt;;
		#size-cells = &amp;lt;1&amp;gt;;

		boot_partition: partition@0 {
			label = &amp;quot;mcuboot&amp;quot;;
			reg = &amp;lt;0x0 0xc000&amp;gt;;
		};
		slot0_partition: partition@c000 {
			label = &amp;quot;image-0&amp;quot;;
			reg = &amp;lt;0xc000 0x32000&amp;gt;;
		};
		slot1_partition: partition@3e000 {
			label = &amp;quot;image-1&amp;quot;;
			reg = &amp;lt;0x3e000 0x32000&amp;gt;;
		};
		scratch_partition: partition@70000 {
			label = &amp;quot;image-scratch&amp;quot;;
			reg = &amp;lt;0x70000 0xa000&amp;gt;;
		};
		storage_partition: partition@7a000 {
			label = &amp;quot;storage&amp;quot;;
			reg = &amp;lt;0x7a000 0x6000&amp;gt;;
		};
	};
};

&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>