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.

maptool.py: invalid syntax line 82

I want to use MAD to run a multicore build where different cores run different executables.  I try running the maptool.py utility in

c:\Program Files\Texas Instruments\mcsdk_2_00_01_12\tools\boot_loader\mad-utils\map-tool

as per the instructions in

http://processors.wiki.ti.com/index.php/MAD_Utils_User_Guide#MAP_tool_configuration

However I get syntax errors like:

c:\Program Files\Texas Instruments\mcsdk_2_00_01_12\tools\boot_loader\mad-utils\map-tool>maptool.py config-files\maptoolCfg_C6678_windows.json
  File "C:\Program Files\Texas Instruments\mcsdk_2_00_01_12\tools\boot_loader\mad-utils\map-tool\maptool.py", line 82
    except OSError, e:
                  ^
SyntaxError: invalid syntax

And after trying to fix (remove) the offending code I get more syntax errors.

Is there a certain version of Python I should use for this?  Or what is the issue?

  • Well, which version of python are you using? I tried on Python 2.7.1, and I didn't get anything suspicious.

    Are you invoking the Python executable as stated in the wiki? In other words, are you doing:

    python maptool.py  <maptoolCfg.json>

    with "python[.exe or whatever Windows does]" as one of the arguments?

     

    A syntax error right there is quite odd.. perhaps something like a preprocessor is messing with the identifier.

  • The Windows directions from TI left off putting "python.exe" in front so I had tried it both ways to the same results.

    I downloaded the latest Python which is 3.2.2.  I guess I'll try to downgrade.

    c:\Program Files\Texas Instruments\mcsdk_2_00_01_12\tools\boot_loader\mad-utils\map-tool>c:\Python32\python.exe
    Python 3.2.2 (default, Sep  4 2011, 09:51:08) [MSC v.1500 32 bit (Intel)] on win32
    Type "help", "copyright", "credits" or "license" for more information.
    >>>

  • It worked better with 2.7.2 so I guess they just haven't tested with 3.x.

  • Actually, now that I remember, Python 3.2 is actually quite different from 2.7 (but both versions are actively developed) -- some sort of internal philosophical conflict that caused the project to fork itself just working off of two version numbers.

    So that'd just be a lacking of documentation that the maptool doesn't work with the other branch (3.2)

  • You are right, maptool only works with python version 2.7.2. The BIOS MCSDK product download page lists the python version (2.7.2)  to be used in the dependencies table. http://software-dl.ti.com/sdoemb/sdoemb_public_sw/bios_mcsdk/latest/index_FDS.html

    Best regards

    Sandeep