Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
20 years ago

can run the example hello.exe

according to the doc released from this forum. I make a hello.exe

the sourece files are copied from "C:\altera\kits\nios2\examples\software\linux\apps\samples\hello"

and I change the topdir form .. to ./

everything runs well till I transport the hello.exe to /var dir in the uClinux

it says"./hello.exe

./hello.exe: cannot execute"

but when I copy hello.exe to my filesystem prj and paste it under /bin dir

and upload the filesystem after I rebuild the filesystem .

when I login in uClinux. I type hello .the program runs well.

what is the difference between the tow method?

btw:I transport the hello.exe as follow

1,transport the hello.exe to a ftp sever ,and put the file under /home/wch

2,in uClinx I type the follow cmd"mount -n nolock 192.168.1.124/home/wch /mnt -n

3,copy the hello.exe to /var since it is the only rw dir.

4 cd /var

5 type ./hello.exe

it says "./hello.exe

./hello.exe: cannot execute"

2 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I am having the same problem as well. I transfer a sample hello world application to the NIOS II uCLinux via FTP into the tmp directory. I then atttemp to run it ./test and I get:

    ./test: cannot execute

    Why can I not run an executable from the Ram Disk? Did I miss something in the WIKI or the Forum?

    Thanks in advance.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi,

    maybe you do not have the "right" the execute the program. Please check the file attributes. You can change the file attributes with the command chmod.