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.

TM4C123GH6PM: Get started of ARM-based Microcontroller TM4C123GH6PM

Part Number: TM4C123GH6PM
Other Parts Discussed in Thread: EK-TM4C123GXL

Tool/software:

Hi all,

Previously, we use MSP432P401R chip as the ARM-based MCU in our company.

TI have told the chip is EOL.

We need ARM-based MCU as our new project and we have bought LaunchPad for development.

I have read all the documents on TI's website but there's a problem in the new project.

I imported the example project is ok and could debug or download to the chip.

But it can not worked if I created a new project, even the codes are the same as the example.

The error code is #1965, and sometimes #10234-D and #10010 if I coding with new code.

Are there any configurations that I need to check?

BTW,

I used to use register level for coding, so I just check some functions that might be used in our project.

Please let me know if you need any information for the trouble shooting.

BR,

Yu-Chuan, Chen

  • I imported the example project is ok and could debug or download to the chip.

    But it can not worked if I created a new project, even the codes are the same as the example.

    My recommendation for creating a new project will be to modify based on working project so all the CCS settings, include paths and etc are setup. 

    Please let me know if you need any information for the trouble shooting.

    Based on your above errors, the compiler is unable to find drivers/buttons.h The buttons.h file is at C:\ti\TivaWare_C_Series-2.2.0.295\examples\boards\ek-tm4c123gxl\drivers. Therefore, you need to have the include paths that can searched by the compiler to find the source files. See below. This is why I suggest to base off an existing working example and then copy that project as a starting point for your new project. You can start with the example like C:\ti\org_TivaWare_C_Series-2.2.0.295\examples\boards\ek-tm4c123gxl\qs-rgb or C:\ti\org_TivaWare_C_Series-2.2.0.295\examples\boards\ek-tm4c123gxl\hello or even the simplest one like C:\ti\org_TivaWare_C_Series-2.2.0.295\examples\boards\ek-tm4c123gxl\blinky.

    If you are using buttons.c file, you need to make sure that file is linked to your project. See below that is already done for the qs-rgb example so if you base off this example, you will not have any compile issues. 

    I used to use register level for coding, so I just check some functions that might be used in our project.

    Please let me know if you need any information for the trouble shooting.

    Register level of coding style is not recommended as it is very prone to mistakes. This is why we offer simple-to-use peripheral drivers by calling API functions. It can be one simple API call that saves hundreds of lines of register level coding. 

  • Hi Charles,

    Thanks for the replying, and sorry for the delay because of the vacation in my place.

    My recommendation for creating a new project will be to modify based on working project so all the CCS settings, include paths and etc are setup. 

    =>

    I can not understand this very much.

    How should I do while I am creating a new project?

    In the new project, I met this trouble.

    On the other hand, I will use your recommendation for coding, such as using API function.

  • I can not understand this very much.

    How should I do while I am creating a new project?

    In the new project, I met this trouble.

    What I mean is that you start with a example like the hello where you can find in C:\ti\org_TivaWare_C_Series-2.2.0.295\examples\boards\ek-tm4c123gxl\hello. First, run the example as-is and make sure it works as it blink the LED and print the "Hello World" message to the terminal. You can then modify the project to create your own custom project. You can also copy this hello example project into another name. For example, in CCS, you can just copy the hello project by using the Ctrl-C and then Ctrl-V into another name. For example, do a Ctrl-C on the hello project and the Ctrl-V into another project called "My_Custom_Hello_Program".  This is the best way to retain all the CCS settings. 

    If you look at the hello example, it has the #include to all the drivers you need for the hello program to work. In your program, you are using the absolute paths which is not very portable.  

  • Hi Charles,

    I'll try this.

    Thanks a lot.

    BTW,

    It means created a new empty project by myself is not recommended, right?

  • It means created a new empty project by myself is not recommended, right?

    Hi,

      If you know how to setup the project from scratch for the CCS settings, include path to the header files and the library path for the linker then you can create a new project on your own. But why doing that if you can take an existing example that has all settings setup for you? This is why I recommend taking an example and modify/add your source code to it. 

  • Hi Charles,

    Thanks a lot.

    I'll use the method you suggested to create projects for the new products.