Welcome, Guest. Please Login or Register
Arduino IDE for Visual Studio
 
 
When Logging a Support Issue in the Forum, please ensure you have also:-
  • Enabled vMicro > Compiler > Show Build Properties and Verbose
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
Support requests without the output above may be impossible to answer, so please help us to help you
 
  HomeSearch Tutorials & Wiki visualmicro.com LoginHelpRegister  
 
Page Index Toggle Pages: 1
Send Topic Print
Linker Map file? (Read 481 times)
mgarber
Newbies
*
Offline



Posts: 7
Linker Map file?
May 19th, 2019 at 8:29pm
 
I see a couple of discussions about where the file should be, but mines not there.
Ive got .cc.o, .cpp.d, .elf files, and the .bin file but thats it.

Please help.  Thanks!

Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10388
United Kingdom
Re: Linker Map file?
Reply #1 - May 19th, 2019 at 8:34pm
 
By default, this is controlled by whatever tool chain you have installed. Please follow the instructions at the top of this forum so that we can help.
Back to top
 
WWW  
IP Logged
 
mgarber
Newbies
*
Offline



Posts: 7
Re: Linker Map file?
Reply #2 - May 20th, 2019 at 4:47pm
 
oops... sorry about that....
(see attached)
Back to top
 

VeboseOut.txt (44 KB | 6 )
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10388
United Kingdom
Re: Linker Map file?
Reply #3 - May 20th, 2019 at 5:48pm
 
Okay so you are using nodeMCU. It's worth asking on their forum what the compiler flag is then I can tell you how to add it (F$ project properties)

Alternatively if you look at project properties there is "Micro build stats>disassembled view" which gives some reporting. You can also extend that with its own switches. If you enable this reporting then you will see an output window (see the output windows combobox) called "Micro Disassembly" after each build.
Back to top
« Last Edit: May 20th, 2019 at 5:49pm by Visual Micro »  
WWW  
IP Logged
 
mgarber
Newbies
*
Offline



Posts: 7
Re: Linker Map file?
Reply #4 - May 20th, 2019 at 6:28pm
 
My initial excitement was dampened by the fact that Micro build stats>disassembled view = TRUE crashes VStudio at the last step of creating the disassembly.

The linker flags I need to add are -Wl,-Map,YourProject.map -Wl,--cref (with the cref optional for cross referencing).
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10388
United Kingdom
Re: Linker Map file?
Reply #5 - May 20th, 2019 at 9:29pm
 
Hmm I'll give that a try for nodemcu thanks

1)

You might be able to override the linker flags in the F4 "project properties". See "extra flags link"

-Wl,-Map,YourProject.map -Wl,--cref

2)

or you can add the linker flags by overriding the default build properties. Notice in your verbose output the property compiler.c.elf.flags=. I think that's what you want.

A. Either edit the platforms.txt file directly. You can find that location by hovering the mover over the tool chain in board manager and clicking the "View source" link that appears in the preview at the bottom of board manager. normally c:\users\yourname\appdata\local\arduino15\packages\esp....\ver

B Or create a board.txt in your project and add the command to that. The board.txt overrides the core. This is is how might look, notice I have added YOUR_FLAGS to the end

Code:
compiler.c.elf.flags=compiler.c.elf.flags=-g {compiler.warning_flags} -Os -nostdlib -Wl,--no-check-sections -u call_user_start {build.float} -Wl,-static "-L{compiler.sdk.path}/lib" "-L{compiler.sdk.path}/ld" "-L{compiler.libc.path}/lib" "-T{build.flash_ld}" -Wl,--gc-sections -Wl,-wrap,system_restart_local -Wl,-wrap,spi_flash_read YOUR_FLAGS 




If you have copy output to intermediate enabled then the output should end up in project property pages>intermediate_folder\config_name
Code:
C:\Users\YOUR_NAME\Documents\Visual Studio 2017\Projects\Tracker1.0\Release 



but in any case it will be in the temp build folder
Code:
C:/Users/YOUR_NAME/AppData/Local/Temp/VMBuilds/Tracker2/esp8266_nodemcuv2/Release 




All of this can be seen in the verbose output should you want to delve in.
Back to top
« Last Edit: May 20th, 2019 at 9:35pm by Visual Micro »  
WWW  
IP Logged
 
mgarber
Newbies
*
Offline



Posts: 7
Re: Linker Map file?
Reply #6 - May 21st, 2019 at 1:20am
 
Im getting closer... it has to be added to the  "Extra c.elf flags" : -Wl,-Map,YourProject.map

Linked without barfing but didnt produce any file Sad

Im talking(?) with the MCU guys to see what they know.  Is it an order thing?
Back to top
 
 
IP Logged
 
mgarber
Newbies
*
Offline



Posts: 7
Re: Linker Map file?
Reply #7 - May 21st, 2019 at 1:33am
 
Stop the presses!!!    I found it at C:\Users\<yourNameHere>\AppData\Local\VirtualStore\Program Files (x86)\Arduino\java\bin.

....well.....  better here than nowhere, eh?


(Now to find where my exception was occurring)
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10388
United Kingdom
Re: Linker Map file?
Reply #8 - May 21st, 2019 at 12:46pm
 
Great, I forgot to say that you should click Rescan or restart the ide after making core changes in the underlying platform. But maybe you found that out already Smiley

Back to top
 
WWW  
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10388
United Kingdom
Re: Linker Map file?
Reply #9 - Jun 16th, 2019 at 10:58pm
 
Reading this again the file should not be in that folder. It sounds like it is creating the file in the working directory as opposed to the build folder. We will have to change the working directory to the build folder when running these events
Back to top
 
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print