Jacques Kronbauer

Static Variables initialization error.

Discussion created by Jacques Kronbauer on Aug 26, 2009
Latest reply on Aug 31, 2009 by Bryan Kattwinkel

Hi,  we have a product line using MCF5282 Coldfire. We use Gnu tools like

m68k-elf-gcc, m68k-elf-objcopy, m68k-elf-objdump, m68k-elf-nm.


All global Static variable initialization doesn't work, so that the SREC .S19 file generated by m68k-elf-objcopy has records related to the global variables that  cause errors when programming MCF5282 flash via Freescales's CF Flasher.


CF Flasher programms all records but the ones that have data related to global variable initialization.


The MCF5282's flash code is programmed ok, so that I can even execute the code.

However, the global variables are initialized to zero and not the values I need.


For example, a the following global static variable initialization


int array[] = { 10, 50 };


all its elements are set to 0.


While programming using a USB to BDM Coldfire programmer and using Freescale's CF Flasher, I get a number of error messages saying that certain Records that map to the global variable could not be programmed.


I think this may be a problem with m68k-elf-objcopy or that I have misconfigured the memory map.


Thanks for your help.