The MCU is TI's MSP432P401R,ROM space is 256KB, RAM space is 64KB.When I set the IROM1 space :256K, My Project can compile and linker sucess, MAP information is as follows:
Total RO Size (Code + RO Data) 252728 ( 246.80kB)Total RW Size (RW Data + ZI Data) 61152 ( 59.72kB)Total ROM Size (Code + RO Data + RW Data) 254184 ( 248.23kB)
But , If I Set the IROM1 space :252K, No other changes!! It Will link error!!!(the reseve 4K need other usage)Error:L6407E: Sections of aggregate size 0xbc0 bytes could not fit into .ANY selector(s).Not enough information to list image symbols.Not enough information to list image map.
When set the IROM1 space :256k, I analysed the map files, and hex files, It really only need 248.23KB.
I Can't find the reason, need your urgent help, Thanks very much!
Just because you have only 252728 bytes of code, that doesn't automatically mean that they'll fit into an address space of 258.048 consecutive bytes. There are evidently gaps among those 252728 bytes, stretching the range of addresses used to more than 252 KiB.
First,Thanks your answer!
I also doubt this reason.But,When I set 256K, I check the map file and the hex file detailed! no addresses larger than 248.23K.
Can you analyse the map file in my attachment of the question.
Is any other reason?
Is the scatter file being generated from the target dialog settings, or are you using your own scatter file?
There were no attachments.
The ARM Compiler Reference Guide page C6-642 notes that the linker may add region table entries that require more space than you expect. It also suggests adding --info=any to the linker command line to get more information for debugging linker issues. (The book is accessible from the Books tab in the IDE.)