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_SET does not create valid token

Other Parts Discussed in Thread: HALCOGEN, TMS570LS1227

Description Resource Path Location Type
#1934-D concatenation with "=" in macro "PINMUX_SET" does not create a valid token pinmux.c /MPPT/source line 169 C/C++ Problem

Description Resource Path Location Type
#1934-D concatenation with "&" in macro "PINMUX_SET" does not create a valid token pinmux.c /MPPT/source line 173 C/C++ Problem

I'm using the TMS570LS1227 and i've been getting the above 2 errors with code generated by HalCoGen.  I did not have these problems with the TMS570LS04.

Attached is my halgoen files.  I haven't used any pinmux functions in my main code.  Anyone else have this issue? 

 http://e2e.ti.com/cfs-file.ashx/__key/communityserver-discussions-components-files/312/3617.MPPT.7z

  • Dustin,

    I've opened a ticket on this issue before w. the HalCoGen team so I suspect it may just be taking some time to make it's way into a release.  Prathap might be able to confirm.

    I checked my install of HalCoGen 3.06.00 and I still see the issue in the template file under the 1227 for example:

    #define PINMUX_SET(REG, BALLID, MUX)        \
        pinMuxReg->PINMMR##REG## = (pinMuxReg->PINMMR##REG## & PINMUX_BALL_##BALLID##_MASK) | (PINMUX_BALL_##BALLID##_##MUX)

    In your source code you can delete the ## highlighted in RED above as these are the culprits I think.  You don't want to be concatenating the "REG" and the = sign for example.  That's something you can do as a workaround until the issue is fixed in a release.

    Sorry about the trouble. 

  • That fixes it.  0 warnings now.  Thanks for the quick response.  

  • Bug is still present in the latest HalCoGen (v04.03.00)