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++

FILE CONVERSION

Altera_Forum
Honored Contributor II
1,134 Views

Hi All, 

 

Am trying to verify a VGA driver design using the lancelot VGA daughter card, and just wondering whether anybody knows how I can convert a .yuv file into any binary data file. 

 

I need to convert the .yuv file into a binary data file so that I can use the bin2flash utility in Nios2 to convert the resulting binary data file to a flash file that can be used by the flash programmer. 

 

Thanks, 

 

joo
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
466 Views

You could read it in as a C character array, as a part of your code. There are multiple examples of doing this if you just hunt for it on the web. 

 

Or....you could use the ZIP filing system provided with the Nios II development kit. You would have to program it to flash, first.... The instructions are all a part of the ZIP software template/example. 

 

- slacker 

 

P.S.: If you get stuck, I've a Perl script somewhere which will read any file and create a C char. array.
0 Kudos
Altera_Forum
Honored Contributor II
466 Views

Hi Slacker, 

 

Thanks for the suggestion. Am still having problems with the conversion. Could you please help me with the Perl script you talked about. 

 

Kind regards, 

 

joo
0 Kudos
Reply