Token not expected

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Token not expected

1,377 Views
Teckna
Contributor V

Hi everyone,

 

I'm not sure if this is the correct section where I have to show my problem: if so, please move the topic in the correct section.

 

I'm using MQX 4.1 and CW 10.2.
I'm trying to build the bsp_twrmcf52259 project, but no matter which file is compiling, I receive always the same error:
- Token 'equals' not expected

 

If I use the CW 10.6 (evaluation with eval period terminated) everything is ok.
Is there some incompatibility between MQX 4.1 and CW 10.2 or is there some settings to do?

 

Many thanks
Teckna

Labels (1)
0 Kudos
5 Replies

1,058 Views
pengfeihan
Contributor II

Hi Teckna Teckna.

This problem is caused by some fields of .cproject used by CW, which is unsupported  and can't be analysed by the legacy CW10.1/10.2 IDE. These fields as below:

"com.freescale.coldfire.toolchain.compiler.base.preprocessor.macroDefined" valueType="definedSymbols">
<listOptionValue builtIn="false" value="&quot;_EWL_C99=1&quot;"/>
<listOptionValue builtIn="false" value="&quot;_EMBEDDED_WARRIOR_CTYPE=0&quot;"/>
<listOptionValue builtIn="false" value="&quot;_EWL_FLOATING_POINT=1&quot;"/>
<listOptionValue builtIn="false" value="&quot;__CODEWARRIOR__=1&quot;"/>
<listOptionValue builtIn="false" value="&quot;_DEBUG=1&quot;"/>
</option>

Because they can't be correctly analysed, they will be provided directly as the compiler options. we can check these options in the args generated by CW. such as Freescale_MQX_4_2\mqx\build\cw10\bsp_twrmcf54418\Debug\Peripheral_IO_Drivers\adc\adc.args :

