It seems to me that Proteus does some extra logic or different handling when creating an Arduino project and it looks for .ino files from the Arduino IDE.
Because it actually shouldn’t be looking for user_main.ino. This file is not compiled. The .ino is converted to a .ino.cpp file which then gets compiled. But Proteus probably wants to show the user-friendly version.
Please contact the Proteus support regarding this isse – as I said, I don’t see an issue with the ELF file, seems they’re looing for the .ino file.
I am very glad that there is one person who is ready to understand the problem. Together, the path is more reliable, as it allows you to combine knowledge and skills.
This is not a feature of Proteus. Proteus just works with the elf file. I previously tried elf from AVR studio. Everything works there, although there are no *.ino files.
I believe this is a feature of the Arduino build system in PlatformIO.
For example, in Eclipse, the problem is also missing. Eclipse uses a make-like system. There, the build system first builds itself sloeber.ino.cpp
It is possible that the build system does not correctly identify the main file.
Proteus has some problem with path handling. The symptom: it receives the .elf file, simulation is working, but the source view window is empty. The reason that the .elf file doesn’t include the source code, it just points to the source files with relative paths. In some cases Proteus fails with the path. There is a workaround:
When you double click on the uC in Proteus, and browse for the .elf file, the path in the box looks something like this:
Proteus somehow fails with these
Replace it with the absolute path, for example c:\0work\bubuws\bubu\Debug\bubu.elf
I didn’t tried with PIO, but it is working with the .elf from STM32CubeIde.
With the .elf from Keil one more step required: copy the .elf one folder up. For example copy it from c:\0work\bubuws\bubu\Debug\bubu.elf to c:\0work\bubuws\bubu\bubu.elf and pick it from here with Proteus.
One more thing: the .elf has to include dwarf2 debug information. In case of the GCC toolset use
in Keil use