Load custom applications on Linux

Hi everyone,

Does anyone know how it is possible to load custom applications to run on Linux? In the past, I previously used the method described here (http://www.alterawiki.com/wiki/SoCEDSGettingStarted#Getting_Started_with_Linux_Application_Debugging) to connect through SSH, see the Linux file system, and load the application in whatever directory is required. For my new system, the ethernet is not configured. Really the only method of communication I have is JTAG to write to the Arria 10 SOC and the QSPI flash it boots off of. Does anyone know how to get my custom application loaded onto the system to run in Linux? Thanks in advance for any help you can provide.

just a question: You are not able to comunicate with the processor part of Arria via serial link (e.g. via PuTTY program)?

Have you tried enabling a suitable Wifi driver, and then accessing the board using the pscp?
You can install the required firmware for your WiFi USB dongle, by placing the firmware in the file-system when you prepare the SD card. And then enable the suitable driver using ‘make menuconfig’ and then you should have a WiFi running on your board. I have done this for Cyclone V SoC, board and it works fine.

I think perhaps your eth issue are due to missing DT statements in the device tree when using newer kernels. You might get som aid here:

Hi Jan,

I am able to communicate serially though UART. That’s how I verified the system is booted and running correctly. I initially overlooked this, but found you can do file transfers through this method. As a caveat, it seems all the functions/commands needed to do this aren’t built in to the minimal Linux image I am booting, so I need to create a custom one with them enabled. Is there any way to do file transfer serially with the prebuilt minimal Linux image?

Thanks for the reply!

I forgot to mention this is for a custom board that is missing a lot of the features of the devkit. It doesn’t have any peripherals like usb, ethernet, sdi … Really the only comm lines I have to talk to the SOC are JTAG, and UART. Thank you for the suggestion!

The peripherals (like the ethernet) aren’t there because I’m using a custom board. I forgot to mention this in the original post and feel silly for not doing so. Thanks for trying to help though.

I am very sorry for such a long time left. I have been thinking about it, but I am not sure if my results wil help You.
You did not specified a type of permanent memory of Yours device. Are You using SD card, QSPI memory or EEPROM memory? Your executable program could be copied there in a same way as a preloader, U-Boot or files of Yours operating system and then simple executed with command via shell.
I know this listen as a stupid question, please, do not be angry with me. I am only trying to get an point of view.
(The very “dummy” solution, in case a compilator is integrated in Yours operating system, could also be transfer source code of Yours program with shell via serial link with ‘echo’ and sign ‘>’ to a target files with compilation them. But it would be really dummy solution :grinning:.)
Best wishes, Jan Konecny.

Hi Jan,

No worries about the delay. Your initial suggestion sent me down the right path. I ended up encoding the binary file to ascii, sending it serially over UART, then decoding on the remote side. I did have to recompile a version of Linux that had the sharutils package on the remote side to do this. If anyone else is curious this link explains the steps : https://askubuntu.com/questions/628949/how-can-i-transfer-a-binary-file-using-minicom-and-a-serial-connection

Thanks for your help!

I used to use Putty but switched to TeraTerm because it integrates Zmodem better than the other programs I’ve tried. If you load the lrzsz package onto your Linux system then you can send files via Zmodem from a menu item on your TeraTerm login window. Zmodem will handle the packing and unpacking and the file name on the destination end once your Linux has lrzsz installed. What it doesn’t do is handle file overwrites (at least I haven’t figured out how to get it to do that), so you need to ‘rm’ the file at the Linux side of you are uploading a file with the same name. It also doesn’t set the execution bits if you are sending an executable file so you still need to do a ‘chmod’ on the file once it has arrived at the Linux side.
I also cannot use an Ethernet connection due to company network complications so my end use is USB for data and serial USB for terminal and command use. This solves my normal communication needs, but for large files (like if I am changing my RBF loads) I take my SDCard and write to it directly using an SDCard interface on my PC.