Decoding the mapfile generated by a ColdFire processor

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

Decoding the mapfile generated by a ColdFire processor

593 Views
preetuabraham
Contributor III

Hi,

 I would like to know the differences between the .map files generated by using SDRAM and another flash linker file. I would like to know how to decode the memory being used for both .Also would like to know about using flash and SDRAM linker files being used separate

 

From flash linker file :

 


# Memory map:
  v_addr   p_addr   size     name
  00000000 00000000 00000850 .boot      boot
  02001000 00010000 00025140 .text      text
  20000000 20000000 00000000 .vector_ram vector_ram
  02026140 00035140 00002120 .data      data
  02028260 02028260 000497F0 .bss       bss

 

From SDRAM linker file:

 

# Memory map:
  v_addr   p_addr   size     name
  00000000 00000000 00000000 .code_flash code_flash
  02000000 02000000 00071250 .main_application_data sdram
  10000000 10000000 00000000 .mbar      mbar
  10010000 10010000 00000000 .sys_sram  sys_sram
  20000000 20000000 00000000 .vector_ram vector_ram
  20000000 20000000 00000000 .core_sram0 core_sram0
  20001000 20001000 00000000 .core_sram1 core_sram1

Labels (1)
0 Kudos
3 Replies

421 Views
preetuabraham
Contributor III

Hi Tom,

   Thanks for the update.

The cold fire chip being used is MCF5480CZP166.

I was trying to port a Cold fire legacy project which ran on Code warrior 6.0 to Code warrior 10.x.

0 Kudos

421 Views
TomE
Specialist II

> I was trying to port a Cold fire legacy project which ran on Code warrior 6.0 to Code warrior 10.x.

According the the MCF5480 Product Page, the recommended version of CodeWarrior for that part is 7.2:

http://www.nxp.com/products/microcontrollers-and-processors/more-processors/coldfire-plus-coldfire-3...

I don't know whether they stopped supporting that chip at 7.2 or whether the page with that link hasn't been updated since 7.2 came out (which I think was in 2010). Probably the latter.

You may have another problem upgrading from 6.0. Going from anything before or including 7.1 to 7.2 or greater is difficult if your project is using any assembly code anywhere as the ABI changed:

https://community.nxp.com/message/356263#356263

https://community.nxp.com/thread/66867#comment-66876

You should search through the CodeWarrior forums to see if anyone had your particular problem any time in the last 7 or more years.

Tom

0 Kudos

421 Views
TomE
Specialist II

You should read the Linker Documentation, and also have posted the Linker files used to generate the MAP files with this question.

You should also have said WHICH ColdFire chip you're using. They have different amounts of memory and features. You should also detail what you're trying to do and what you have there.

You should also look at the Memory Map in the Reference Manual. That will tell you the internal FLASH memory is at location 0x00000000 (where the chip starts from) and its internal SRAM is at 0x20000000. The external SDRAM can be anywhere in the memory space that you like. That's determined by the startup code (or Boot). It looks like someone has decided on 0x02000000 for that.

At a very basic level, with these devices they give you two ways to generate code.

When developing the software with a rapid write/load/test cycle, the code is linked to run in the SRAM. That's the "text" block above (that's where your code is). That build can only be loaded using the debug pod and disappears when powered off.

To make a shippable product you need the code ("text") to be loaded in the FLASH and start from there.

Or you may have a dedicated Bootstrap that is built that finds the Application code in the Flash (maybe in a Flash File System), loads it into SRAM and starts it executing. The Application code will be built separately with a different linker file.

Are you trying to build the example software Freescale provides, or are you trying to understand an existing project that someone else wrote? If the latter, then they should have written a document describing the way the system works for the next person who has to support it.

Tom

0 Kudos