10-04-2016 01:58 PM
There is a wonderful video that shows you how to compile a hello world and run it from a debugger or straight from the SDK. I managed to get that much running the 2016.2 SDK on Windows. What I have failed for days to do is get the created elf file to run from a command line interactive call - or better yet to be able to easily modify the contents of the SD card just just have my own little app get called on start up. Presently, there are very complicated fast moving videos that tell you how to rebuild the kernal, U-boot or the linux that starts up on the card - my gut tells me I shouldn't have to rebuild the programmable logic an all those tools just to get a simple program of mine to run on it's own. - thanks in advance anyone for getting me past this point. Eric
10-04-2016 06:12 PM
If you're talking about running a program automatically when linux boots, all you need is to add a line to /etc/rc.d/boot.local or /etc/rc.local. This means you need to rebuild the root file system after modifying the relevant file and adding your program to it.
10-05-2016 08:21 AM
I think you don't want to have a linux running on your board, only baremetal from your SD-Card.
Thats pretty easy. You need an FSBL und u-Boot on the SD-Card. Follow this tutorial or search around the internet. There are a lot solutions:
Maybe you have already a precompiled fsbl with uboot for an linux image. Thats the easiest way to start. Take the BOOT.bin (this is the fsbl + uboot) your bitstream file and the uEnv.txt (hope you have an example setup for this). There is also an linux image and the linux kernel in such an example. But you don't need it, you want baremetal only.
Copy this on your sd-card fat32 partition (should be the first one)
Next you need to modify the uEnv.txt. There you see how the linux kernel is booted. Replace the content with something like this:
And thats it. It should boot yourElfFile.elf
Sorry if there is something wron, this was written óut of my head.
10-16-2016 06:28 AM
Sorry this commandline should look like this:
uenvcmd=fatload mmc 0 0x1000 yourElfFile.elf && bootelf 0x1000