VS Arduino
Visual Micro >> Installation & Troubleshooting >> Disassembly listing disappeared with the last upgrade
https://www.visualmicro.com/forums/YaBB.pl?num=1598209344

Message started by Quigon on Aug 23rd, 2020 at 7:02pm

Title: Disassembly listing disappeared with the last upgrade
Post by Quigon on Aug 23rd, 2020 at 7:02pm
As the title says since the last VM upgrade there appears to be no disassembly window. The appropriate parameter is set in VS2019 in the project settings is set to true.
The output window claims it is producing a disassembly listing but there's no window in the drop down list.
It also refers to a log file for details somewhere deep in the app data folder, but when navigated to it is 0 bytes long.
Any ideas?

Title: Re: Disassembly listing disappeared with the last upgrade
Post by Visual Micro on Aug 23rd, 2020 at 7:23pm
Thanks for the post. We will take a look. There has been a change because some newer boards produce an output that is huge, too much for the output window. Therefore it is supposed to cap the output window at 5Mb and write all to the file.

We will fix and release a patch during the week. I will update this thread after that. Please confirm which board you are using in case that is relevant when we look at it.

Thanks

Title: Re: Disassembly listing disappeared with the last upgrade
Post by Quigon on Aug 23rd, 2020 at 8:22pm
Thanks for the response.
The listing isn't there for either the mega board or the Due. I'm in the process of transferring a project from the mega to the due and that's when I first noticed it was missing.
Regards

Title: Re: Disassembly listing disappeared with the last upgrade
Post by Simon Hopkinson on Aug 24th, 2020 at 1:38pm
Can you confirm what IDE you are using (Visual Studio versions and Arduino Version)?

The build output shown in yellow above will also be useful.


Title: Re: Disassembly listing disappeared with the last upgrade
Post by Simon Hopkinson on Aug 25th, 2020 at 11:51am
The latest release (20.07.08.9) has improved logging around the Disassembly View generation, and it will expose the command line to run the process manually if there is an error encountered.

Available at the top of this board: https://www.visualmicro.com/forums/YaBB.pl?board=VS_ARDUINO_EXT_RELEASES

Title: Re: Disassembly listing disappeared with the last upgrade
Post by Quigon on Aug 27th, 2020 at 12:26am
Apologies for the delay, real work got in the way.
I'm using VS 2019 community edition version 16.7.2
The Arduino IDE version is 1.8.13
Visual Micro version is 2020.708.7

The text in the output window is:
Compiling debug version of 'Due_coil_winder' for 'Arduino Due (Programming Port)'
Program size: 92,944 bytes (used 18% of a 524,288 byte maximum) (16.33 secs)

Creating disassembled view
     Disassembled view creation complete
     Switch to the Output > Disassembly Window Or Open the Output File: file:///C:/Users/BLAH Blah/AppData/Local/Temp/VMBuilds/Due_coil_winder/arduino_due_x_dbg/Debug/Due_coil_winder.ino_objDump.log

The log file is 0 bytes
There's no disassembly tab in the "show output from:" in the top left of the output window. Only "Micro build" is there. Hope that helps
Regards

Title: Re: Disassembly listing disappeared with the last upgrade
Post by Visual Micro on Aug 27th, 2020 at 1:41am
The latest release (20.07.08.9 and above) has improved logging around the Disassembly View generation, and it will expose the command line to run the process manually if there is an error encountered.

Available at the top of this board: https://www.visualmicro.com/forums/YaBB.pl?board=VS_ARDUINO_EXT_RELEASES

Title: Re: Disassembly listing disappeared with the last upgrade
Post by Quigon on Aug 29th, 2020 at 3:14pm
I have updated to the latest release. There is a disassembly window with the following text:
[code]ERROR: ObjDump failed to produce a result.
CMD: cmd.exe /S /C "C:\Users\Blah\AppData\Local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1\bin\arm-none-eabi-objdump.exe  -h -S -l "C:\Users\Blah\AppData\Local\Temp\VMBuilds\Due_coil_winder\arduino_due_x_dbg\Debug\Due_coil_winder.ino.elf" > "C:\Users\Blah \AppData\Local\Temp\VMBuilds\Due_coil_winder\arduino_due_x_dbg\Debug\Due_coil_winder.ino_objDump.log""[/code]

The logfile is as before, 0 bytes long
Regards

Title: Re: Disassembly listing disappeared with the last upgrade
Post by Visual Micro on Aug 29th, 2020 at 5:12pm
Thanks, as you can see we are asking objdump.exe to write the results to the file and it is failing, producing a zero byte file.


