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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

1,526 Views
Charlie
Contributor III

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.

Labels (1)
0 Kudos
Reply
2 Replies

1,110 Views
Charlie
Contributor III

Thanks for the response.

I didn't realize you could let it generate the link file automatically. However, this will probably not do for our project considering we are storing some information in parts of program space to use for another application (binaries for an FPGA). But, yes, my linker file does contain a line like that, but reads (RW)  : ORIGIN = 0x7F00,   LENGTH = 0x0100, which should be big enough to store the FF. When I expand the length to 0x0300 (and move the next section's address down 0x0200, it compiles and I get the above mentioned # .relay_parameter_section
00007F00 000000FF relay_parameters FFLASH_parameters (data_c.obj), but doesn't work (because I think moving the next block causes issues, and I didn't go down that path because it made no sense).

But I "solved" my problem simply by copying the project that does work, and then editing as I needed to. It now compiles in the defined section as 0xFF and takes up the same space in the memory map section, making it fit into the allocated space.

0 Kudos
Reply

1,111 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Charles,

As you know that the MC56F8367 supports the external memory, which can be connected to DSC via EMI(external memory interface). But the CW for mcu ver10.6 does not support the mode, it means that it does not genereate the code to save in external memory.

The current CW for mcu ver10.6 can only support a project which save the code in flash.

Regarding the

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

do you use the line such as .x_flash_ROM          (RW)  : ORIGIN = 0x4000,   LENGTH = 0x4000  to define the memory size? but the compiler pops "overflow error message"?

Can you have the compiler generate the link file automatically?

BR

Xiangjun Rong

0 Kudos
Reply