[SOLVED] Flash placement overlaps problem

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] Flash placement overlaps problem

    Hi,

    My flash placement file has the following code:

    Source Code

    1. <MemorySegment name="$(FLASH_NAME:UICR)">
    2. <ProgramSection alignment="4" size="0x04" load="Yes" name=".uicrBootStartAddress" start="$(UICR_BOOTLOADER:0x10001014)" />
    3. <ProgramSection alignment="4" size="0x04" load="Yes" name=".uicrRBPCONF" start="$(UICR_RBPCONF:0x10001004)" />
    4. <ProgramSection alignment="4" size="0x04" load="Yes" name=".uicrMbrParamsPageAddress" start="$(UICR_MBR_PARAM_PAGE:0x10001018)" />
    5. </MemorySegment>
    The .uicrbootstartaddress section is defined in the code starting at 0x10001014, with a size of 4, so it should end at 0x10001018, and .uicrRBPCONF section start at 0x10001004, should end at 0x10001008, is that right?


    But then I compiled the my program, I reported the following error: section .uicrBootStartAddress overlaps absolute placed section .uicrRBPCONF I want to know why is this happening? How should I properly configure the flash placement file?

    When I put the definition of .uicrRBPCONF section before .uicrbootstartaddress section, there was no more error, but there was A new problem,I've defined A variable to put in .uicrRBPCONF section, the code is:

    Source Code

    1. volatile uint32_t m_uicr_rbpconf_value __attribute__ ((section(".uicrRBPCONF"))) = 0xFFFF00FF;
    I then downloaded the program to the chip and found that the contents of the address 0x10001014 did indeed become 0xff00ff, but several of the following addresses were also changed to zero by the outside address, which should have been 0xffffff. And although I added the volatile qualifier o m_uicr_rbpconf_value variable, its value wouldn't be written to the address 0x10001004 if I didn't use this variable in my code.I want to know where the problem is and how to solve it.

    Thank you very much for your support.
  • Hello,

    Thank you for your inquiry.
    Embedded Studio uses currently the gcc linker where the placed sections must be in actual memory order. That is why the config in your first box is not working.
    In case of the memory that is changed to zero instead of 0xFF, we assume that you have segments defined that have no defined size and simply fill up all memory that is available by target device definition.
    These areas will be filled with 0x00 by gcc linker default. You can change this in the Embedded Studio project options under Project->Edit Options...->Code->Linker->Default Fill pattern. Change this to 0xFF.

    Is this solving the issue?

    Best regards,
    Nino
    Please read the forum rules before posting: Forum Rules

    Keep in mind, this is not a support forum. Its main purpose is user to user interaction.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support contact us per e-mail.
    Alternatively our support ticketing system can be used as well: segger.com/ticket/