Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    Can't conncect LoPy4+Espansionboard V2.1A to Pymakr

    Scheduled Pinned Locked Moved Support & Troubleshooting
    12 Posts 2 Posters 88 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • N Offline
      Nikola Semov
      last edited by

      Hello,
      I'm trying to execute code on the board.

      Setup:
      For IDE I'm using VS Code (As I couldn't get Pymakr working with Atom. Some version problems...).
      The device is connected to my Windows 10 PC via a USB cable.
      The firmware that I've uploaded is Legacy 1.20.0.rc13 (I use legacy because I don't want to connect it to pybytes. ).
      bf73712a-bb37-414e-be20-165473e279ed-image.png

      Issue:
      This is the responce that I get:
      0a8caa62-8e75-4d55-a609-92e8369971d3-image.png

      rst:0x1 (POWERON_RESET),boot:0x12 (SPI_FAST_FLASH_BOOT)
      configsip: 0, SPIWP:0xee
      clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00  
      mode:DIO, clock div:1
      load:0x3fff8028,len:8
      load:0x3fff8030,len:2156
      ho 0 tail 12 room 4
      load:0x4009fa00,len:19208
      entry 0x400a05f4
      GC pool malloc failed!
      

      This is the first time I'm trying to use the board. I've flashed the firmware several times (even tried with other firmware options).
      It may be something that I've missed (I won't be surprised if this is the case :D ).

      Best regards,
      Nikola Semov

      1 Reply Last reply Reply Quote 0
      • G Offline
        Gijs
        last edited by

        Hi,
        I suggest you still use the latest firmware (1.20.2.r4) and use import pycom; pycom.pybytes_on_boot(False). That way, you can still use the latest stable firmware, and not connect to Pybytes. In the time between 1.20.0.rc13 and 1.20.2.r4 there are a lot of bugfixes and other updates that might prevent this issue, and we're not going back in time to revise older firmwares.
        Let me know if your issue persists in the latest stable version

        N 1 Reply Last reply Reply Quote 0
        • N Offline
          Nikola Semov @Gijs
          last edited by Nikola Semov

          Hello @Gijs,
          Thanks for your reply!
          I've updated to the latest firmware version (1.20.2.r4), but the issue remains the same.
          Also, when I try to upload code on the board via VScode and this is the response that I get:

          Uploading project (main folder)...
          Safe booting device... (see settings for more info)
          Safe boot failed, uploading anyway.
          Uploading to /flash...
          Upload failed.: timeout Please reboot your device manually.
          

          Best regards,
          Nikola Semov

          1 Reply Last reply Reply Quote 0
          • G Offline
            Gijs
            last edited by

            Have you tried what is mentioned in the error message? Have a look this page on how to safeboot the device: https://docs.pycom.io/gettingstarted/programming/safeboot/

            N 1 Reply Last reply Reply Quote 0
            • N Offline
              Nikola Semov @Gijs
              last edited by Nikola Semov

              @Gijs
              Done. I still can not use REPL or upload code to the board. The problem remains.
              I connect p12 to 3v3 and press the reset button. The LED starts blinking as expected and I disconnect the two pins(i suppose this is the way to stay in the "slow flashing safe boot mode"), then the LED stops blinking. I've also tried with the "fast flashing safe boot mode", but the problem remains the same.

              1 Reply Last reply Reply Quote 0
              • G Offline
                Gijs
                last edited by

                GC pool malloc failed!

                Concerning this error. Are you sure you're using a Lopy4 (and not an older Lopy) and/or do you have large files loaded on your device? The device is trying to load 2.5M in the garbage collect pool, but it fails to allocate the memory and halt the boot operation. This will also cause the other error, as the safeboot functionality is only enabled after that.

                Concerning the safeboot error, this might also be an issue with Pymakr on VSCode. Have you tried reloading VSCode / the pymakr plugin, or using Pymakr on Atom? Also, Im not sure what code you're running (when it is running), but if the device is for example in sleep mode, it will give a similar error.

                N 1 Reply Last reply Reply Quote 0
                • N Offline
                  Nikola Semov @Gijs
                  last edited by

                  Yes, I'm still using the same hardware setup described in my first post(I'm still using LoPy4.).
                  I'm sure that I do not have any large files loaded on the board as I used "pycom-fwtool-cli -p <PORT> erase_all", because I had a constantly rebooting loop error (I found the command on the forum on this topic.). I guess this command should have erased and formatted the whole flash memory.

                  As for the IDE, I've tried to both reload and reinstall VSCode and the poymakr plugin several times. Also, I've managed to get pymakr working on Atom, and the problem is the same there.
                  I'm not sure if any code is running since I've erased the flash memory and then uploaded the newest firmware, so I guess the only thing running on the device should be the firmware.

                  Is it possible that to be a hardware problem with the memory / faulty unit? If so, is there a way to check that?

                  1 Reply Last reply Reply Quote 0
                  • G Offline
                    Gijs
                    last edited by

                    I indeed believe there might be some issue with the PSRAM chip (external ram chip), and in the meantime I looked for the most convenient way to check the issue and found the following. I compiled a custom firmware that should inform us about the ram size right after boot, but before allocating the GC pool. It will give a message like this:

                    entry 0x40080624
                    ESP chip revision: 1
                    SPI ram: 4194304/0x400000 B, 4096 KiB, 4 MiB
                    ---------------------------------------------
                    

                    I attached the .tar.gz file here. You can use the normal firmware updater tool and check 'flash from file' to load this file.

                    Let me know what you get!

                    Gijs

                    N 2 Replies Last reply Reply Quote 1
                    • N Offline
                      Nikola Semov @Gijs
                      last edited by

                      What I see in the terminal of the Pymakr is that the device goes into loop and this is the content of the loop:

                      Connecting to COM31...
                      ets Jun  8 2016 00:22:57
                      
                      rst:0x1 (POWERON_RESET),boot:0x12 (SPI_FAST_FLASH_BOOT)
                      configsip: 0, SPIWP:0xee
                      clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
                      mode:DIO, clock div:1
                      load:0x3fff0040,len:8
                      load:0x3fff0048,len:1716
                      load:0x40078000,len:12336
                      ho 0 tail 12 room 4
                      load:0x40080400,len:5248
                      entry 0x40080624
                      abort() was called at PC 0x40081529 on core 0
                      
                      ELF file SHA256: 0000000000000000
                      
                      Backtrace: 0x40091e8b:0x3ffe3c30 0x400921bd:0x3ffe3c50 0x40081529:0x3ffe3c70 0x40079269:0x3ffe3c90 |<-CORRUPTED
                      
                      Re-enable cpu cache.
                      
                      ELF file SHA256: 0000000000000000
                      
                      Backtrace: 0x40096498:0x3ffe39f0 0x40095a10:0x3ffe3a10 0x400d6b99:0x3ffe3a40 0x400d6a0c:0x3ffe3a70 0x400d6331:0x3ffe3ac0 0x400d656c:0x3ffe3ae0 0x40092145:0x3ffe3b30 0x400923d6:0x3ffe3b50 0x4008307e:0x3ffe3b70 0x40091e8b:0x3ffe3c30 0x400921bd:0x3ffe3c50 0x40081529:0x3ffe3c70 0x40079269:0x3ffe3c90 |<-CORRUPTED
                      
                      Re-enable cpu cache.
                      Re-entered core dump! Exception happened during core dump!
                      Rebooting...
                      

                      I even reflashed it twice to see if something change but the response is the same.
                      Thanks for your help!

                      1 Reply Last reply Reply Quote 0
                      • N Offline
                        Nikola Semov @Gijs
                        last edited by

                        Hello @Gijs,
                        Any updates on the issue?

                        1 Reply Last reply Reply Quote 0
                        • G Offline
                          Gijs
                          last edited by

                          I will check for you tomorrow :)

                          1 Reply Last reply Reply Quote 0
                          • G Offline
                            Gijs
                            last edited by

                            Hi,
                            Thanks for your patience.
                            The issue is indeed with the PSRam. I cannot tell you exactly, but the coredump also pointed me to a similar section, explaining the external ram could not be initialized. Can you contact me at support@pycom.io and we will handle it from there!

                            1 Reply Last reply Reply Quote 0

                            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                            With your input, this post could be even better 💗

                            Register Login
                            • 1 / 1
                            • First post
                              Last post

                            Pycom on Twitter

                            Pycom