Code (]"C:\Users\Blah\AppData\Local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1\bin\arm-none-eabi-objdump.exe"  -h -S -l "C:\Users\Blah\AppData\Local\Temp\VMBuilds\Due_coil_winder\arduino_due_x_dbg\Debug\Due_coil_winder.ino.elf" > "C:\Users\Blah \AppData\Local\Temp\VMBuilds\Due_coil_winder\arduino_due_x_dbg\Debug\Due_coil_winder.ino_objDump.log"[/code):


Can you please take the command that you see without the cmd.exe part (see above) and open windows cmd then run it. See if we gate the same issue.

I notice we have an extra " at the end of the entire command instead of a quote around the .exe, which we will remove in the next release, however it doesn't cause it to fail for us. I have corrected that in the example above.

This might also be the length of the file names or a long path issue. We can try to replicate that and convert to short 8.3 windows paths if that is the issue.

You can test by changing the output .log path to somewhere shorter. The output .log paths is
[code]"C:\Users\Blah \AppData\Local\Temp\VMBuilds\Due_coil_winder\arduino_due_x_dbg\Debug\Due_coil_winder.ino_objDump.log"


You will also see similar for the .elf that is produced the dump from. You can copy the elf to the same simpler path and then change the elf path in the cmd
[code]"C:\Users\Blah  \AppData\Local\Temp\VMBuilds\Due_coil_winder\arduino_due_x_dbg\Debug\Due_coil_winder.ino.elf"
[/code]

As you can see it is a simple external command. If you have time to make these tests and narrow down the issue that will be helpful but we will be able to look at it some more towards the end of the coming week.

Thanks


Title: Re: Disassembly listing disappeared with the last upgrade
Post by Quigon on Aug 29th, 2020 at 8:40pm
Running the full command from a cmd prompt produces a "The filename, directory name or volume label syntax is incorrect" error

Copied the executable to the desktop along with the .elf file.
"arm-none-eabi-objdump.exe -h -S -l Due_coil_winder.ino.elf > Due_coil_winder.ino_objDump.log"
produces the listing file as expected

Added in the paths to original .elf and .log files
arm-none-eabi-objdump.exe -h -S -l "C:\Users\Blah Blah\AppData\Local\Temp\VMBuilds\Due_coil_winder\arduino_due_x_dbg\Debug\Due_coil_winder.ino.elf" > "C:\Users\Blah Blah\AppData\Local\Temp\VMBuilds\Due_coil_winder\arduino_due_x_dbg\Debug\Due_coil_winder.ino_objDump.log"
This also produces the listing file as expected

The character count for the path to and including the executable is 136 including spaces.
The whole command is 373 chars and the one that works from the desktop is 270 chars

Obviously I changed my user name for these text dumps but these have the same number of letters and a space as it is 2 words
I also looked at the avr version of the same project. Same result even though the tools for that are located in the Program files (x86) directory which is a shorter path.

Title: Re: Disassembly listing disappeared with the last upgrade
Post by Quigon on Aug 30th, 2020 at 3:57pm
I think I have found the error, the syntax for the command string has a missing " after the path to the application. Maybe that's where your extra " came from at the end of the string?

This works from a command prompt:

"C:\Users\Blah Blah\AppData\Local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1\bin\arm-none-eabi-objdump.exe" -h -S -l "C:\Users\Blah Blah\AppData\Local\Temp\VMBuilds\Due_coil_winder\arduino_due_x_dbg\Debug\Due_coil_winder.ino.elf" > "C:\Users\Blah Blah\AppData\Local\Temp\VMBuilds\Due_coil_winder\arduino_due_x_dbg\Debug\Due_coil_winder.ino_objDump.log"

The syntax appears to be: "Path to application" switches(-h etc) "Path to elf file" > "path to output file"

Hope that makes sense?

Update;
Managed a temp fix by putting a single " in the disassembly switches section of project properties


Title: Re: Disassembly listing disappeared with the last upgrade
Post by Visual Micro on Aug 30th, 2020 at 4:50pm
Haha, that a very good idea for a workaround. Yes I mentioned previously I has spotted the quotes issue. Actually the missing quote is there but at the end of the entire command, in the wrong place!

Thanks very much for the confirmation that is the issue. I have no idea why we didn't hit the issue, possibly related to windows version.

In any event we will produce an update over the next day or two with the fix. I'll post a note here when the update is available but clicking the notifcations button on the releases forum board might also be useful.

Title: Re: Disassembly listing disappeared with the last upgrade
Post by Simon Hopkinson on Sep 1st, 2020 at 1:31pm
We have published an update containing the fix detailed above, 20.07.08.12, which is available from the top of the below board:
https://www.visualmicro.com/forums/YaBB.pl?board=VS_ARDUINO_EXT_RELEASES

Let us know if you encounter any further issues, and thanks again for the great reporting!

