Hi,
thanks for your reply. My patch only solves this kind of problem when manipulating flash. Maybe there are similar problems in other locations inside OpenOCD, maybe we can work it out together. Best Regards YanWen Wang 发自我的企业微信 ----------回复的邮件信息---------- Antonio Borneo<borneo.anto...@gmail.com> 在 2024年1月16日 周二 17:16 写道: Hi, thanks for your patch and your work on OpenOCD. Could it be possible for you to push your patch on OpenOCD gerrit? The relevant information to do it are in HACKING file in the source code, and also online in https://openocd.org/doc-release/doxygen/patchguide.html I also see a few other interesting patches in Nuclei's fork https://github.com/riscv-mcu/riscv-openocd that could be welcome either upstreamed here or through the riscv fork. Best Regards Antonio On Tue, Jan 16, 2024 at 6:33 AM Aceluffy <wangyan...@nucleisys.com> wrote: The error log is as follows, of course I added some print. Error message ...Info : Valid NUSPI on device Nuclei SoC SPI Flash at address 0xfa0000000 with spictrl regbase at 0xf8b120000 Info : Nuclei SPI controller version 0x00010207 Info : Found flash device 'win w25q128fv/jv' (ID 0x001840ef) Info : Listening on port 6666 for tcl connections Info : Listening on port 4444 for telnet connections Info : accepting 'gdb' connection on tcp/3333 Error: xxxx sizeof:4 Error: xxxx packet:vFlashErase:0000000fa0000000,00010000 Error: xxxx addr:ffffffff Error: No flash at address 0xffffffff Error: flash_erase returned -4 I made the changes and it works fine with flash, I'm not sure if a similar problem exists within openocd. The unsigned long type on windows is defined as 4 bytes https://learn.microsoft.com/en-us/cpp/cpp/data-type-ranges?view=msvc-170