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.

PinMux utility code produces multiple errors for with TM4C123GH6PM

Hello

I am using the Tiva-C PinMUx utility to generate code. When compiling, a list of 90 errors is generated, all in the c file created by the PinMux utility. Every error is of the form "#20 identifier "uint8_t is undefined". The errors are also concentrated in a section of the file where these identifiers are not referenced. Note that stdint.h and stdbool.h are included in the main.c file. I am using CCS v5.4 my target is the Tiva Launchpad using the Stellaris In-circuit Debug Interface.

 

Thank  you

 

Dale

 

  • Using the Tiva C Series PinMux v1.0.2, which is the current version from http://www.ti.com/tool/tm4c_pinmux, the pun_mux.c source file generated by the Tiva C Series PinMux compiled when used with StellarisWare.

    However, the generated pin_mux.c failed to compiled with TivaWare 1.1 due to:

    1) No definition for types bool, uint8_t and uint32_t. To fix these errors had to manually the following includes to the generated pin_mux.c:

    #include <stdbool.h>
    #include <stdint.h>
    

    2) No definition for GPIO_LOCK_KEY_DD. [My example PinMux configuration used pin PF0 for SSI1 RX so code was generate by the Tiva C Series PinMux to "unlock" PF0 from its default NMI operation].

    The StellarisWare hw_gpio.h has the two definitions for the GPIO_CR register unlock key, depending upon the device class:

    #define GPIO_LOCK_KEY           0x1ACCE551  // Unlocks the GPIO_CR register
    #define GPIO_LOCK_KEY_DD        0x4C4F434B  // Unlocks the GPIO_CR register on
                                                // DustDevil-class devices and
                                                // later
    

    Whereas the TivaWare hw_gpio.h has only:

    #define GPIO_LOCK_KEY           0x4C4F434B  // Unlocks the GPIO_CR register
    

    Therefore, to fix the error when using TivaWare had to manually change the generated pin_mux.c to use GPIO_LOCK_KEY instead of GPIO_LOCK_KEY_DD

    In conclusion, Tiva C Series PinMux doesn't seem to have been updated to generate a .c file which is compatible with TivaWare. You can manually edit the generated .c file to fix the compile errors, but the manual edits will be lost each time the .c file is re-generated with the Tiva C Series PinMux.

    Guess that TI need to change the Tiva C Series PinMux to generate a .c source file which is compatible with TivaWare.

  • Thanks Chester

     

    I added the includes and changed GPIO_LOCK_KEY and it worked.

    Dale

  • Thanks for bringing this to our attention. We will get these bugs squashed in the next release.

  • All,

    The PinMux tool has been updated and now supports the TM4C129x devices.

    The new release also addresses the bugs found in this thread.

    http://www.ti.com/tool/tm4c_pinmux