AnsweredAssumed Answered

Memory Map section of xMap file does not match defined section above. Why?

Question asked by Charles Barnes on Nov 28, 2016
Latest reply on Dec 2, 2016 by Charles Barnes

A little background. Chip is 56f8367, 56800E family. CW version 10.6, build ID: 140329.


We originally started this project with the legacy codewarrior IDE, and then switched to Eclipse. I imported and converted a legacy project and went from there. The build configuration for all of the projects converted from the legacy IDE are always "ldm external memory."


That project is forking into another project, so I tried to set up a new project and then just include the files I actually need for the new forked project. For the life of me, I was unable to figure out how to get it to be "ldm external memory." I ended up with "FLASH_LDM." I'm not sure if this is relevant, but I figured I would mention it.


After massaging the project settings, and copying interrupt vectors and linker command files, I was able to get it to compile but it required me expanding one of the memory sections because something apparently was compiling much larger. I believe it is causing some problems interfacing with some other legacy code, so I need that memory space to be the same size as it has always been. So I dug into that.


Looking at the xMap file, i can see that the single structure being put into that defined memory block has compiled exactly the same as it does in the original project.


# .relay_parameter_section
00007F00 000000FF relay_parameters FFLASH_parameters (data_c.obj)


The size of that memory block is 0x100, so it should be large enough to hold that variable. However, when I make the memory block 0x100, I get the compiler error


"Overflow in segment: .x_relay_params from section: .relay_parameter_section Segment reserved byte size is: 0x00000200 -- Overflow of: 0x000001fc"


When I expand the block to 0x300 words so I can get it to compile with some output, at the bottom of the xMap file, the memory map looks like this:


# Memory map:
v_addr p_addr size name

(removed non-pertinent data)
00007F00 00007F00 0000001FE .relay_parameter_section .x_relay_params



Which is exactly TWICE the 0xFF I was expecting AND saw above. I don't get it. If I view the xMap from the old project, it correctly says the size is 0xFF here. I thought maybe it was some weird byte/word thing, but digging around in the project settings I found nothing that jumped out at me as a potential issue.


Any ideas?


Thanks for any help, I'm banging my head on my desk right now.