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.

CCS/MSP432P4111: How to migrate example projects of MSP432P401R to MSP432P4111 ?

Part Number: MSP432P4111

Tool/software: Code Composer Studio

Dear All,

I have a MSP-EXP432P4111 LaunchPad, a BOOSTXXL-K350QVG board and a EDUCATIONAL BOOSTERPACK II, so I want to try some example projects with them. But the example projects are designed for MSP-EXP432P401R LaunchPad.  I would like to know how to migrate the original example projects of P401R to P4111? Can I do this just by changing some project configurations?  Thank you.

XView.

  • a few simple steps:

    1. take a look at the datasheets of both devices - they are quite different;
    2. take a look at your code base and see how tightly coupled it was with the hardware. a well written piece of code would have a middle layer to handle the hardware specific stuff so the user code should be mostly hardware independent.

    a poorly written piece of code would have hardware specific stuff in there, making it impossible to port. in those cases, take a look at the intent and logic of the code and then port that intent and logic to the new chip. it is often much faster.
  • Hello Sunglin,

    Are you using a RTOS based project or non-RTOS based project? Also are you using the SimpleLink SDK and if yes, which version of the SDK?
  • Hi Amit,

    I am using non-RTOS example projects with simplelink_msp432p4_sdk_2_10_00_14. Would you mind taking a look at the example project which is boostxl_edumkii_microphonefft_msp432p401r_MSP_EXP432P401R_nortos_ccs ?

    I try to change the chip from MSP432P401R to MSP432P4111 and selected msp432p4111.cmd as linker command file, but it doesn't work.

    Do you have any simple way to do this ?

    Thank you.

    XView.
  • Hello Sunglin

    When migrating non-RTOS projects from MSP432P401R to MSP432P4111 device, beside making the change for the device type and linker cmd file, you would need to make the following change.

    1. Change the startup file from startup_msp432p401r_ccs.c to startup_msp432p4111_ccs.c
    2. Change the startup file from system_msp432p401r.c to system_msp432p4111.c
    3. In the Project Properties change the predefined symbol to _MSP432P4111_ and DeviceFamily_MSP432P4x1xI
    4. In the Project Properties change the ARM Linker->File Search Path Include library from ti/drivers/lib/drivers_msp432p401x.aem4f to ti/drivers/lib/drivers_msp432p4x1xi.aem4f

    You can try with the changes and see if it works. We normally would encourage using TI Drivers for migration. Also please note that there is a max SMCLK restriction on the P4111 device at high temperature.
  • Hi Amit,

    I have changed the example project following your instructions step 1 to step 4, but it seems missing something.  The compiled error is as follows. I guess there are some head files missing link.

    Sunglin.

  • Hi Amit,

    I rename the original project name to a different one, then the link of some definition variables are missing. In other words, when I doulbe clicked some variables it never open its head file directly. Would you mind to try this case in your CCS ?

    sincerely,

    Sunglin.
  • Hello Sunglin,

    For the errors in LCD Driver you would need to change the register to CMSIS Style of access. As an example UCB0TXBUF must be changed to EUSCI_B0->TXBUF

    As for the main.c, the Flash header file is flash_a.h; so the APIs would be

    MAP_FlashCtl_A_setWaitState(FLASH_A_BANK0, 2);
    MAP_FlashCtl_A_setWaitState(FLASH_A_BANK1, 2);
  • Hi Amit,

    It works now. Thank you very much.  

    Sunglin.

  • Hi Amit,

    I have one more question about your reply. In a part of your reply, you said, "Also please note that there is a max SMCLK restriction on the P4111 device at high temperature." What does that mean?

    Sunglin.
  • Hello Sunglin,

    The high temp devices which operate upto 105C have a maximum CPU clock of 24MHz. At 85C ambient temperature it is up to 48MHz.
  • Hi Amit,

    85C is enough for my application. Thank you.

    Sunglin.
  • Hi Amit,

    I have encountered a very strange situation that when I rename the original project name to a different one, then the link of definition variables and functions are missing. In other words, when I doulbe clicked on variables or functions it never open its head file directly. Do you know the reason of this case? Would you mind to try this in your CCS ?

    sincerely,

    Sunglin.
  • Hello Sunglin

    Yes, I saw this happen. However after manually cleaning any .d file in the Debug directory and a couple of clean and rebuild all, it started working.
  • Hi Amit,

    Why the same changed of the project properties doesn't work for the other example project? For example, "BOOSTXL-K350QVG-S1_GrlibExample_MSP432P401R."

    Sunglin.
  • Hello Sunglin,

    What is the error for other projects?
  • Hi Amit,

    I have cleaned the project and rebuilt it, but it still got errors.
    There are many undefined identifiers. The part of all error messages is attached.

    Sunglin.
  • Hi Amit,

    Sorry, I forgot to attached error message.

  • Hello Sunglin,

    It seems that it is not taking the correct define. As I mentioned earlier, MSP432P4111 device use flash_a.c/.h

    The application should call the correct API and correct parameters and that is something you will need to do.
  • Hi Amit,

    I copy flash_a.h and flash_a.c to the project, but it still shows many error messages. Would you mind telling me how to modify the configuration of the project linking to flash_a.h/c ?

    Sunglin.
  • Hello Sunglin,

    The API for which the parameters are giving error is incorrect. The API's have an equivalent in the flash_a.c/.h and they need to be used along with the correct parameters.
  • Hi Amit,

    I copy flash_a.x and sysctl_a.x files to replace flash.x and sysctl.x, respectively.  Some definition variables have also been modified to correct ones. But it still gets some error messages which are listed in the following. Do you know how to solve this problem?

    Sunglin.

  • Hi Amit,

    I change all SysCtl_xxxxxxx functions to SysCtl_A_xxxxxxx, and it works now. I just follow your instructions that you reply before. Thank you.

    Sunglin.
  • Hello Sunglin,

    If the project is working fine now, can we close the post?
  • Hi Amit,

    Thank you for your assistance. I have marked the issues are resolved. The post can be closed.

    Sunglin.

**Attention** This is a public forum