Answeredhelp reading the map file

Author
grambo
Elite code monkey
  • Total Posts : 65
  • Reward points : 0
  • Joined: 2017/01/04 11:38:49
  • Location: near Manchester NH, USA
  • Status: offline
2017/09/13 08:02:06 (permalink)
0

help reading the map file

kseg0 Program-Memory Usage
 
section                    address  length [bytes]      (dec)  Description
-------                 ----------  -------------------------  -----------
.text                   0x9d012c40          0x5d8        1496  App's exec code 

 
I've got an exception being thrown in this block of code...  There's no function mentioned, and there are a bunch of sections listed like this.  Anyone know what it's referring to?  PIC32MX, XC32, optimization set to "3", project is in C with a handful of 1-line assembly macros, no where near enough to fill 0x5d8 worth of space.  Exceptions are thrown in a similarly defined region with optimization set to 0  (different address & length).
#1
Jim Nickerson
User 452 _
  • Total Posts : 4035
  • Reward points : 0
  • Joined: 2003/11/07 12:35:10
  • Location: San Diego, CA
  • Status: offline
Re: help reading the map file 2017/09/13 08:18:52 (permalink) ☄ Helpfulby grambo 2017/09/13 13:57:06
0
I wonder if you have this option ticked ?

Attachment(s)

Attachments are not available: Download requirements not met
#2
aschen0866
Super Member
  • Total Posts : 4113
  • Reward points : 0
  • Joined: 2006/01/08 22:18:32
  • Location: San Diego
  • Status: offline
Re: help reading the map file 2017/09/13 08:18:52 (permalink) ☼ Best Answerby grambo 2017/09/13 13:57:13
+3 (3)
Go to Project Properties -> Building, add
 
${MP_CC_DIR}\xc32-objdump -S ${ImageDir}\${PROJECTNAME}.${IMAGE_TYPE}.elf > list.lst
 
and enable "Execute this line after build". This will generate an assembly listing, e.g., list.lst, for the entire project and you'll be able to search the exception address. 
#3
Jim Nickerson
User 452 _
  • Total Posts : 4035
  • Reward points : 0
  • Joined: 2003/11/07 12:35:10
  • Location: San Diego, CA
  • Status: offline
Re: help reading the map file 2017/09/13 08:28:42 (permalink)
+1 (1)
I like aschen's answer.
I tend to use Window, Debugging, Output, Disassembly listing as I often forget the line aschen specifies.
#4
grambo
Elite code monkey
  • Total Posts : 65
  • Reward points : 0
  • Joined: 2017/01/04 11:38:49
  • Location: near Manchester NH, USA
  • Status: offline
Re: help reading the map file 2017/09/13 14:00:56 (permalink)
0
@jim I tried playing with that, I had it checked initially, and deselecting it gave me a bunch more of these unnamed sections...
@aschen0866 Nail on the head, but I have a '+' character in my project name (don't ask), which gets turned into a '_' in the name of the .elf file.  So I've got this as my post-compile step:
post-build.bat ${IsDebug}

...and this is my batch file (obfuscated the configuration name and project name, they are hard-coded):
if {%1} == {false} (
"C:\Program Files (x86)\Microchip\xc32\v1.43\bin\xc32-objdump" -S ".\dist\CONFIGURATION\production\PROJNAME.X.production.elf" > ".\__production.asm"
) else (
"C:\Program Files (x86)\Microchip\xc32\v1.43\bin\xc32-objdump" -S ".\dist\CONFIGURATION\debug\PROJNAME.X.debug.elf" > ".\__debug.asm"
)

#5
Jump to:
© 2017 APG vNext Commercial Version 4.5