Message Edited by CrasyCat on 2007-04-13 11:25 AM
1) In the data window in the debugger, occasionally a weird symbol in single quotes will
appear immediately to the left of a data value. What is the meaning of
these symbols?The symbol you see are like this: 'U' 85? this is the ASCII translation of the data value.
regards,
filippo
Hello,
I know it's been a long time ago from your last post.But, I am also facing the same problem regarding info about code and data size. I couldn't find the .map file in my project folder. I am using codewarrior development studio for MCUv10.4. Could you please tell me where can I find the .map file in the project.
Atal
It is in the same folder as the .elf/.abs file, typically in FLASH or something like this.
Thank you for the quick response. I found the .map file but couldn't analyse it to get the code and the data size from it. Couldn't you please help me with it
Atal
Hello Atal:
In the map file you can find a summary of the memory usage. Something like next:
READ_ONLY is the total FLASH memory used by code, constants, variable initialization values, arrays, etc.
READ_WRITE is the amount of RAM memory used by your variables.
NO_INIT corresponds to the MCU registers, and also any memory section declared as no_init in your linker file (prm).
The rest of the map file contains whole more details about the placement and sizes of your variables, functions, initialization code, etc.
Hope this helps!
Jorge Gonzalez
Hi Jorge:
First of all Thank you for your clear explanation.But I didn't find the above mentioned section in my .map file. There is a section at the end of my .map file which is as follows:
# Memory map:
v_addr p_addr size name
00000000 00000000 00000400 .vectors vectorrom
00000400 00000400 00000018 .cfmprotect cfmprotrom
00000500 00000500 00000000 .code code
00000500 00000500 0000DCD0 .text code
20000000 20000000 00000000 .vectorram vectorram
20000400 20000400 00000000 .userram userram
20000400 0000E1D0 00000018 .data userram
20000418 20000418 00005510 .bss userram
20005928 20005928 00000000 .custom userram
20005928 0000E1E8 00000018 .romp userram
# Link start time: Mon Mar 31 14:13:23 2014
# Link end time: Mon Mar 31 14:13:23 2014
Does the size of the code section represent the Flash memory and the sum of the size of userram section represent the RAM memory.
Atal
Hello Atal:
This thread was originally for an HCS08, so it thought it was the case for you.
In your case here is the explanation:
The interrupt vectors start at address 0 and their size is 0x400 bytes.
The code starts at address 0x500 and it is 0xDCD0 bytes long
Initialized data starts at address 0xE1D0 and it is just 0x18 bytes.
Non Initialized data starts at address 0x20000418 and it is 0x5510 bytes long (this is a RAM space).
- You must add .vectors, .cfmprotrom, .text, .data and .romp to get the size of FLASH used.
- Add .data, .bss and .custom to obtain RAM usage.
Hello again, I am stuck in another problem now. I am using mcf52235 microcontroller which has 32Kb RAM. When I added .data,.bss and .custom sizes,it accumulated to a value of about 25Kb. But, when i programmed my microcontroller, it didn't run! Now, i reduced my RAM uses to minimal value by modifying the code to just led blinking operation. Now, the program run fine. So, was the cause of my program "hanging" in the first instance due to RAM overflow???shouldn't the Codewarrior give error message in that case??
Secondly, there is
# Heap and Stack sizes definition
___heap_size = 0x1000;
___stack_size = 0x1000;
defined in the "MCF52235_Internal_Flash.lcf" file.Is this 4kb each allocated for heap and stack included in the RAM size found in the .map file. I ask this question cause when I reduced heap and the stack sizes to 0x500 each,my initial code with RAM of 25Kb started working. Thanks in advance!
Atal
It looks your RAM overflowed the available space. Unfortunately the ColdFire linker does not report an error for this. 4 KByte stack seems a lot to me, do you really need that much?
And I suggest that in case you have such a problem, you debug your application through the startup code. Very likely your SP (stack pointer) gets pointed to FLASH area and then your application crashes.
Erich