This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software: Code Composer Studio
#pragma PERSISTENT (SFR13Data) // SFR13 データ記憶
char SFR13Data[DimMax][54] ;
I want to put 1024 54 character data. DimMax 63 is OK. However, when DimMax is 64 or more, the error of #10099-D is output and the variable cannot be secured. How can I reserve more than 64 array variables in FRAM?
I don't know all the error codes -- what is the text for #10099-D?
As I recall, PERSISTENT requires explicit initialization.
#pragma PERSISTENT(SFR13Data)
char SFR13Data [63] [54];
#pragma PERSISTENT(SFR13Data1)
char SFR13Data1 [63] [54];
#pragma PERSISTENT(SFR13Data2)
char SFR13Data2 [63] [54];
It is OK to declare the above three. However Next, one declaration will result in an error.
#pragma PERSISTENT(SFR13Data)// SFR13データ記憶
char SFR13Data [64] [54];
I want to declare char SFR13Data [1024] [54];
The following error occurs. It is pointed out that the physical memory is insufficient. However, the FRAM physical memory has an extra 100 kbytes. Then, by declaring the 54 characters by changing the variable name by 63, memory is secured. However, trying to secure more than 64 (SFR13[64][54]) will result in an error.
-----------------------------------------------------------------------------------------------------
Typical message
"./lnk.cmd", line 48: error #10099-D: program will not fit into available
memory. placement with alignment fails for section ".text" size 0x2b12 .
Available memory ranges:
FLASH size: 0x1000 unused: 0xe56 max hole: 0xe56
What it means
The linker was unable to fit some portion of the program onto the device. The specific error message indicates what section of the program the linker failed to place, its size, and the memory range it tried to place it in. For the memory ranges listed, the size indicates the total size of the section, unused represents the amount of space remaining when trying to place the section that failed and max hole represents the largest contiguous region available.
Why is it happening
Fundamentally, this indicates that the device has insufficient physical memory (read-only or read-write) to handle the program. However, this doesn't necessarily mean that a larger device is required. There are several things that can be changed that could resolve the problem. Also, for advanced users this error could also come from an incorrect linker command file that doesn't accurately represent the current device. (TI devices normally come with an appropriate linker command file and don't require user modification, so if you don't know anything about the linker command file you shouldn't worry about this possibility.)
Remedy
This error message can occur for several reasons so there are multiple possible solutions. A few common issues to consider:
##If a section failed to place to RAM make sure that the stack and heap sizes are set appropriately for the device and your program. Consider reducing them.
##Try enabling or increasing the optimization level used by the compiler. Unoptimized programs require far more space than optimized ones.
##If you have added I/O code for debugging purposes this can be larger than expected. Specifically, printf() will not fit on many small embedded devices. Depending on the size of the device, the --printf_support=minimal option may solve the problem or printf() may not be a viable means of debugging at all.
If the above suggestions don't resolve the issue then more investigation will be required to determine if the issue is simply that the device is not large enough for the program or if space is being used unnecessarily. The best place to find more information is the map file generated by the linker. The map file provides detailed information on where sections are placed, what they consist of and how large they are. When looking at this please keep in mind that the section that failed to place is not necessarily the source of the problem. Another section previously placed in the same memory region could have been much larger than expected and introduced the issue.
Risks, Severity
This error prevents the construction of an executable program.
You did a memory allocation experiment.
Thank you.
My environment is CCs v9.0.1. The compiler version is TI18.12.2.LTS[TI v18.12.1LTS].
I haven't modified the cmd file.
But you succeeded, so I figured it was due to a compile condition.
I recheck the compilation parameters.
**Attention** This is a public forum