Announcement

Collapse
No announcement yet.

Problem uploading to gen4-IoD-32T

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem uploading to gen4-IoD-32T

    New to these displays and tools, but have a little experience with Arduino.
    Intention is to use 4D Workshop, but presently just trying to get an example program to load directly from the Arduino IDE.
    Platform is Windows XP SP3, Arduino IDE 1.8.9 (portable) and I've tried Python 2.7.18 & 3.4.4, which all look to be XP-compatible.
    Can now compile the GFX4d IoDTemplate sketch successfully, but it fails to download. The error is:

    pyserial or esptools directories not found next to this upload.py tool.

    Have tried various solutions found on the Arduino and esp8266 forums, to no avail. Both directories are present and I've tried placing the esptool 3.0 and pyserial 3.4 files there manually. I also tried copying the esptool files into the same directory as upload.py, with the same result. I've also tried editing upload.py to do the following:
    1. Report sys.path[0] and sys.path[1]. Both look OK.
    2. Omitting (commenting out) the except: section. Syntax error then reported on the next line (cmdline = []).
    My impression is that the import esptool line is failing for some reason other than the directories not being present. Not having enough experience with these tools or Python, I don't know what to do to resolve this. Hopefully someone out there can suggest something to edit, replace or move to get past this hurdle. Thanks in advance.

    Here's the message report I'm seeing:

    Arduino: 1.8.9 (Windows XP), Board: "4D Systems gen4 IoD Range, 80 MHz, Flash, Legacy (new can return nullptr), All SSL ciphers (most compatible), DOUT (compatible), 2MB (FS:64KB OTA:~992KB), v2 Lower Memory, Disabled, None, Only Sketch, 115200"

    Executable segment sizes:


    BSS : 36408 ) - zeroed variables (global, static) in RAM/HEAP


    IRAM : 27376 / 32768 - code in IRAM (ICACHE_RAM_ATTR, ISRs...)


    RODATA : 2792 ) / 81920 - constants (global, static) in RAM/HEAP


    DATA : 1320 ) - initialized variables (global, static) in RAM/HEAP


    IROM : 265812 - code in flash (default or ICACHE_FLASH_ATTR)


    Sketch uses 297300 bytes (28%) of program storage space. Maximum is 1044464 bytes.
    Global variables use 40520 bytes (49%) of dynamic memory, leaving 41400 bytes for local variables. Maximum is 81920 bytes.
    C:\Arduino-1.8.9\portable\packages\esp8266\tools\python3\3.7.2-post1/python3 C:\Arduino-1.8.9\portable\packages\esp8266\hardware\esp8266\2.7.4/tools/upload.py --chip esp8266 --port COM15 --baud 115200 --before default_reset --after hard_reset write_flash 0x0 C:\DOCUME~1\COLINC~1\LOCALS~1\Temp\arduino_build_791887/IoDTemplate.ino.bin
    C:/Arduino-1.8.9/portable/packages/esp8266/hardware/esp8266/2.7.4/tools
    C:/Arduino-1.8.9/portable/packages/esp8266/hardware/esp8266/2.7.4/tools/esptool
    C:/Arduino-1.8.9/portable/packages/esp8266/hardware/esp8266/2.7.4/tools/pyserial
    pyserial or esptool directories not found next to this upload.py tool.
    An error occurred while uploading the sketch

    This report would have more information with
    "Show verbose output during compilation"
    option enabled in File -> Preferences.


  • #2
    Further to my last post, I realised the except: section is probably required syntax, so instead I tried just commenting out the sys.exit(1) statement. The last part of the message report is now:

    C:\Arduino-1.8.9\portable\packages\esp8266\tools\python3\3.7.2-post1/python3 C:\Arduino-1.8.9\portable\packages\esp8266\hardware\esp8266\2.7.4/tools/upload.py --chip esp8266 --port COM15 --baud 115200 --before default_reset --after hard_reset write_flash 0x0 C:\DOCUME~1\COLINC~1\LOCALS~1\Temp\arduino_build_573580/IoDTemplate.ino.bin
    C:/Arduino-1.8.9/portable/packages/esp8266/hardware/esp8266/2.7.4/tools
    C:/Arduino-1.8.9/portable/packages/esp8266/hardware/esp8266/2.7.4/tools/esptool
    C:/Arduino-1.8.9/portable/packages/esp8266/hardware/esp8266/2.7.4/tools/pyserial
    pyserial or esptool directories not found next to this upload.py tool.
    Traceback (most recent call last):
    File "C:\Arduino-1.8.9\portable\packages\esp8266\hardware\esp8266\2.7.4/tools/upload.py", line 71, in <module>
    esptool.main(cmdline)
    NameError: name 'esptool' is not defined
    NameError: name 'esptool' is not defined


    So it looks like esptool is not recognised, which I guess is consistent with the import failing. I'm really not sure what to try next.

    Comment


    • #3
      Hi Colin,

      Welcome to the forum,

      Usually, for the IoD the upload.py tool is located here,
      C:\Users\paulc\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.4\tools
      as the ESP8266 core is usually installed to here
      C:\Users\paulc\AppData\Local\Arduino15\packages\esp8266\

      It may be worth trying copying the entire ESP8266 core to the above location to see if it makes a difference while I investigate it further.

      Best regards

      Paul


      Comment


      • #4
        Hi Paul,

        Thanks for your reply.

        I started with the regular Arduino installation and C:\Users\...\Arduino15\packages... etc., but it didn't work there. I tried putting the XP-compatible Python there and copying the esptools and pyserial directories there as others suggested, but it didn't work. In the end, I found some posts that suggested a portable installation might be more reliable (the paths are a bit shorter), but I see exactly the same problem whichever location I use.

        I'm completely stuck with it at the moment.

        Kind regards,

        Colin

        Comment


        • #5
          Hi Colin,

          Ahh ok, I will investigate it further and update you as soon as possible. I may have an XP PC here that I could try it on.

          Best regards

          Paul

          Comment


          • #6
            Hi Colin,

            Just wondering if you had any success when using XP, my XP PC had too many failures that I was unable to fix to try it.

            Best regards

            Paul

            Comment

            Working...
            X