KEIL Error: L6220E: Load region LR_IROM1 size (65552 bytes) exceeds limit (65536 bytes)……

created at 06-20-2022 views: 5

Problem Description:

STM32F103CBT6 KEIL compile error

Error: L6220E: Load region LR_IROM1 size (65552 bytes) exceeds limit (65536 bytes). Region contains 84 bytes of padding and 0 bytes of veneers (total 84 bytes of linker generated content).

stm32

solution

first step

128K chip, modify the size of IROM1 to 0x20000 (the red box in the figure below), some versions of KEIL will automatically change this place when you change Device; and some versions need to be manually modified.

128k chip

second step

Select linkeredit accordingly to open the link.sct file;

linker-edit

Modify the data behind LR_IROM1 and ER_IROM1 in the file to 0x20000 (the red box in the figure below), and save the file;

modify the data behind LR_IROM1

third step

Recompile, problem solved;

RECOMPILE

hint

The first and second steps must be completed before compiling and testing. Doing the first step alone may not be successful.

reference

https://blog.csdn.net/zhangjunfa/article/details/125288357

created at:06-20-2022
edited at: 06-20-2022: