Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 8 Replies) Re: How to debug with DIY ESP8266 Black Magic Probe (BMP)? (Read 1589 times)
arduino1
Junior Member
**
Offline


Posts: 75
Joined: Feb 12th, 2015
Re: How to debug with DIY ESP8266 Black Magic Probe (BMP)?
Sep 29th, 2020 at 11:58am
Print Post  
Simon, thanks for the tipps. I will have a look.
In parallel to frustrated playing with the BMP on the Bluepill I tried your approach with the ESP8266, and downloaded the referenced .bin files.
But first of all, the .bat didn't work. But I managed to flash using Esptool directly, and it went through. 
However, I strained my eyes to find a Blackmagicprobe network.
No network. I tried on a bare ESP8266-01 and on a Nodemcu.
However, surprisingly sometimes by chance I saw a connection to some 192.168.... server. But I could not reproduce. How to connect to the ESP assuming that some version of BMPprobe is running unrecognized?
Has the network been removed? 
« Last Edit: Sep 29th, 2020 at 12:48pm by Simon@Visual Micro »  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2704
Joined: Feb 13th, 2019
Re: How to debug with DIY ESP8266 Black Magic Probe (BMP)?
Reply #1 - Sep 29th, 2020 at 12:59pm
Print Post  
Thanks for the report.

The script does just call ESPTool so this should be OK.

I have flashed my ESP8266 Huzzah (ESP-12 essentially), and after programming, and reset, it is showing as in the guide, as its own network.  It cannot connect to your existing network as it has no credentials, which is why it always presents its own WIFI network for your PC to connect to, so the connection to the 192.168 server seems unrelated.

Questions:
Could you send the output from the BAT script when it didn't work, just so we can investigate if there is something else we are not considering in the script?
Are you using an external power supply for the ESP8266 board? (I can flash mine just using power from FTDI most of the time, but it won't run without a stable 3v3 power supply)
  
Back to top
IP Logged
 
arduino1
Junior Member
**
Offline


Posts: 75
Joined: Feb 12th, 2015
Re: How to debug with DIY ESP8266 Black Magic Probe (BMP)?
Reply #2 - Sep 29th, 2020 at 1:51pm
Print Post  
Output:
G:\ESP8266_BMP_NoOTA_Default>UploadToESP8266.bat
Identifying Tools....

Package Folder Found
[C:\Users\Meister\AppData\Local\Arduino15\packages\esp8266]

ESPTool Found
[C:\Users\Meister\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.4\tools\esptool\esptool.py]
-----------
Type the COM Port Name and press ENTER    (e.g. COM10)   :   COM8
usage: esptool [-h] [--chip {auto,esp8266,esp32}] [--port PORT] [--baud BAUD]
               [--before {default_reset,no_reset,no_reset_no_sync}]
               [--after {hard_reset,soft_reset,no_reset}] [--no-stub]
               [--trace] [--override-vddsdio [{1.8V,1.9V,OFF}]]
               verify_flash,erase_flash,erase_region,version}
               ...
esptool: error: too few arguments
Issue Encountered during Upload
Due to the Error Encountered this script will now exit
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2704
Joined: Feb 13th, 2019
Re: How to debug with DIY ESP8266 Black Magic Probe (BMP)?
Reply #3 - Sep 29th, 2020 at 2:24pm
Print Post  
Thanks for the information about the script, I am using the same v2.7.4 core from ESP so unsure why this error is happening.

If you open a command prompt in the folder where you extracted the ZIP file, and run the below command:
Code
Select All
\tools\esptool\esptool.py --chip esp8266 --port COM8 --baud 921600 --before default_reset --after soft_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size 4MB 0x0000 %CD%/bootloader/bootloader.bin 0x10000 %CD%/blackmagic.bin 0x8000 %CD%/partitions_singleapp.bin 



What is the output from this?
  
Back to top
IP Logged
 
arduino1
Junior Member
**
Offline


