Forum Discussion

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

HELP: Write image into flash

Hello. May I know how to write an image from my desktop into the flash memory of DE2 Board.

Spec:

Altera DE2 Board, flash 4mb...

Thanks!

3 Replies

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

    send image from PC to the board via RS232C / JTAG or something.

    you can send image via SD card or Ethernet, but you need more skill thank RS232C.

    save bitmap into raw data and send the binary via RS232C.

    how is it?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Is it possible to use USB only? because my comp cant use serial port...

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

    you know how to use NiosII don't you?

    if you just want to send image.

    send it via JTAG.

    imagine you create two C code.

    one runs on the PC, the other runs on the NiosII.

    first one create the second C code, read the image and write the binary into the text as an array like this.

    //------------------------ NiosII code ------------------

    unsigned char imagedata[WIDTH*HEIGHT] = { 0x01, 0xff, 0x01 .....};

    //------------------------ NiosII code ------------------

    compile and run the code on your NiosII to write the data into the Flash memory.

    how is it?