Forum Discussion
Altera_Forum
Honored Contributor
16 years agoThere is something else. With your
int rawVideo __attribute__ ((section (".onchip_ram_100Kbytes.rwdata"))); line, you are only allocating an integer, which is 4 bytes. This means that each time you do a read of more than 4 bytes, you overwrite a part of memory that could be used for something else, causing random crashes. You need to allocate a buffer big enough for what you want to do. Something like:char rawVideo __attribute__ ((section (".onchip_ram_100Kbytes.rwdata"))); and then remove the & in front of rawVideo in the read call.