[ad_1]
Pricey help group,
I’ve an issue with the habits of the firmware if the challenge is inbuilt launch mode with optimization enabled.
The issue happens throughout the write-to-flash routine. I exploit Generic Serial Flash Interface Intel® FPGA IP and was impressed by the intel_generic_serial_flash_interface_top instance to create the code to jot down a block of knowledge to the Flash. Within the instance, the memcpy operate transfers information into the Flash. I do not know if the essential level of the operate is the memcpy, but when optimization is turned on, the firmware appears to carry out no write operation to the Flash: the operate returns no errors, so it makes me consider that all the pieces was executed appropriately, however after a examine, there wasn’t the anticipated information in reminiscence. Whereas with the identical code constructed with optimization turned off, the firmware works correctly.
The flash_write_function, which generates the issue, is hooked up.
My questions are:
-
Why this habits?
-
Is it potential to make use of memcpy as a write operate on Flash?
-
Is it potential to show off optimization for a block of code?
I am utilizing:
The NIOS information cache is disabled, whereas the instruction cache is enabled (see beneath). I use solely the IORD and IOWR features to carry out registers and peripherals accesses.
Listed below are the Nios II Software Properties:
[ad_2]