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.

MSP432 LaunchPad with Keil

Other Parts Discussed in Thread: CC3100, CC3100BOOST, CODECOMPOSER

I have a MSP432 LaunchPad and would like to use it in combination with the CC3100 BoosterPack.

I used the TI example: CC3100BOOST_MQTT-TwitterLED_MSP432P401R which works fine, if I build the project with CCS Cloud.
If i open the same project with Keil than I get a message: Missing Software Packs: TI.MSP432. I have installed the current version of the MSP432 Software pack, which is called: TexasInstruments.MSP432.1.0.0. Under Manage Run-Time Environment I switched the Device Startup from TI.MSP432.0.0.9 which is missing to the new Device Startup for the MSP432 Family. After this I was able to build the project and programming the MSP432 LaunchPad.

But unfortunately the code is not working properly. I'm able to debug the project until the function: configureSimpleLinkToDefaultState(). It seems like the programm is hanging there. Are there any solutions for this?

  • Hanno,

    Texas Instruments supports CCS but not Keil's MDK so it is hard to provide any support regarding this topic without help from Keil. You can search their discussion forum through the following link: www.keil.com/.../threads.asp

    It would also be helpful to provide exactly how the program is hanging in the subfunction. Is it reaching an unknown state, stuck inside a while loop, etc? You should step through your code using the debugger tool in order to provide more information on the status of the MSP432 device that causes it to hang.

    Regards,
    Ryan
  • Hi Ryan

    Inside of the sl_Start function, are two function calls of OSI_RET_OK_CHECK(), the program hangs while executing the second of this functions:
    OSI_RET_OK_CHECK(sl_SyncObjWait(&g_pCB->ObjPool[ObjIdx].SyncObj, SL_OS_WAIT_FOREVER));
    But I'm not able to say where excatly, because it is not possible to reproduce the hanging with step over, only with runing the program. After stopping the execution manually, the program hangs inside of the startup_msp432.s in line 270.


    I also tried to compile and debuging the project with CCS Version 6.1.0, but there I receive the message with exceeds code size limit. Should it not be possible to work with the LaunchPad without a License of CCS? The License Type under License Information View is: Free License.


    Regards
    Hanno

  • Hello Hanno,

    You are indeed exceeding the code size limit of the free version of CCS, here is another thread of the same topic: e2e.ti.com/.../1497475

    Regards,
    Ryan
  • I also tried to get the Keil project to work, with no success. After making this change to the uvproj file:

    < <component Cclass="Device" Cgroup="Startup" Cvendor="TI" Cversion="1.0.0" condition="MSP432 CMSIS-CORE">
    ---
    > <component Cclass="Device" Cgroup="Startup" Cvendor="TexasInstruments" Cversion="1.0.0" condition="MSP432 CMSIS-CORE">

    I was able to compile. Then I realized that the original startup_msp432.s file had been replaced by uVision with a stock file with default ISRs. So I put the original ISRs back in the startup_msp432.s file as follows:

    31a32,37
    > EXTERN SysTickIntHandler
    > EXTERN Port1IsrHandler
    > EXTERN TimerA1_ISR
    > EXTERN IntSpiGPIOHandler
    > EXTERN EUSCIA0_UART_ISR
    >
    54c60,61
    < DCD SysTick_Handler ; SysTick Handler
    ---
    > ;DCD SysTick_Handler ; SysTick Handler
    > DCD SysTickIntHandler ; SysTick Handler
    67c74,75
    < DCD TA1_0_IRQHandler ; 10: TA1_0 Interrupt
    ---
    > ; DCD TA1_0_IRQHandler ; 10: TA1_0 Interrupt
    > DCD TimerA1_ISR ; 10: TA1_0 Interrupt
    73c81,82
    < DCD EUSCIA0_IRQHandler ; 16: EUSCIA0 Interrupt
    ---
    > ;DCD EUSCIA0_IRQHandler ; 16: EUSCIA0 Interrupt
    > DCD EUSCIA0_UART_ISR ; 16: EUSCIA0 Interrupt
    92,93c101,104
    < DCD PORT1_IRQHandler ; 35: PORT1 Interrupt
    < DCD PORT2_IRQHandler ; 36: PORT2 Interrupt
    ---
    > ;DCD PORT1_IRQHandler ; 35: PORT1 Interrupt
    > DCD Port1IsrHandler ; 35: PORT1 Interrupt
    > ;DCD PORT2_IRQHandler ; 36: PORT2 Interrupt
    > DCD IntSpiGPIOHandler ; 36: PORT2 Interrupt

    After doing so, from configureSimpleLinkToDefaultState(), I get a HardFault.

    If it is any consolation, the IAR project does not work either, and it does the same thing as Keil (HardFault). At least IAR compiles without any project file or startup file hacks. It appears to me that the only environment that has been tested by TI is CodeComposer with the TI compiler.

    David
  • Hi David

    Thank you for your input. With your input I was able to solve the issue.
    Use the new TI device package as described in my first post, than copy the hole contents of the old files:
    - startup_MSP432P4.s
    - system_MSP432P4.c

    into the new files:
    - startup_msp432.s
    - system_msp432.c

    Thats it, after this modification it was possible to run the project without any HardFaults.

    Best regards
    Hanno

  • Hi Hanno,

    Thanks. I just noticed two differences between the original files and the new Keil-generated ones. In the Keil-generated files, the floating point unit is not enabled during startup, and the default stack size is 0x200. Logically enough, the stack needs to be bigger (0x800 is used in the example startup files, and that works).

    To summarize, it is necessary to change 'TI' to 'TexasInstruments', as mentioned above. And you can then either overwrite the Keil-generated startup files with the original ones, as you discovered; or you can take the Keil-generated startup files, add the necessary ISRs, and increase the stack size (the FPU is not needed for this example).

    Cheers,

    David

  • Hanno,

    I'm glad that you were able to solve your issue. Can you specify the exact differences between startup_MSP432P4.s & .c and startup_msp432.s & c, respectively? This will help us figure out how to revise the code so that this issue does not appear in the future.

    Regards,
    Ryan
  • Hi Ryan

    Thera are no changes necessary in the startup files.
    But after switching from the old MSP432 Software pack to the new one (TexasInstruments.MSP432.1.0.0), Keil will overwrite the startup files with theirs default content. So you should only exchange the Software pack to the current version, and after this replace the hole content of the default startup files with the content of the original TI startup files.

    Regards
    Hanno

**Attention** This is a public forum