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/TM4C123GH6PZ: wrong part define

Part Number: TM4C123GH6PZ
Other Parts Discussed in Thread: TM4C123GH6PM, TM4C123GE6PM, TM4C123GE6PZ

Tool/software: Code Composer Studio

Hi,

I'm using the TM4C123GH6PZ device but is seems that CCS compile my code for the PM version. With the following code:

ROM_GPIOPinConfigure(GPIO_PH4_M0PWM4);
ROM_GPIOPinTypePWM(GPIO_PORTH_BASE, GPIO_PIN_4);

ROM_GPIOPinConfigure(GPIO_PC4_M0PWM6);
ROM_GPIOPinTypePWM(GPIO_PORTC_BASE, GPIO_PIN_4);

When I go to the declaration of the PC4 it send me in the pin_map.h file under the TM4C123GH6PM instead of the PZ and so when I try with the PH4 it doesn't allow me to go to the declaration. I saw in the datasheet of the PM that PH4 doesn't have a PMW4 on it.

I went to the properties of the project to verify if i didn't chose the wrong device but the right one is selected. I also checked in the .ccxml file to see if something was wrong in it but still, the right device is selected.

I also tried to add the following define at the beginning but it didn't change anything

#define PART_TM4C123GH6PZ

My question: is there somewhere else I'm supposed to select the device I'm working with?

Regards,

Yann

  • It is possible that when you created the project that the wrong device was selected, or that you copied a project that was using the TM4C123GH6PM. Right click on the project name in the "Project Explorer" screen and select "Show Build Settings....". In the "General" settings make sure the PZ device is selected in the drop down box shown below.

  • Hi Bob,

    Thank you for the answer, unfortunately the PZ is also selected here..

    Is there any other place left to change it maybe?

    Regards,
    Yann
  • The other place is here, but this should be generated by the choice from the pulldown menu on the "General" settings page:

    Could it be that "PART_TM4C123GHPM" is defined in some other file?

  • Finally, check here. This is what is actually passed to the compiler:

  • Hi Bob,

    Both settings are for the PZ version too. I supposed the only way is to start a new project ?

    Regards,
    Yann
  • Purely a "SWAG" - have you searched thru "pin_map.h" - and confirmed that your "PZ" device IS resident?
  • If you are curious, you can open the pin_map.h file used by your project with the "scalability" settings disabled to see which part CCS thinks is defined.

    Select 'Yes"

    Make sure parsing-based content assist is not disabled. Then check to see which part CCS thinks is defined.

  • As your post (appears) directed to me  (via "Reply to") I offer the following - note that under IAR  & a likely (bit older pin_map.h) - (where such "scalability" is not in evidence) our quick test "recognizes poster's "TM4C123GH6PZ"  and  "PZ" IS  (easily) selected."

    Poster's TM4C123GH6PZ  - w/in pin_map.h reveals quickly/easily  - and no "scalability" was required.

    //*****************************************************************************

    // TM4C123GH6PZ Port/Pin Mapping Definitions

    //*****************************************************************************

    #ifdef PART_TM4C123GH6PZ

    #define GPIO_PC4_U4RX                0x00021001

    #define GPIO_PC4_U1RX                0x00021002

    #define GPIO_PC4_M0PWM6         0x00021004

    #define GPIO_PH6_SSI2RX             0x00071802

    #define GPIO_PH6_M0PWM6         0x00071804

    #define GPIO_PH6_WT4CCP0        0x00071807

    And here is IAR's "quick/easy" recognition of  "poster's MCU."        It is "hoped" that vendor's system  - would be able to detect & select - its own device!

  • sdf

    Hi Bob and cb1,

    When I use "Open Declaration" upon a working pin, it sends me in the "pin_map.h" file within the PM zone. The PZ is under it in my file (same lines as Bob's example). But for the PH4_M0PWM4 it didn't even allow me to do so.

    Sorry cb1 I didn't really understand what you suggested to me.

    I've just discovered that the project was originally done on the eval board of the PM and now we use it with the PZ. Is there a known bug with changing device ?

    Regards,

    Yann

  • Hi CB1,
    Sorry, I did not mean to direct that post to you. I mistakenly just replied to the latest post. However, thank you for pointing out the difference in IAR tools.

    In CCS, if the file you open is larger than a configurable number of lines, it does not "grey out" those lines that are not included because of parser "#if" statements. My instructions were to enable the "grey out" feature for the very large file "pin_map.h"
  • Hi Yann,
    The only thing I can think of is that somewhere in one of your files "PART_TM4C123GE6PM" is defined. You might want to use the search tool and search through all of the files in your project for this string.

    In trying to help resolve your problem I created a project and repeatedly changed back and forth from using PART_TM4C123GE6PM to PART_TM4C123GE6PZ with no problems. Were you able to create a new project and get it to work as expected?
  • ***  LIKE  ***

    Bob Crosby said:
    You might want to use the search tool and search through all of the files in your project for  this (TM4C123GE6PM) string.

    Firm/I often employ this exact method - (not for failed MCU Selection) but for "hidden" code bits or variables.     I strongly believe that such method WILL identify - the unwanted but, "lingering presence" of that (past) Devil MCU!

    To poster Yann - my purpose was to note that such "MCU substitution" is, "EASILY & Quickly" accomplished by (other) than "free" tools!     Should not a "proper" IDE avoid the "time/effort" of such "Search?"    Should not an "effective IDE" manage that, "MCU change" (across all files) in one SINGLE, SIMPLE GO?

  • Hi Yann,
    Did you ever figure out what was wrong? Or did you start over and create a new project?
  • Hi Bob,

    Sorry I had a few days off.

    I looked everywhere using the search tool and didn't find any define with the wrong MCU.. So I started a new project in which I included only the .c and .h files and took care of the entire settings. It is working now.

    Thank you a lot for your time and your answers.

    Best Regards,
    Yann da Costa