Posts: 75
Joined: Feb 12th, 2015
Re: How to debug with DIY ESP8266 Black Magic Probe (BMP)?
Reply #4 - Sep 29th, 2020 at 3:39pm
Print Post  
It is a Nodemcu Amica,
(base) G:\ESP8266_BMP_NoOTA_Default>esptool --chip esp8266 --port COM8 --baud 921600 --before default_reset --after soft_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size 4MB 0x0000 %CD%/bootloader/bootloader.bin 0x10000 %CD%/blackmagic.bin 0x8000 %CD%/partitions_singleapp.bin
esptool.py v2.8
Serial port COM8
Connecting....
Chip is ESP8266EX
Features: WiFi
Crystal is 26MHz
MAC: 60:01:94:0b:a5:df
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...
WARNING: Suspicious segment 0x60000014, length 8
Compressed 5632 bytes to 4466...
Wrote 5632 bytes (4466 compressed) at 0x00000000 in 0.1 seconds (effective 703.5 kbit/s)...
Hash of data verified.
Compressed 499328 bytes to 364310...
Wrote 499328 bytes (364310 compressed) at 0x00010000 in 5.3 seconds (effective 749.0 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 83...
Wrote 3072 bytes (83 compressed) at 0x00008000 in 0.0 seconds (effective 1755.7 kbit/s)...
Hash of data verified.

Leaving...
Soft resetting...
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2704
Joined: Feb 13th, 2019
Re: How to debug with DIY ESP8266 Black Magic Probe (BMP)?
Reply #5 - Sep 29th, 2020 at 4:00pm
Print Post  
Thanks, not sure why the script didn't work then, as that's the command it forms and runs.

Now it has uploaded again, if you reset the board, does the WiFi network appear?
  
Back to top
IP Logged
 
arduino1
Junior Member
**
Offline


Posts: 75
Joined: Feb 12th, 2015
Re: How to debug with DIY ESP8266 Black Magic Probe (BMP)?
Reply #6 - Sep 29th, 2020 at 4:03pm
Print Post  
See also this running from c-drive:
(base) sp8266\hardware\esp8266\2.7.4\tools\esptool\esptool.py --chip esp8266 --port COM8 --baud 921600 --before default_reset --after soft_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size 4MB 0x0000 %CD%/bootloader/bootloader.bin 0x10000 %CD%/blackmagic.bin 0x8000 %CD%/partitions_singleapp.bin
usage: esptool [-h] [--chip {auto,esp8266,esp32}] [--port PORT] [--baud BAUD]
               [--before {default_reset,no_reset,no_reset_no_sync}]
               [--after {hard_reset,soft_reset,no_reset}] [--no-stub]
               [--trace] [--override-vddsdio [{1.8V,1.9V,OFF}]]
              h,verify_flash,erase_flash,erase_region,version}
               ...
esptool: error: too few arguments
Don't know how to fix it, what are the { } meaning?
« Last Edit: Sep 29th, 2020 at 4:05pm by arduino1 »  
Back to top
 
IP Logged
 
arduino1
Junior Member
**
Offline


Posts: 75
Joined: Feb 12th, 2015
Re: How to debug with DIY ESP8266 Black Magic Probe (BMP)?
Reply #7 - Sep 29th, 2020 at 6:02pm
Print Post  
After reset using 74880 Baud I get this in terminal:.
ets Jan  8 2013,rst cause:2, boot mode:(3,7)<\r><\n><\r><\n>load 0x60000014, len 8, room 16 <\r><\n>tail 8%?p?
Changing Baudrate to 256000 I get (behind garbage): user@code@done<\r><\n>.
So, the code is running (somehow) but no network.
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2704
Joined: Feb 13th, 2019
Re: How to debug with DIY ESP8266 Black Magic Probe (BMP)?
Reply #8 - Sep 29th, 2020 at 6:14pm
Print Post  
Thanks for the information.

The command in the script relies on it being run, from the directory where the BIN files are (this is what the %CD% does in the command).

The output here is just stating all possible options to the ESPTool script, and only shows if some of the parameters are missing or incorrect.

From the output so far, I see no problem with the script, as long as the ZIP has been extracted first (as shown in the previous post where the flashing worked fine with the same command)

Does the blackmagic_* WiFi now show up now the board has been programmed?
  
Back to top
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2704
Joined: Feb 13th, 2019
Re: How to debug with DIY ESP8266 Black Magic Probe (BMP)?
Reply #9 - Sep 29th, 2020 at 6:15pm
Print Post  
Our posts crossed..... are you powering the board via the USB connector, or using an external 3v3/5v power supply?
  
Back to top
IP Logged
 
arduino1
Junior Member
**
Offline


Posts: 75
Joined: Feb 12th, 2015
Re: How to debug with DIY ESP8266 Black Magic Probe (BMP)?
Reply #10 - Sep 29th, 2020 at 7:07pm
Print Post  
Had seen the power requirements.
No network, tried big 5V battery, 6V 1.4 A power supply.
  
Back to top
 
IP Logged
 
arduino1
Junior Member
**
Offline


Posts: 75
Joined: Feb 12th, 2015
Re: How to debug with DIY ESP8266 Black Magic Probe (BMP)?
Reply #11 - Sep 30th, 2020 at 6:51am
Print Post  
Got it. Network shown.
Used some crap ESP8266 board from my garbage box. I always keep the stuff.
Thank you for the painful advice.
Now I will see how debugging works.

Next might be to get the STM32-BMP working.
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2704
Joined: Feb 13th, 2019
Re: How to debug with DIY ESP8266 Black Magic Probe (BMP)?
Reply #12 - Sep 30th, 2020 at 10:23am
Print Post  
Thanks for the update on this, and glad its all up and running now.
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Re: How to debug with DIY ESP8266 Black Magic Probe (BMP)?
Reply #13 - Oct 14th, 2020 at 5:15pm
Print Post  
This Topic was moved here from Hardware Debugging (GDB, GDB WiFi, GDB Stub) [move by] Visual Micro.
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint