This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430FR5994: IP Encapsulation Manual Placement?

Part Number: MSP430FR5994
Other Parts Discussed in Thread: MSP430F5529

Hello,

Could you describe the steps to manually place the IPE section into specified addresses?

I have been using the "Let compiler handle memory partitioning" option. I have now switched to the "Manually specify memory segment" option and configured the addresses in the GUI. What further steps do I need to take?

Best Regards,


image.png

  • Hello Kenan,

    It seems that this is one function of IAR compiler. I recommend you contact with IAR directly, which is more fast. You can try to contact with this email: support.cn@iar.com

    This is their technical support.

    BR,

    Janz Bai

  • Hello Janz,

    The screenshot was taken from CCS v12.8.1; this is not an IAR-specific feature. Additionally, if you review the document below, you’ll find extensive explanations of this functionality—although it does not cover manual address placement.

    https://www.ti.com/lit/an/slaa685/slaa685.pdf

    I’ve come across partial information in several different documents, but I’m confident that this should be possible to achieve in CCS.

    Best Regards,

  • Hello Kenan,

    Sorry for that I misunderstand your meaning. Let me send this post to our SDTO team who is responsible for IDE and compiler, to ask for their comments.

    BR,

    Janz Bai

  • Kenan - I assume you are looking to do this manually in your linker command file. This is something the device experts can help with. I will bring this thread to their attention.

    Thanks

    ki

  • Hello Kenan,

    I think this app note maybe can help you, you can look into this:

    MSP Code Protection Features

    Best Regards, 

    Janz Bai

  • This is the document I also shared on my last reply. SLA-685 does not provide a complete, copy-paste-ready linker command file or an end-to-end, step-by-step procedure that shows how to relocate the IPE to a specific absolute address.

  • Hello Kenan,

    I am so sorry but we really just have this material now. I think "let compiler handle memory partitioning" is easier and let us don't need spend time to manually handle it. Why you need to specify memory manually? 

    I think the operation in the figure you shared with me is ok, but maybe you need to do some tests and try on your side.

    Best Regards, 

    Janz Bai

  • Hi Janz,

    I agree that “let compiler handle memory partitioning” is convenient and avoids manual memory management. My concern is not about manually defining the IPE memory layout, but about
    address stability across builds when using OTA updates.

    In my system, OTA updates only replace the application code in the field. The IPE region in FRAM remains unchanged on the device. The application calls IPE functions directly (normal C function calls).

    My concern is this:
    If the compiler/linker places IPE functions at different addresses across builds, then a new application image (built later) may be linked against different IPE function addresses than the ones actually present on the device. In that case, after OTA, the new application could jump to incorrect addresses inside FRAM, leading to undefined behavior.

    So, this is not really an architectural preference on our side, but a hard requirement of the product: in the field, OTA updates can only update the application, while the IPE region has to remain unchanged.

    I think this is a pretty common real-world scenario for many products using IPE and this situation may come up for many users. Having clear guidance or an officially recommended approach from TI on how to handle this safely is really important.

    Best Regards,

    Kenan Onat Kaplan

     

  • Hello Kenan,

    I have got what you mean, so the key point is how to fix the address of these functions. Could you please try to check below link whether it can help you:

    2.7.2. Function Attributes — TI Arm Clang Compiler Tools User's Guide

    BR,

    Janz Bai

  • Hello Janz,

    I need to make a correction:

    The key point is not how to fix the address of individual functions or a set of functions. Even if I pin specific functions to fixed addresses, if the IPE base address changes, those functions would end up outside the IPE region and would no longer execute correctly. Therefore, what needs to be fixed is the IPE region itself (its base and size), not the individual elements placed inside it.

  • Hello Kenan,

    Thanks for your patient explanation. I can understand your goal. I am sorry that we just have the materials you shared and this: Code Composer Studio IDE v10.x for MSP430 MCUs (Rev. AS). I searched online about below steps, maybe you can try. Hope this can help you. I am so sorry that I don't more method to do it. because "manual setting it" is not used usually so we don't have more materials.

    2. Mark IPE Code Sections

    Similar to IAR, you need to tell the compiler which functions should be encapsulated:

     
    

    3. Manually Specify IPE Section Placement

    This step involves editing the Linker Command File (.cmd).

    Step 1: Open the .cmd File

    1. In the Project Explorer, expand the Debug or Release folder.
    2. Locate the file with the .cmd extension (e.g., MSP430F5529.cmd) and double-click to open it.

    Step 2: Define a Memory Region

    Find the MEMORY block in the .cmd file and add a new memory block for the IPE code:

     
    

    Step 3: Map the IPE Section

    Locate the SECTIONS block and map the .myipe section to the IPE_FLASH region you just defined:

     
    

    Step 4: Save and Rebuild

    1. Save the .cmd file.
    2. Perform ‍“Project → Clean”‍ followed by ‍“Project → Build”‍ to ensure the new linker script takes effect.

    4. Verify IPE Placement

    After building, check the generated .map file:

    • In the Debug folder, locate the file with the .map extension.
    • Open it and search for .myipe. Verify that its Load Address matches the address you set (e.g., 0x010000).

    BR,

    Janz Bai

**Attention** This is a public forum