# DE-25 FPGA Dev Kit Part 7 (HPS Demo 1)

**URL:** <https://forum.digikey.com/t/de-25-fpga-dev-kit-part-7-hps-demo-1/65637>\
**Category:** Development Boards, Kits, Programmers\
**Tags:** intel, altera\
**Created:** [February 19, 2026, 8:48pm UTC](https://forum.digikey.com/t/de-25-fpga-dev-kit-part-7-hps-demo-1/65637 "2026-02-19T20:48:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_11869](https://sea2.discourse-cdn.com/digikey/user_avatar/forum.digikey.com/david_11869/32/61566_2.png) [@David\_11869](https://forum.digikey.com/u/David_11869)\
**Post date:** [February 19, 2026, 8:48pm UTC](https://forum.digikey.com/t/de-25-fpga-dev-kit-part-7-hps-demo-1/65637/1 "2026-02-19T20:48:49Z")

</div>

The purpose of this article is to cross-compile a demo for the ARM in the HPS of the [DE-25 FPGA Dev Kit](https://www.digikey.com/en/products/detail/terasic-inc/P0781/27683489?_gl=1*6bd6tm*_gcl_dc*R0NMLjE3NzA5OTc0NjIuZTJiYWE1MDRiMTA0MWRmODdiMWNjYzhiOWJiNzA3YzU.*_gcl_au*Mjk2NzU5NDM3LjE3NjkxOTQzMjQ.)

 ![image](https://global.discourse-cdn.com/digikey/original/3X/b/c/bc1f006d2df52f857e9e77c97654b2fbf94a800e.jpeg)

Please refer to the previous article [Part 6](https://forum.digikey.com/t/de-25-fpga-dev-kit-part-6-arm-cross-compiler/65620) where the ARM Cross Compiler was installed in a Linux host before proceeding with this article. Make sure all the files from the SoC directory are present from the examples in the SoC of the resources CD from [Part 1](https://forum.digikey.com/t/de-25-fpga-dev-kit-part-1/65118). In this case we will be covering the **hps\_led\_key** ,

 ![image](https://global.discourse-cdn.com/digikey/original/3X/6/b/6bb0974b81ec4adbdaf72ce848e015c88ac3d2c4.jpeg)

with the following relevant files,

```auto
gpio_lib.c gpio_lib.h led_lib.c led_lib.h main.c Makefile

```

For illustration purposes of this demo, only modify the **main.c** program as follows,

```auto
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include "gpio_lib.h"
#include "led_lib.h"

/ ****************************************************************
 * Main
 **************************************************************** /
 
 int main(int argc, char **argv)
{	
	GPIO_HANDLE *line_key;
	unsigned int io_led=0;
	int loop;
	int fd_led;
	unsigned int key_value;
	bool bLedLight = true;

	line_key = gpio_open_line("/dev/gpiochip0", 16/*line 16 for KEY*/, 0 /*input*/);
	
	fd_led = led_fd_open(io_led);

	loop = 20;
	while (loop >= 0) {
		//gpio_get_value(io_key, &value);
		gpio_get_line_value(line_key, &key_value); // key_value is low active
		if (!key_value || bLedLight)
			led_fd_write(fd_led, "1", 2); // light led
		else
			led_fd_write(fd_led, "0", 2); // unlight led
		printf("DigiKey Coffee Cup Input Key: %x\n", key_value);
		bLedLight = bLedLight?false:true;
		usleep(800*1000); // 0.8 second
		loop--;
	}
	
	led_fd_close(fd_led);
	gpio_close_line(line_key);
	
	return 0;
}

```

In order to cross-compile this demo please proceed with the following command,

```auto
digikey_coffee_cup: ~$ export CROSS_COMPILE=aarch64-none-linux-gnu-

```

Now proceed with make as shown next,

```auto
digikey_coffee_cup: ~$ make
aarch64-none-linux-gnu-gcc -g -O0 -Werror -Wall -c main.c -o main.o
aarch64-none-linux-gnu-gcc -g -O0 -Werror -Wall -c led_lib.c -o led_lib.o
aarch64-none-linux-gnu-gcc -g -O0 -Werror -Wall -c gpio_lib.c -o gpio_lib.o
aarch64-none-linux-gnu-gcc -g -O0 -Werror -Wall main.o led_lib.o gpio_lib.o -o hps_led_key 
aarch64-none-linux-gnu-nm hps_led_key > hps_led_key.map

```

In order to run this ARM executable in the HPS in the DE-25 FPGA Dev Kit. Proceed to copy the **hps\_led\_key** ARM binary to the [DE-25 FPGA Dev Kit](https://www.digikey.com/en/products/detail/terasic-inc/P0781/27683489?_gl=1*1t0j5cx*_gcl_au*MTM3NTYyMTExNy4xNzcxNDI3MTg4) from the Linux host via SSH the WiFi Router as outlined in a previous article [Part 5](https://forum.digikey.com/t/de-25-fpga-dev-kit-part-5-hps-connection-to-a-network/65568). The following **scp** command copies the file from the Linux host to the DE-25 HPS via SSH (Please change the IP address and path as needed),

```auto
digikey_coffee_cup: ~$ scp hps_led_key terasic@192.168.1.131:/home/terasic/SoC

```

Execute the ARM binary for the HPS in the SSH or PuTTY terminal connection as desired,

 ![image](https://global.discourse-cdn.com/digikey/original/3X/8/3/838dac2c0c868e0c78cff0bc859e5e76745226d6.png)

The HPS button in the DE-25 FPGA Dev Kit was pressed and properly recognized by the ARM binary running in the HPS for the Agilex 5, also an HPS connected LED blinked on/off in the board as expected. This completes the first HPS demo in this series for the DE-25 FPGA Dev Kit.

The [DE-25 FPGA Dev Kit](https://www.digikey.com/en/products/detail/terasic-inc/P0781/27683489?_gl=1*1t0j5cx*_gcl_au*MTM3NTYyMTExNy4xNzcxNDI3MTg4) is a powerful platform featuring an HPS/FPGA Agilex 5 (available as D-Series and E-Series depending on the case) capable of implementing Tensor AI slices,

 ![image](https://global.discourse-cdn.com/digikey/original/3X/f/e/fe9fb97222cc40409a2171c225f8422593c767d7.png)

that go beyond what traditional/classical old school DSP slices implemented in the past,

 ![image](https://global.discourse-cdn.com/digikey/original/3X/e/d/ed21d234beac70b95129aa0cfc3a462699290bc7.jpeg)

and it is available at [DigiKey](https://www.digikey.com/).

Have a wonderful day!

This article is available in spanish [here.](https://forum.digikey.com/t/de-25-fpga-dev-kit-parte-7-hps-demo-1/65872)

Este artículo está disponible en español [aquí.](https://forum.digikey.com/t/de-25-fpga-dev-kit-parte-7-hps-demo-1/65872)
