ContributionsMost RecentMost LikesSolutionsRe: Nios-V alt_epcq_controller_write() Problem Hi ShoH, Thanks for your response. I will be using that. Balerion Re: Nios-V alt_epcq_controller_write() Problem Hi ShoH, Before I try what you suggest I did another thing which is I used to call Public API's in order like: For write operation: alt_epcq_controller_lock(); // with related params to unlock all sectors alt_epcq_controller_write(); // with related params to erase and write alt_epcq_controller_lock(); // with related params to lock all sectors I was doing that for every write operation. then what I did is when initializing I'm opening the lock of all sector once then don't deal with any locking: alt_epcq_controller_lock(); // with related params to unlock all sectors SleepMs(20); For Write operation: alt_epcq_controller_write(); // with related params to erase and write It seems, this solved my problem. I did some tests like writing and reading different size of data and comparing them none of them failed. Thanks for help, Balerion Re: Nios-V alt_epcq_controller_write() Problem Hi ShoH, So, what I understand up to now is that there are two options for me. The first one is that I will disable caching in my nios-v/g configuration(0Kilobytes of cache) and the other option is that according to "https://www.intel.com/content/www/us/en/docs/programmable/726952/25-1/memory-configurations-tab.html" I have to place my peripherals to non-cached address space to do that I need to create peripheral region. There comes a few questions to my mind: What differs between Peripheral A and Peripheral B and which one should I choose? Let's say I create peripheral region, Do I need to also create tightly coupled memory region as well or peripheral region is enough? Why do peripherals have to be located to the non-cached address space? Thanks, Balerion Re: Nios-V alt_epcq_controller_write() Problem Hi, I looked at memory configuration page and see that my Data cache and Instruction cache sizes are 4KiloBytes. All my Peripheral regions and Tightly coupled memory settings are 0. My jtag uart base address is 0x48050060. I am able to use jtag uart without a problem. Is there anything you want me to check? Thanks, Balerion Re: Nios-V alt_epcq_controller_write() Problem Hi, I am using Serial Flash Controller such that the generated bsp includes "altera_epcq_controller.h" It would include "altera_epcq_controller2.h" if I use Serial Flash Controller II as much as I know. Could you please tell me how to look for the cached and non-cached addresses . My ram starts from base address 0x00000000 to 0x3FFFFFFF and my epcq flash avl memory starts from base address 0x40000000 and my avl csr base starts from 0x48050040. I don't know which addresses are cached or not. Thanks, Balerion Re: Nios-V alt_epcq_controller_write() Problem Hi, I'm using Quartus Pro 25.1.1 and My Fpga is Arria-10. Thanks, Balerion Nios-V alt_epcq_controller_write() Problem Hi, I have a flash on my custom board which is MT25QU01G. The flash is connected to Nios-V/g with Epcq Controller. I am trying to erase, write, read sectors from flash. Before write and erase I unlock all sectors and after write and erase I lock all sectors. The problem is that my alt_epcq_controller_write() returns success(0) however it doesn't write to flash memory. I read same data from same place and it is not changed. I also look that memory from memory browser and still nothing changed. I call erase method before each write method since it is nor flash but nothing happens. Could you please help me about the problem. Thanks, Balerion SolvedRe: Nios-V C++ Debug Problem Hi, The problem seems solved in Quartus 25.1.1 Pro. I tried to debug a simple C++ project and I am able to do it. However, It still exists in Quartus 25.3 Pro. What I don't understand is that the change you guys made in 25.1.1 will not be applied from that version on to newer versions? or it will be specific to this one? If so, we will not be able to use other version than 25.1.1 Pro? Thanks, Balerion Re: Nios-V C++ Debug Problem Hi again, I tried what you said but it still didn't work. I will be adding the files that I am trying. Could you please tell me what to change in my CMakeLists.txt. I added the lines below. set_source_files_properties( main.c PROPERTIES LANGUAGE CXX ) ********************************************************* #include "MyCls.h" void MyCls::MyPrintf() { printf("HELLO FROM PRINTF\n"); std::cout << "HELLO FROM COUT" << std::endl; } NOTE: I tried to add MyCls.cpp to the attachment but it didn't allow me to do so I added here Thanks, Balerion Re: Nios-V C++ Debug Problem Hi, Any news? I couldn't find anything. I just couldn't debug a cpp project and no idea about how to solve it.