-sym full -msgstyle parseable -proc 54418 -c -nostdinc -nosyspath -enc ascii -i "C:/Freescale/Freescale_MQX_4_2/mqx/source/io/adc/mcf544xx" -i "C:/Freescale/Freescale_MQX_4_2/mqx/source/io/adc" -i "C:/Freescale/Freescale_MQX_4_2/config/twrmcf54418" -i "C:/Freescale/Freescale_MQX_4_2/mqx/source/io/enet/macnet" -i "C:/Freescale/Freescale_MQX_4_2/mqx/source/io/enet/phy" -i "C:/Freescale/Freescale_MQX_4_2/mqx/source/io/enet" -i "C:/Freescale/Freescale_MQX_4_2/mqx/source/io/esdhc" -i "C:/Freescale/Freescale_MQX_4_2/mqx/source/io/can/flexcan" -i "C:/Freescale/Freescale_MQX_4_2/mqx/source/io/gpio/mcf5441" -i "C:/Freescale/Freescale_MQX_4_2/mqx/source/io/gpio" -i "C:/Freescale/Freescale_MQX_4_2/mqx/source/io/i2c" -i "C:/Freescale/Freescale_MQX_4_2/mqx/source/io/i2c/polled" -i "C:/Freescale/Freescale_MQX_4_2/mqx/source/io/i2c/int" -i "C:/Freescale/Freescale_MQX_4_2/mqx/source/io/i2s" -i "C:/Freescale/Freescale_MQX_4_2/mqx/source/io/i2s/int" -i "C:/Freescale/Freescale_MQX_4_2/mqx/source/bsp/twrmcf54418" -i "C:/Freescale/Freescale_MQX_4_2/config/common" -i "C:/Freescale/Freescale_MQX_4_2/mqx/source/include" -i "C:/Freescale/Freescale_MQX_4_2/mqx/source/bsp/twrmcf54418" -i "C:/Freescale/Freescale_MQX_4_2/mqx/source/io/enet" -i "C:/Freescale/Freescale_MQX_4_2/mqx/source/io/int_ctrl" -i "C:/Freescale/Freescale_MQX_4_2/mqx/source/io/io_mem" -i "C:/Freescale/Freescale_MQX_4_2/mqx/source/io/io_null" -i "C:/Freescale/Freescale_MQX_4_2/mqx/source/io/pipe" -i "C:/Freescale/Freescale_MQX_4_2/mqx/source/io/lwgpio" -i "C:/Freescale/Freescale_MQX_4_2/mqx/source/io/nandflash/nfc" -i "C:/Freescale/Freescale_MQX_4_2/mqx/source/io/nandflash" -i "C:/Freescale/Freescale_MQX_4_2/mqx/source/io/pcb" -i "C:/Freescale/Freescale_MQX_4_2/mqx/source/io/pcb/mqxa" -i "C:/Freescale/Freescale_MQX_4_2/mqx/source/io/pccard" -i "C:/Freescale/Freescale_MQX_4_2/mqx/source/io/pcflash" -i "C:/Freescale/Freescale_MQX_4_2/mqx/source/io/rtc" -i "C:/Freescale/Freescale_MQX_4_2/mqx/source/io/sdcard/sdcard_spi" -i "C:/Freescale/Freescale_MQX_4_2/mqx/source/io/sdcard/sdcard_esdhc" -i "C:/Freescale/Freescale_MQX_4_2/mqx/source/io/sdcard" -i "C:/Freescale/Freescale_MQX_4_2/mqx/source/io/serial" -i "C:/Freescale/Freescale_MQX_4_2/mqx/source/io/spi" -i "C:/Freescale/Freescale_MQX_4_2/mqx/source/io/tfs" -i "C:/Freescale/Freescale_MQX_4_2/mqx/source/io/timer" -i "C:/Freescale/Freescale_MQX_4_2/mqx/source/io/usb" -i "C:/Freescale/Freescale_MQX_4_2/mqx/source/psp/coldfire" -i "C:/Freescale/Freescale_MQX_4_2/mqx/source/psp/coldfire" -i "C:/Freescale/Freescale_MQX_4_2/config/twrmcf54418" -i "C:/Freescale/Freescale_MQX_4_2/config/common" -i "C:/Freescale/Freescale_MQX_4_2/mqx/source/include" -i "C:/Freescale/Freescale_MQX_4_2/mqx/source/psp/coldfire" -i "C:/Freescale/Freescale_MQX_4_2/mqx/source/tad" -I- -I"$(MCUToolsBaseDirEnv)/ColdFire_Support/ewl/EWL_C/include" -I- -I"$(MCUToolsBaseDirEnv)/ColdFire_Support/ewl/EWL_C/include/sys" -I- -I"$(MCUToolsBaseDirEnv)/ColdFire_Support/ewl/EWL_Runtime/Runtime_ColdFire/Source" -warn illpragmas -warn unwanted -warn missingreturn -warn extracomma -warn emptydecl -opt space -inline on -align coldfire -model farCode -model farData -fp soft -a6 -nocoloring -noscheduling -nopeephole -sdata 0 -requireprotos -lang c99 -Cpp_Exceptions off -RTTI off -enum int -char unsigned -str nopool -str reuse -ipa off "_EWL_C99=1" "_EMBEDDED_WARRIOR_CTYPE=0" "_EWL_FLOATING_POINT=1" "__CODEWARRIOR__=1" "_DEBUG=1" 

we can see the macros at the end blocks of this file, which missed the "--define " or "-D" prefix, which could be added auto by recent CW version but not by the CW10.1/10.2. 

After we remove these fields from .cproject file, we can add the referring compiler options "-D_EWL_C99=1 -D_EMBEDDED_WARRIOR_CTYPE=0 -D_EWL_FLOATING_POINT=1 -D__CODEWARRIOR__=1 -D_DEBUG=1" as "Other flags" in "ColdFire Compiler" > "Language Settings" > "Other Flags" .

 

I Hope it will Help. Good Luck!

1,058 Views
Teckna
Contributor V

Just another question: is there someone that knows where I can find the 'equals' token? I searched in source and project files but with no result.

Many thanks

Teckna

0 Kudos

1,058 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Techka:

What is the complete error you receive?

From the info I found, this was a bug with CW v10.2 and was corrected in latest versions.


Regards!,
Jorge Gonzalez

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

1,058 Views
Teckna
Contributor V

Hi, Jorge,

From the console view, the full message is the following:

../MCU/ColdFire_Tools/Command_Line_Tools/mwccmcf|Usage|Error
>Token 'equals' not expected

Errors caused tool to abort.

Many thanks

Teckna

0 Kudos

1,058 Views
Carlos_Musich
NXP Employee
NXP Employee

Hi Teckna,

CW10.1 does not support MQX4.1 by default, you may need to make adjustments such as source files paths, libraries paths, Windows environment variables and many other settings that the New MQX project wizard makes by default. I strongly recommend to use CW10.6.

Best regards,

Carlos