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

    Lopy4 Guru meditation error

    Scheduled Pinned Locked Moved Issues & Bugs
    firmwarelopy4errorguru meditationguru error
    37 Posts 4 Posters 8.9k Views 4 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.
    • robert-hhR Offline
      robert-hh @bjsi9
      last edited by

      @bjsi9 main.py looks definitely uncritical. I'm a little bit thinking about boot.py, because setting REPL to UART0 is the default. I have to check this evening back home what I have on my devices. But you could try to comment that out. During safe boot you will still have access to the file system via ftp. I would not use Pymakr for that basic debug stuff. It has its own complications.

      B 1 Reply Last reply Reply Quote 1
      • B Offline
        bjsi9 @robert-hh
        last edited by

        @robert-hh Hi, the boot.py is the same code as on my SiPy. And that has no error.

        1 Reply Last reply Reply Quote 0
        • B Offline
          bjsi9
          last edited by bjsi9

          I just updated my Sipy (which have been working for half year). And now i have the exsact same problem with Guru error.
          (i dont know which firmware was on before the upgrade, i will try to find out)
          Update: its 1.15.0.b1

          robert-hhR 2 Replies Last reply Reply Quote 0
          • robert-hhR Offline
            robert-hh @bjsi9
            last edited by

            @bjsi9 Looking into the sources, this is the code in the embedded _boot.py, which is executed on any boot, even the safe boot:

            # _boot.py -- always run on boot-up, even during safe boot
            import os
            from machine import UART
            os.dupterm(UART(0, 115200))
            

            So this code is not required in boot.py, and you can drop it. Do the file copying with ftp. The youre sure about what you get.

            B 1 Reply Last reply Reply Quote 0
            • robert-hhR Offline
              robert-hh @bjsi9
              last edited by

              @bjsi9 Duplicating the dupterm code in boot.py does not hurt, at least in my test with a FiPy and a WiPy.

              1 Reply Last reply Reply Quote 0
              • B Offline
                bjsi9 @robert-hh
                last edited by bjsi9

                Hi @robert-hh , still no luck.

                The LoPy4 boots, and are ready for commands. But after some seconds it chrashes with the Guru error. Then it boots again, and chrashes again.. and so on.
                Very sad story for my 2 Sipy's and 2 LoPy4's. But i'm sure we will find a solution at some point. Any suggestions are welcome :)

                robert-hhR 1 Reply Last reply Reply Quote 0
                • B Offline
                  bjsi9
                  last edited by bjsi9

                  New update:
                  I dont care about my code anymore, i just want the LoPy4 to work as from factory.
                  I have tried with a new expansionboard, LoPy4 with erased filesystem and downgrading to 1.15.0.b1.
                  Still chrash chrash chrash every 2 seconds.
                  No luck after manually flash-reset, or FTP upload standard boot and main.

                  Safe boot dosent chrash.

                  1 Reply Last reply Reply Quote 0
                  • robert-hhR Offline
                    robert-hh @bjsi9
                    last edited by robert-hh

                    @bjsi9 That's strange. I have a Lopy here running since 5 weeks in a row as Lora nanogateway, and some Fipy's for testing, but they never crashed.

                    • When crashing, do your devices run code or are they just waiting in the REPL prompt?
                    • Do you always connect the devices in the same way - same expansion board, same cable, same USB port?
                    B 1 Reply Last reply Reply Quote 0
                    • B Offline
                      bjsi9 @robert-hh
                      last edited by bjsi9

                      @robert-hh Hi, yes its very strange. I have also some Sipy's for testing, never had any problems. But after upgrade they chrashes all the time, even when downgrading and flash-reset.

                      • The device starts up, and waits in the prompt with: >>>>
                        After som seconds, it chrashes.
                      • I have two expansionsboard, and tested with different USB ports also. Its the same cable i've used since i started working with pycom device the past year.

                      Remember: the safe boot works

                      robert-hhR 1 Reply Last reply Reply Quote 0
                      • robert-hhR Offline
                        robert-hh @bjsi9
                        last edited by

                        @bjsi9 Looking at the code, this is hard to understand:
                        With safeboot, only _boot.py is executed.
                        with normal boot, _boot.py, boot.py, _main.py and main.py are run (in that order). That is mostly th whole difference. This is the section in the file mptask.c, which I'm talking about (line 282 ff):

                            if (!safeboot) {
                                // run boot.py
                                int ret = pyexec_file("boot.py");
                                if (ret & PYEXEC_FORCED_EXIT) {
                                    goto soft_reset_exit;
                                }
                                if (!ret) {
                                    // flash the system led
                                    mperror_signal_error();
                                }
                            }
                        
                            if (!safeboot) {
                                // execute the frozen main first
                                pyexec_frozen_module("_main.py");
                        
                                // run the main script from the current directory.
                                if (pyexec_mode_kind == PYEXEC_MODE_FRIENDLY_REPL) {
                                    const char *main_py;
                                    if (MP_STATE_PORT(machine_config_main) == MP_OBJ_NULL) {
                                        main_py = "main.py";
                                    } else {
                                        main_py = mp_obj_str_get_str(MP_STATE_PORT(machine_config_main));
                                    }
                                    int ret = pyexec_file(main_py);
                                    if (ret & PYEXEC_FORCED_EXIT) {
                                        goto soft_reset_exit;
                                    }
                                    if (!ret) {
                                        // flash the system led
                                        mperror_signal_error();
                                    }
                                }
                            }
                        
                        B 1 Reply Last reply Reply Quote 0
                        • B Offline
                          bjsi9 @robert-hh
                          last edited by

                          @robert-hh Okay, maybe _boot.py or _main.py is corrupted? What could i do about that, any suggestions? Thanks

                          robert-hhR 1 Reply Last reply Reply Quote 0
                          • robert-hhR Offline
                            robert-hh @bjsi9
                            last edited by

                            @bjsi9 _boot.py should be OK, because that is executed always. _main.py is inside the frozen bytecode and comes as part of the firmware image. I have my doubts whether that is wrong.
                            Did you meanwhile try another (short) cable? Cables and especially connectors can wear.

                            B 2 Replies Last reply Reply Quote 0
                            • B Offline
                              bjsi9 @robert-hh
                              last edited by

                              @robert-hh Just tried another cable, no luck. Same chrashes, after erase file system and firmware update (done with the updater tool)
                              I know its a long shot, but i'm gonna try older version of the updater tool now.

                              1 Reply Last reply Reply Quote 0
                              • B Offline
                                bjsi9
                                last edited by

                                No luck using updater tool 1.13.1.b5

                                1 Reply Last reply Reply Quote 0
                                • B Offline
                                  bjsi9 @robert-hh
                                  last edited by

                                  @robert-hh Hi, quick question. sys, lib and cert folders are all empty when i view them in filezilla FTP (Show hidden files are on). Should these folders be empty?

                                  robert-hhR 1 Reply Last reply Reply Quote 0
                                  • robert-hhR Offline
                                    robert-hh @bjsi9
                                    last edited by

                                    @bjsi9 Yes. They can be empty and are empty on fresh installe devices. lib is used for storing python code of library style. It is also named in uos.path. But that is convention.

                                    1 Reply Last reply Reply Quote 0
                                    • B Offline
                                      bjsi9 @jmarcelino
                                      last edited by

                                      @jmarcelino I've sent my code to you. Do you think its possible that the code, compined with the firmware update, burned the circuit? :) I'm running out of ideas.

                                      1 Reply Last reply Reply Quote 0
                                      • B Offline
                                        bjsi9
                                        last edited by

                                        I just deleted the boot.py and main.py on one of my LoPy4's via the FTP. When i start the device same chrash every other second.

                                        robert-hhR J 2 Replies Last reply Reply Quote 0
                                        • robert-hhR Offline
                                          robert-hh @bjsi9
                                          last edited by

                                          @bjsi9 Can you try to erase the flash completely using esptool.py, subcommand erase_flash, and specifying the flash size. That will delete EVERYTHING including configuration and registration options. That will be restored with a pycom update, you can run afterwards.
                                          If you have the firmware creating environment set up, you can also run the command:
                                          make erase
                                          As always, you need to tie P2 to GND to activate the ROM bootloader.

                                          B M 2 Replies Last reply Reply Quote 0
                                          • B Offline
                                            bjsi9 @robert-hh
                                            last edited by

                                            @robert-hh I found the esptool.py on this link, and copied to a file on my desktop: https://github.com/pycom/pycom-micropython-sigfox/blob/master/esp32/tools/esptool.py

                                            I need som guidelines on how to proceed. I think this file goes to the lib folder, and i have to command it from the pymakr.
                                            If this is correct, what is the exact command to execute til esptool? Thank you

                                            robert-hhR 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
                                            • 2
                                            • 1 / 2
                                            • First post
                                              Last post

                                            Pycom on Twitter

                                            Pycom