Automatic starting a program on power up

My application is for an embedded system that must run automatically on power on.
The system will not use video, audio or a keyboard.
All interaction is via 2 RS232 ports (one to a thermal printer, the other to a barcode scanner), Ethernet (to a gateway/router), and GPIO (to LED’s and relays).

However, to gain familiarity with Toradex and Linux, and to do some early debugging, I want to automatically run a program like “hello-world”, or a simple UART reading/writing via a terminal.

I followed the steps here to run my program as a daemon, and I built up knowledge about options here, but apparently a daemon has no access to stdio, so I can’t use the terminal to interact with the program.

When I connect a terminal to the Iris UART A, I see all the normal boot up messages and eventually it waits for an “Enter” to login. A systemctl status command seems to indicate the program (a service) loaded and ran, but output went to a log file?, and I have no idea what it did about input.

Any help setting this up would be appreciated. I am new to Linux and Toradex.

Thanks

Your use case sounds rather strange but there may be ways to achieve it nontheless:

https://unix.stackexchange.com/questions/453998/systemd-connect-to-stdin-stdout-after-service-has-started

As for systemd service output:

https://unix.stackexchange.com/questions/20399/view-stdout-stderr-of-systemd-service