• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

ESP32 wont boot from code saved on device

Q&A Forum › Category: ESP32 › ESP32 wont boot from code saved on device
0 Vote Up Vote Down
Steve asked 4 years ago

Running Thonny 3.3.5 on Pi4
ESP – 30 pin version with CP2102 USB to UART.
FW – esp32-idf4-20200902-v1.13.bin – other versions tried.
Code runs OK from editor when open in editor.
BUT
Uploaded code to ESP32 does not boot. ie when pressing boot button.

I am sure I am missing something! BUT what?
Thanks
Steve

Question Tags: #booting #ESP32
5 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 4 years ago

Hi Steve.
Are you sure that you’ve uploaded the code? There is an option in the IDE to run the code. That’s probably what you did (run is different than upload).
Can you describe the process you did to upload codE?
Regards,
Sara

0 Vote Up Vote Down
Steve answered 4 years ago

Hi Sara
Thanks for responding.
Having got as far as Module 6 in
MicroPython_Programming_with_ESP32_and_ESP8266_V1_2.pdf using an ESP8266
I am taking a second run through the book (or at least trying to) using an ESP32.
Using Thonny 3.3.5 on a Pi4.
The only way I have found to upload code to the ESP32 (or for that matter to the 8266) is under the save command – where you get the option to either “save to this computer” OR “save to device”.
Image below shows code saved on device:
https://www.dropbox.com/s/r98i9sakx4wpx4h/Thonny_2.jpg?dl=0
BUT
I can only get the code to run using the “Run current script” button
https://www.dropbox.com/s/p1n9enoq25ic3j1/Thonny_1.jpg?dl=0

My last image shows the text displayed in the Shell (on Thonny) when I hit the EN button on the device.
Pressing the BOOT button has no effect.
The code is definitely saved on the device – it’s still resident in memory after cycling the power.
I hope this gives you enough information to come back to me with some suggestions
Regards
Steve

0 Vote Up Vote Down
Sara Santos Staff answered 4 years ago

Hi again.
Are you saving your code with the name “pwm_pot_esp32.py”?
The file should be called main.py.
(Otherwise, it won’t run unless a main.py or a boot.py file calls it).
Is that your issue?
Regards,
Sara

0 Vote Up Vote Down
Steve answered 4 years ago

Yes
That was my issue.
That’s what I call “Learning the Hard Way”.
Obvious when I stop to think!.
Thanks
Steve

0 Vote Up Vote Down
Sara Santos Staff answered 4 years ago

Great!
I’m glad we found the issue.
I’ll mark this issue as resolved, if you need further help, you just need to open a new question in our forum.
Regards,
Sara

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [eBook Updated] Learn Raspberry Pi Pico/Pico W with MicroPython eBook – Version 1.2 May 26, 2025
  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.