Title: Re: Disassembly listing disappeared with the last upgrade
Post by Quigon on Sep 1st, 2020 at 10:11pm
Ok it now works as it should, thanks, but.....
If I change the optimization settings, clean the project as instructed then build, the disassembly listing fails. If I copy and paste the objdump string into a cmd window it runs as it should.
Running the build again usually completes objdump correctly.
Hope that makes sense?

Title: Re: Disassembly listing disappeared with the last upgrade
Post by Quigon on Oct 3rd, 2020 at 7:32pm
Well it has quit working and gone back to just listing the mile long path to the .log file.
If I run the string in a cmd window, it automatically opens a notepad window and populates it with a massive file of unintelligible gobbledygook.
Closing Notepad results in a 0 byte long .log file being saved in the appropriate directory.
As I mentioned in the previous post the optimization settings did have an effect on the creation of the disassembly listing. This is no longer the case as it doesn't work with any settings.
I would suggest that the file is now bigger than Notepad is capable of opening


Title: Re: Disassembly listing disappeared with the last upgrade
Post by Visual Micro on Oct 3rd, 2020 at 7:45pm
Please provide the information requested in yellow above.

Title: Re: Disassembly listing disappeared with the last upgrade
Post by Quigon on Oct 3rd, 2020 at 8:29pm
I appear to be missing something as I do not see anything in yellow on this page!

Title: Re: Disassembly listing disappeared with the last upgrade
Post by Visual Micro on Oct 3rd, 2020 at 11:34pm
Which browser are you using? Can you please show a screen shot of page.

Thanks

Title: Re: Disassembly listing disappeared with the last upgrade
Post by Quigon on Oct 4th, 2020 at 2:12pm
Using Chrome

VSss.JPG ( 80 KB | 1 Download )
vstop.JPG ( 88 KB | 13 Downloads )

Title: Re: Disassembly listing disappeared with the last upgrade
Post by Simon@Visual Micro on Oct 5th, 2020 at 9:18am
Thanks for the report.

We believe we have identified the fix surrounding this, can you confirm running the below command manually results in the correct output file:-
[code]cmd.exe /S /C ""C:\Users\Ian Davis\AppData\Local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1\bin\arm-none-eabi-objdump.exe"  -h -S -l "C:\Users\Ian Davis\AppData\Local\Temp\VMBuilds\Due_coil_winder\arduino_due_x_dbg\Debug\Due_coil_winder.ino.elf" > "C:\Users\Ian Davis\AppData\Local\Temp\VMBuilds\Due_coil_winder\arduino_due_x_dbg\Debug\Due_coil_winder.ino_objDump.log""[/code]

If you have any errors from this command please let us know when possible.

Title: Re: Disassembly listing disappeared with the last upgrade
Post by Quigon on Oct 5th, 2020 at 5:56pm
Hello
As written there are too many sets of quotes, like this:
"C:\Users\Ian Davis\AppData\Local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1\bin\arm-none-eabi-objdump.exe"  -h -S -l "C:\Users\Ian Davis\AppData\Local\Temp\VMBuilds\Due_coil_winder\arduino_due_x_dbg\Debug\Due_coil_winder.ino.elf" > "C:\Users\Ian Davis\AppData\Local\Temp\VMBuilds\Due_coil_winder\arduino_due_x_dbg\Debug\Due_coil_winder.ino_objDump.log"
it works. This is the string that the build was producing in the build window when the listing fails

Further investigations yesterday:

For some reason my windows session had .log associated with notepad. Removing that file association and running the build produced the full disassembly listing as it was supposed to in the disassembly window.

Changing any of the optimization settings to "no optimization" and cleaning the solution screwed it up bigtime. There were a number of compiler error to do with the programming port and obviously no disassembly file. I think that maybe the subject of another topic at a later date.

Changed the optimization back to "default optimization" then doing a project clean produced yet another variant. On the first build all there was the usual .elf error and no disassembly listing. The usual long command as above was listed and no .log file produced. Running that long string in a cmd prompt produced the file.

Running the build a second time produced the file in the disassembly window but only the first part of it. There was a message at the end of the listing with something like " the full listing is available at...path to the .log file"

Other observations are that it will not build a release version of any optimization form...there's a plethora of linker errors to do with debug code (which I guess is because it tries to link with excluded code) Not to worried about this as Arduino studio builds it fine and  it's  probably for another topic once the listing file is fixed.

Hope that helps

Title: Re: Disassembly listing disappeared with the last upgrade
Post by Simon@Visual Micro on Oct 7th, 2020 at 10:59am
We have released a new version (20.09.10.6) which should resolve the Disassembly Output not generating correctly, which is available from the top of the below board:
https://www.visualmicro.com/forums/YaBB.pl?board=VS_ARDUINO_EXT_RELEASES

VS Arduino » Powered by YaBB 2.6.12!
YaBB Forum Software © 2000-2024. All Rights Reserved.