Altera_Forum
Honored Contributor
16 years agoNios II IDE overwrites my hex file
Hello,
I have a problem of memory initialization file with the Nios II IDE. I build a system using SOPC Builder, basically there are one Nios II processor, one onchip ram memory used for the Nios named onchip_processor_memory (this memory is connected to the instruction bus and the data bus of the Nios), and one onchip rom memory where I want to store predefined data named onchip_perso_memory (this memory is only connected to the data bus of the Nios). For the last memory I check "Enable non-default initialization file", and I created myself the file content. In my software I assign a table to the memory, and during the program I read the table :
unsigned long myData __attribute__ ((section (".onchip_perso_memory")));The problem is that when I build my project under Nios II IDE, it overwrites all the time the file onchip_perso_memory.hex (it writes 0 inside). I don't understand why Nios IDE doesnot know that it's to me to generate this file since I tell it in the SOPC Builder. Remark : In the System Library Properties of my project, I leave the onchip_processor_memory for all type of memory (Program memory (.text), Read-only data memory (.rodata), Read/Write data memory (.rwdata), ...). That does not is in conflict with the fact that the other memory is used as read-only and do not appears here ? Anyone has an idea of why I have this problem, or how to solve it ? Thanks in advance Jérôme