Forum Discussion
Altera_Forum
Honored Contributor
16 years agoFlash Programming
I dont want to use a flash programmer to download my .flash file to CFI flash. I am able download the .flash file to CFI flash succesfully, using the alt_write_flash. When i power up ...
Altera_Forum
Honored Contributor
16 years agoTon,
I am using cyclone I. I am not a FPGA guy. check this out: The line of *.flash file generated by the Nios II IDE says: "S32500000000140084003A48011004F8BF1016FDBF0034804000140840083A6800080000000010" i tried to read back the same file from nios2 programmer using nios2-flash-programmer --base=0x02000000 --read read_flash.txt and its reads as "S1230000140084003A48011004F8BF1016FDBF0034804000140840083A6800080000000012" The difference i see is S1230000 and rest of the packets seems is ok. This is the extract of the working code.( if i use the flash programmer.) When i read by (*.flash file) nios 2 programmer it says "S12300203030383430303341343830313130303446384246313031364644424630303334E3" if you carefully observe here, S1230020 is ok, but then 533030 is nothing but ASCII values. I think i got the problem, I am sending the packets thru RS232 and saving it in a large buffer inside my code and then i am using the Flash API to download it into flash, when i do this , its not stored as HEX values instead its stored in equvivalent ASCII value. For eg: if original (*.flash) is 0x06 then my code stores it as 0x36. Any idea how i can download in proper HEX format?