Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 8 Replies) Linker Map file? (Read 4631 times)
mgarber
Newbies
*
Offline


Posts: 7
Joined: Mar 2nd, 2017
Linker Map file?
May 19th, 2019 at 7:29pm
Print Post  
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
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Linker Map file?
Reply #1 - May 19th, 2019 at 7:34pm
Print Post  
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
Joined: Mar 2nd, 2017
Re: Linker Map file?
Reply #2 - May 20th, 2019 at 3:47pm
Print Post  
oops... sorry about that....
(see attached)
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Linker Map file?
Reply #3 - May 20th, 2019 at 4:48pm
Print Post  
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.
« Last Edit: May 20th, 2019 at 4:49pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
mgarber
Newbies
*
Offline


Posts: 7
Joined: Mar 2nd, 2017
Re: Linker Map file?
Reply #4 - May 20th, 2019 at 5:28pm
Print Post  
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
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Linker Map file?
Reply #5 - May 20th, 2019 at 8:29pm
Print Post  
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
Select All
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
Select All
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
Select All
e 




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


Posts: 7
Joined: Mar 2nd, 2017
Re: Linker Map file?
Reply #6 - May 21st, 2019 at 12:20am
Print Post  
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?
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
mgarber
Newbies
*
Offline


Posts: 7
Joined: Mar 2nd, 2017
Re: Linker Map file?
Reply #7 - May 21st, 2019 at 12:33am
Print Post  
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
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Linker Map file?
Reply #8 - May 21st, 2019 at 11:46am
Print Post  
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
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Linker Map file?
Reply #9 - Jun 16th, 2019 at 9:58pm
Print Post  
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 TopicPrint