Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12603 Discussions

ERROR:"BINFMT_FLAT: bad magic/rev"

Altera_Forum
Honored Contributor II
1,491 Views

When I run a application program on nios II system,  

the sdk shell show : 

 

BINFMT_FLAT: bad magic/rev (0x3000000, need 0x4) BINFMT_FLAT: bad magic/rev (0x3000000, need 0x4) 

 

why?????
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
567 Views

The kernel is reporting that the file you're running isn't a valid executable file format. For all Nios II Linux systems, each executable must be in a flat binary format. This usually entails running elf2flt on any applications that you build. 

 

If you'd like I can take a look at the Makefile you're using and try to figure out what's going on. If so, please pm me or post it here in the forum.
0 Kudos
Altera_Forum
Honored Contributor II
567 Views

if you run a shellscript you get the same error message. 

To run shellscripts following option must be compiled into the kernel: 

Executable file formats ===> [*] Kernel support for MISC binaries
0 Kudos
Reply