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.

bmc_tool.py is failing for updating UCD images on EVMK2X

Guru* 84110 points

My primary problem is that my EVM quit working. I was able to do DSP stuff over JTAG/CCS for quite a while and then started trying to do the same on A15 stuff, simple RTS-only HelloWorld, but had problems.

I found that my BMC was reporting SOC_POWER_GOOD timeout error, so I updated my BMC to 1.0.2.5 (was 1.0.1.3a), and it still fails. That led me to look to the UCD updates using bmc_tool.py which I downloaded, along with the serial tool both from here .

But when I try to run the bmc_tool.py from python27, I get errors:

python said:

C:\Python27>python bmc_tool.py
Traceback (most recent call last):
  File "bmc_tool.py", line 48, in <module>
    from Tkinter import *
  File "C:\Python27\lib\lib-tk\Tkinter.py", line 38, in <module>
    import FixTk
  File "C:\Python27\lib\lib-tk\FixTk.py", line 68, in <module>
    import _tkinter
ImportError: DLL load failed: %1 is not a valid Win32 application.

I have C:\Python27 in my path. The Python that I installed is 2.7.11 which was the latest on the 2.7 level. Could that be a problem where the instructions said to install "2.7.5 (NOT version 3.3)"?

Any advice will be appreciated!

Regards,
RandyP

  • Hi Randy,

    We never received such issues from customer. What is the revision of your EVM?

    Please select the appropriate EVM revision before downloading the BMC or Power Management Configuration files from "Software & Firmware".

    You may be correct on python version as well. 

    Thank you.

  • Raja,

    My EVM is version 1.0.0.1 from the BMC log, 1.0 on the sticker on the board. The BMC rev file is the one I used, 1.0.2.5, for rev 1.0, 2.0, and 3.0. I see that rev 4.0 uses 1.0.2.6, but that does not apply. It does look like I have the right BMC version.

    I will try backing my Python release to 2.7.5 and reply back later today.

    Regards,
    RandyP
  • Randy,

    I am using Python 2.7.10. I don't think 2.7.11 is the issue. I suspect the issue may be 32/64 bit related. Did you download the correct bit-length python package matching your PC bus width? The error says "not a valid Win32 application". It seems to me that you are running 64-bit python on 32-bit machine.

    Rex

  • @Rex,

    Would the error messages be the same if it were the other way around? I am definitely running on a 64-bit laptop.

    Thanks for the comment on the 2.7.10/11. That will save me one path of testing.

    For the 32 vs 64-bit versions, are you talking about Python itself or the serial package, or both?

    @Titus,

    I will look through the links you sent in detail. They look useful and on point. I will let you know my result.

    Regards,
    RandyP
  • When I went to uninstall Python, it says it is "Python 2.7.11 (64-bit)", but there was no such mention for the Serial tool. I uninstalled it and will try to find a 64-bit version of it.

    Randy
  • Randy,
    I looked at my py_serial and it seems to be py_serial_2.7 32 bit because I see pyserial-2.7.win32.exe installer in my download folder, but I can't find python installer. pyserial 32bit seems to be correct.
    Rex
  • Rex,

    Mine is pyserial-3.0.1.win32.exe, so maybe I have a mismatch between that and my python version?

    At the link provided to get pyserial, 3.0.1 is the only one available: pypi.python.org/.../pyserial .

    Would you recommend I move to Python 3.x to get pyserial to work, or are there other issues for which I need to be using Python 2.7 and therefore pyserial 2.6?

    Regards,
    Randy
  • Randy,

    Try pyserial-2.7 first with Python 2.7. Pyserial 2.7 download site says pyserial-2.7 is for python 2.4..2.7. That will at least make your environment same as mine. I can't remember why I didn't go with pyserial 2.6 at the time.

    Rex
  • Rex,

    Today was my first chance to get back to this. The UCD tool is operating so there are no problems today with pyserial. Here are the steps I took to make sure I have the same environment as you:

    1. Uninstalled pyserial and python from Windows 7 Programs and Features.

    2. Deleted the C:\Python27 folder.

    3. Rebooted my laptop.

    4. Installed python-2.7.11.amd64.msi.

    5. Installed pyserial-2.7.win32.exe from pypi.python.org/.../2.7 .

    6. Added python path this .py file from the command-line: c:\python27\tools\scripts\win_add2path.py [I found this and other suggestions here, fyi]

    7. Rebooted my laptop. [just wanted to make sure everything was clean]

    8. Was then able to follow the update instructions from the pdf supplied by Advantech, based from the link above from Raja as the EVM files starting place.

    Thank you for your help!


    [Quick update: following these steps to update the BMC version and UCD Power Management Modules from the EVM UG here, now I am able to get a good boot of my EVM instead of the POC Power Failure message. Thanks Rex, Raja, Titus for your help!]

    Regards,
    RandyP

  • Hi Randy,

    Thank you for the information.