Navigation

    Welcome to the Pycom forum

    Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. Tags
    3. boot.py
    Log in to post

    • N

      Advice on script organization.
      Discussion • boot.py main scripts • • nhungthientai  

      2
      0
      Votes
      2
      Posts
      284
      Views

      P

      Branches + Source Control Git helps a ton. but even an older source control system like SVN would be better than nothing. http://rogerdudler.github.io/git-guide/
    • T

      Software saveboot using P14 on Pytrack/Pysense
      Projects • pytrack pysense boot.py hangs safeboot • • tvetter1976  

      1
      2
      Votes
      1
      Posts
      363
      Views

      No one has replied

    • N

      Problems with the files names "boot" and "main" and rebooting device
      FiPy • fipy pymakr boot.py main.py reboot problem • • nervencid  

      3
      0
      Votes
      3
      Posts
      373
      Views

      robert-hh

      @nervencid You can use any name for your scripts. Only boot.py and main.py are executed as part of the boot process. If you want to run your script then, you have to add a statement like: import myscript e.g. to main.py. You should be able to stop your script with Ctr-C from the console, unless you disable that in your code. To isolate the problems, try running your code with a simple terminal like Putty. Note: You can change the name of the file which is run instead of main.py with machine.main(). The only useful place for that command is in boot.py.
    • D

      Calling function files and order of loading
      Discussion • boot.py • • DarylDixon  

      3
      0
      Votes
      3
      Posts
      337
      Views

      J

      Thank you robert-hh for the response. It's useful. I was not knowing about this as i run netflix on chrome as i got FreeAccountsOnline.
    • K

      boot.py reliability
      GPy • gpy deepsleep boot.py • • kjm  

      30
      0
      Votes
      30
      Posts
      3871
      Views

      A

      @robert-hh Thanks for the reply! So basically an unstable power supply can lead to flash errors. Good to know. (And you had it, I was using a Li-Ion 3.6V battery. I'll make sure to mention that next time)
    • A

      Advice on script organization
      Discussion • boot.py main scripts • • alexpul  

      2
      0
      Votes
      2
      Posts
      414
      Views

      robert-hh

      @alexpul What I do a) I do not change boot.py a lot. I have only command related to the general operating mode in there, like USB REPL enabled or WiFi access, although the latter may vary b) I do not code for specific things in main.py. Instead if put that into files with appropriate names and import them in main.py. If one application consists of several files, I put them in a subdirectory and either uos.chdir() into that, or alin sys.path to include that subdirectory, such that import can find the files.
    • Thosch42

      L01 does not run boot.py or main.py
      LoPy • boot.py l01 main.py • • Thosch42  

      2
      0
      Votes
      2
      Posts
      502
      Views

      Thosch42

      It's fixed!! See post Problems getting L01 into bootloader mode. Cheers, Thomas
    • J

      Frustrating Board - Cannot get started
      WiPy 2&3 • wipy 3.0 boot.py startup • • jimmie  

      8
      0
      Votes
      8
      Posts
      999
      Views

      C

      @jimmie glad that copy and paste is your biggest problem :)
    • E

      W01 (2.0 equivalent) not executing boot.py and main.py
      WiPy 2&3 • boot.py main.py w01 • • Euphorbia  

      8
      0
      Votes
      8
      Posts
      1249
      Views

      A

      @dan Updating the firmware fixed the problem! Both main.py and boot.py run on restart. Thank you :)
    • J

      Wipy 3 issues
      WiPy 2&3 • boot.py heartbeat • • jmpratt  

      4
      0
      Votes
      4
      Posts
      729
      Views

      robert-hh

      @jmpratt Since there is no configuration data on a WiPy that could get lost, you could try to make a complete erase using esptool.py and then reload the firmware.
    • P

      Can you run a python script without a USB connection (just power)?
      Discussion • pycom wipy2.0 boot.py bootloader • • panos29  

      2
      0
      Votes
      2
      Posts
      767
      Views

      robert-hh

      @panos29 Both boot.py and main.py are executed at power on and reset, and give you the starting point. So you can put your code into main.py, or in a different file, which you import from main.py (which is what I prefer), or, or, or....
    • A

      WiPy 3.0 getting started issues
      WiPy 2&3 • pymakr wipy 3.0 serial boot.py • • Artiom  

      11
      0
      Votes
      11
      Posts
      2797
      Views

      A

      Thank you. Everything works now. I hope that pymakr will be fixed as well.
    • T

      boot.py versus main.py
      Getting Started • deep sleep reset boot.py main.py • • tshead  

      11
      0
      Votes
      11
      Posts
      3387
      Views

      M

      @reidfo I use the boot.py to mount the SD card just once. When I mounted the SD card in the main.py I encountered OSError when re-running my code in the REPL (OSError: the requested operation is not possible) due to the fact that I cannot check the status of the SD card.
    • A

      Import of variables from boot.py
      MicroPython • boot.py • • alidaf  

      9
      0
      Votes
      9
      Posts
      2288
      Views

      robert-hh

      @PeterB I'm not using the pymakr plug-in, but form the discussion i recall, that there is an option to run safe boot before upload. Safe boot bypasses boot.py and main.py. In that case the objects defined in boot.py to not exist.
    • M

      Cant access main.py and boot.py in Lopy
      LoPy • lopy boot.py main.py • • monersss  

      1
      0
      Votes
      1
      Posts
      889
      Views

      No one has replied

    • M

      WiFi question
      WiPy 2&3 • wipy wifi boot.py • • mike632t  

      3
      0
      Votes
      3
      Posts
      1160
      Views

      M

      As you need to connect using wireless to modify 'boot.py' in the first place this makes disabling the wireless interface by default an 'interesting' challenge to a new user! Hopefully the wireless, bluetooth, etc are only started (if not already active) after 'boot.py' is executed.
    • G

      lopy not running main.py
      LoPy • lopy boot.py repl • • gouao  

      19
      0
      Votes
      19
      Posts
      6959
      Views

      李

      @gouao Have you deleted the first line? The first line cannot be deleted. # main.py -- put your code here!
    • M

      LoPy doesn't boot from sd card
      LoPy • lopy sdcard boot.py • • mmarkvoort  

      6
      0
      Votes
      6
      Posts
      2597
      Views

      M

      @jmarcelino Thanks for the clear explanation. I asked again because i read somewhere that it was possible, but i can't find that page anymore. But maybe that was the original pyboard too. Well, then I will continue without :)
    • R

      sipy connect error (solved)
      MicroPython • sipy error boot.py filesystem safe mode • • Ricardo M  

      2
      0
      Votes
      2
      Posts
      1056
      Views

      R

      @Ricardo-M I boot my sipy in safe mode and i connect pc and sipy by telnet (using Putty) and i carry out a factory reset to the filesystem (reset flash filesystem) and now my sipy is like new
    • 1 / 1