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 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.