Forum Discussion

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

FILE CONVERSION

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

2 Replies

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

    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.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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