This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Cannot init. the m_boot_settings in S110 7.0 bootloader

I'm using the S110 v7 SD, I want to amend the bootloader app such that I can merge it with my APP together with the SD to a single .HEX... To do so I'm taught to init. the m_boot_settings[] in bootloader_util_arm.c...

However, after I change the line from uint8_t m_boot_settings[CODE_PAGE_SIZE] attribute((at(BOOTLOADER_SETTINGS_ADDRESS))) attribute((used)); to uint8_t m_boot_settings[CODE_PAGE_SIZE] attribute((at(BOOTLOADER_SETTINGS_ADDRESS))) attribute((used)) = {BANK_VALID_APP};

The followings error occurs: ._build\bootloader.axf: Error: L6220E: Load region LR_IROM1 size (16624 bytes) exceeds limit (16384 bytes). Region contains 2701 bytes of padding and 0 bytes of veneers (total 2701 bytes of linker generated content). Target not created

My IROM1 setting is Start on 0x3c000, sized 0x4000

Anything goes wrong?

Thanks!

Parents
  • Eventually I found that the array m_boot_settings[] lay on the very final 1024B of the segment (start from 0x3fc00 to 0x3ffff)... My Keil work just fine if there's no init. value on it... However if I add a init. value to it, somehow Keil "think" that the m_boot_settings[] use 240B more (1024+240B), which over the size of 0x4000...

    I have no idea on why it need 240B more and nothing hint come from the .MAP file...

    The only way I can do is relocate the m_boot_settings[] to 0x3f800 so that it has room for the extra 240B, and now it compile successfully...

    Maybe sort of linker bug?

Reply
  • Eventually I found that the array m_boot_settings[] lay on the very final 1024B of the segment (start from 0x3fc00 to 0x3ffff)... My Keil work just fine if there's no init. value on it... However if I add a init. value to it, somehow Keil "think" that the m_boot_settings[] use 240B more (1024+240B), which over the size of 0x4000...

    I have no idea on why it need 240B more and nothing hint come from the .MAP file...

    The only way I can do is relocate the m_boot_settings[] to 0x3f800 so that it has room for the extra 240B, and now it compile successfully...

    Maybe sort of linker bug?

Children
No Data
Related