I'm attempting to port over a FreeBASIC .BAS file that was working on a x86 laptop running Ubuntu 18.04 LTS onto a Raspberry PI v2 running Ubuntu MATE 1.16.1
The scenario works like this. I have a folder on the Desktop with ASCII art in it and the .BAS file reads the contents of the folder and sends the output over a USB to Serial adapter and displays the ASCII art onto the screen of a restored Hazeltine 1500 terminal. The ASCII art is written to the display every 15 seconds or so, operating kind of like a screensaver - but the only purpose of the whole configuration is to show the ASCII art on the Hazeltine 1500 screen.
Here's the thing. The whole thing works great on Ubuntu 18.04 LTS, even on a Chrome Cube running Ubuntu as well, but for the life of me I cannot get it to work running on the Raspberry PI. I've installed FreeBASIC from the Sourceforge site, all the dependencies and the Terminfo files for the Hazeltine are all loaded. Our programmer friend who wrote the code to get and write the ASCII art has also written a ttyUSB0.service file for us and that is also in the same place on the RPI as on the Ubuntu installs (/lib/systemd/system/ttyUSB0.service).
Our programmer tells me that it is normal for the executable he compiled to run from the Terminal emulator window on the desktop of basically any Ubuntu install and that is due to that Terminal emulator window being vt100 compatible but the Hazeltine is not compatible. When I try to run the same command to initiate the ASCII art drawing from the Hazeltine, I simply get [6n at the display and nothing else.
He says I should 'recompile with current version of FreeBASIC' but when I try to do that, this is the error I'm getting.
I would like it to work on a tiny thing like a Raspberry PI so I could put the RPI inside the Hazeltine case and it would appear to be more like magic that the ASCII artwork appears on the Hazeltine screen after entering a few commands from the Hazeltine keyboard.Desktop/ASCII art$ fbc -lang qb KRAFTWERK.BAS
bash: /usr/local/bin/fbc: cannot execute binary file: Exec format error
Any advice this group can give me on what I'm doing wrong is greatly appreciated. There are so many different "how-to troubleshoot FreeBASIC" sites that refer to different versions or it running on different hardware that I've gone cross-eyed and don't know what to try next (because I know so little about FreeBASIC or Ubuntu/Linux).
I'm comfortable at the Cisco wireless controller command line and GUI but dang, Linux is a different beast.