walmis / blackmagic-espidf

Blackmagic Wireless SWD Debug probe hosted on esp-idf SDK (for ESP8266) with UART on Telnet port and HTTP using xterm.js
256 stars 50 forks source link

Pre-compiled binaries #8

Open MrZANE42 opened 3 years ago

MrZANE42 commented 3 years ago

Any chance you could upload pre-compiled binaries? I'm having problems getting the compile environment set up correctly so I can't build currently. I already have an older version of the code compiled and downloaded on en ESP8266 using this guide. https://www.visualmicro.com/page/Create-a-WiFi-Black-Magic-GDB-Probe-from-ESP8266.aspx So now I'd just like to upload a newer version to try out the latest features like live debugging etc. Any chance you could do this?

Ps. I realize that there are multiple configurations options but just a binary with default values would be great.

neinseg commented 3 years ago

I agree, this would be useful. The SDK requires python2 and on some distros installing that is a small PITA.

J-Wrobel commented 3 years ago

Hello @neinseg and @MrZANE42, I did a fork and uploaded binaries with default values: one with OTA and one without. You can find it here: repo As a side note You can quite conveniently use virtualenv to have an environment with python2 without messing with the whole distro. See here for ref: stack venv thread

drmpf commented 2 years ago

I tried the pre-compiled noOTA binary on a SparkFun esp8266 thing and got this error output.

Also the readme.md refers to 192.168.4.1, I assume that means the ESP8266 sets up it own Access point. But no new network was visible on reboot.

esptool.py v3.2 Serial port COM4 Connecting.... Chip is ESP8266EX Features: WiFi Crystal is 26MHz MAC: ..... Uploading stub... Running stub... Stub running... Changing baud rate to 460800 Changed. Configuring flash size... Flash will be erased from 0x00000000 to 0x00001fff... Flash will be erased from 0x00010000 to 0x000b7fff... Flash will be erased from 0x00008000 to 0x00008fff... WARNING: Suspicious segment 0x60000014, length 8 Compressed 5584 bytes to 4395... Wrote 5584 bytes (4395 compressed) at 0x00000000 in 0.2 seconds (effective 178.7 kbit/s)... Hash of data verified. Compressed 685040 bytes to 474075... Wrote 685040 bytes (474075 compressed) at 0x00010000 in 11.4 seconds (effective 480.2 kbit/s)... File md5: 4f087e3227b2bd9646070d527356032a Flash md5: 74616a41f3af5d5d224394e184b466ef MD5 of 0xFF is ccc179ecb874380ccdb7c4a3628dc0aa

A fatal error occurred: MD5 of file does not match data in flash!

J-Wrobel commented 2 years ago

Hello,

refers to 192.168.4.1, I assume that means the ESP8266 sets up it own Access point.

Yes, that is how it is configured by default, to setup its own network.

But no new network was visible on reboot.

I would assume that due to fatal error which You encountered the app is not running correctly or even at all. If MD5 of the file mismatches what was read from flash then I would guess that there was an error during flashing (i.e. bit flip or noise on the wires). Have You tried it a few times (if yes then is flash md5 value always the same)? Maybe try different cable, check connections, try loading blink example or even try different esp board if possible.

And you may want to NOT post MAC of Your devices, just as a good practice ;)

drmpf commented 2 years ago

Ok, Blink works on the Sparkfun ESP8266 thing, but upload always returns the same md5 values and error, so moved to an ESP-01S and upload works and new network found, good But what is the password? Also currently flashing noOTA, what does OTA version give me extra? Can I still flash the target with noOTA?

J-Wrobel commented 2 years ago

I think the password would be the default one from the make config which should be this one:

config ESP_WIFI_PASSWORD string "WiFi Password" default "helloworld" help WiFi password (WPA or WPA2) for the example to use.`

The OTA gives You possibility to update BMP firmware over WiFi but both OTA and noOTA are good to go in terms of debugging a target.

drmpf commented 2 years ago

Yes tried helloworld but no connection on either my pc or mac :-(

J-Wrobel commented 2 years ago

Tried just now with noOTA binary and WemosD1 mini and default helloworld works fine on Windows 10 machine. After that I can reach 192.168.4.1. Sorry but no clue what might be wrong in Your case.

Note: binaries are part of forked repo and not the original one. So building Your own binary from latest original repo is recommended.

drmpf commented 2 years ago

Thanks for testing it. I use ESP8266 access points in a number of my projects so not sure what is happening here. I will see if I can navigate the build process.

drmpf commented 2 years ago

Success. I needed to set a static IP on my computer in the range 192.168.4.xxx, My normal network is in the range 10.1.1.xx That fixed the connection problem. pw is helloworld Tested the noOTA binary on ESP-01 with only 1M memory loads and connects, no functional testing yet. Also loads and connects on ESP-01S with 4M. The OTA binary not tested.

The bad news is that I could not get the build process to work. Tried using MSYS2 install and after a day of chasing down the multiple missing python packages and navigating the correct versions and in some cases commenting out the ESP version checks which failed with the later versions (problem here perhaps??) I could not get the ESP tool chain to run and build. Missing the xtensa-lx106-elf-gcc. I tried copying the Arduino tools install over to MSYS2 dir but got stuck on toolpath not set correctly error.

So my request is to add a set up option webpage to set the network range, so I can change it from the default to 10.1.1.xx otherwise I need to set a static IP which then prevents my PC from re-connecting to the internet when I change back my router's network. This is a real nuisance when trying to look up docs while running debug.

drmpf commented 2 years ago

Just did some more testing and if you used code like

  ESP8266WiFiAPClass accessPoint;
  accessPoint.softAPConfig(local_ip,gateway_ip,subnet_ip);
  accessPoint.softAP(wifiWebConfigAP,wifiWebConfigPASSWORD);

You get a DHCP server that will serve an IP of x.x.x.100 I had a quick look but could not isolate where in your code you set up the accesspoint. Can you add some code like this and rebuild the bins?

drmpf commented 2 years ago

WiFi.softAPConfig(local_ip, gateway_ip, subnet_ip); // call this first!! WiFi.softAP(ssid_wifi, password_wifi); also works, but could not find a reference to WiFi.softAP in your code

drmpf commented 2 years ago

Currently can program nrf52832 via ESP-01, but not getting any serial output back. What baudrate is the ESP-01 expecting? I expect I should be able to open TeraTerm on 192.168.4.1:23 to receive/send serial data. and also on 192.168.4.1/index.hml?

lucasromeiro commented 2 years ago

Any chance you could upload pre-compiled binaries? I'm having problems getting the compile environment set up correctly so I can't build currently. I already have an older version of the code compiled and downloaded on en ESP8266 using this guide. https://www.visualmicro.com/page/Create-a-WiFi-Black-Magic-GDB-Probe-from-ESP8266.aspx So now I'd just like to upload a newer version to try out the latest features like live debugging etc. Any chance you could do this?

Ps. I realize that there are multiple configurations options but just a binary with default values would be great.

Hello. Thanks for making the compiled binary available. Yesterday I stayed all day and couldn't compile and record. After saving your file, how do I use it? I didn't understand how I can use it to record my NRF52832. did not connect to my network.

drmpf commented 2 years ago

Here are my notes from my test of the pre-compiled binaries which worked for me on nRF52832. (https://www.forward.com.au/pfod/BLE/LowPower_2022/index.html) Your nRF52832 module could also be program protected see the end of the link above.

For programming there is also an ESP-01/ESP8266 based BlackMagic WiFi clone from https://github.com/walmis/blackmagic-esp8266 with pre-compiled binaries at https://github.com/J-Wrobel/blackmagic-espidf/tree/master/bins. The no_OTA version is all you need.

This programmer has a number of restrictions 1) openOCD does not connect for the removal of chip programming protection. https://github.com/walmis/openocd-blackmagic has a version of openOCD that includes a blackmagic interface (not tested) 2) It requires changes to the Arduino upload scripts, in platform.txt, to access an IP:port instead of the serial COM port. 3) The IP network is fix as 192.168.4.1 (unless you edit and recompile the source) and you need to disconnect your computer from the internet to connect to this local network for programming. You may also need to set a static IP for your computer if you normal local network is not 192.168.x.x.

EdwinFairchild commented 2 years ago

I agree, this would be useful. The SDK requires python2 and on some distros installing that is a small PITA.

this repo literally has sections calling for python 2 and other for python 3. its insane

ahmadmn commented 1 year ago

J-Wrobel

Hi Wrobel Thanks for pre-compiled binaries. I use latest version of STM32CubeIDE and STM32G030C8 mcu. The result is as below: bmp

J-Wrobel commented 1 year ago

Hi, I am unable to provide You any support at the moment. I was not involved in the developement, I just uploaded the bins when I tried the project. It seems from the logs there is incompatibility between IDE and what is running on BMP. Try to compile latest BMP or ask around/submit issue. BR. J

wt., 17 sty 2023, 22:07 użytkownik Ahmad @.***> napisał:

J-Wrobel

Hi Wrobel Thanks for pre-compiled binaries. I use latest version of STM32CubeIDE and STM32G030C8 mcu. The Result is as below: [image: bmp] https://user-images.githubusercontent.com/5241132/213012434-7b5d79ef-9fbc-4d73-a5e2-9fe8c60da64a.png

— Reply to this email directly, view it on GitHub https://github.com/walmis/blackmagic-espidf/issues/8#issuecomment-1386051046, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALCTQ2GGA2PHQWYJIRXXA3DWS4CXPANCNFSM424E3KZA . You are receiving this because you commented.Message ID: @.***>

ahmadmn commented 1 year ago

Thanks Wrobel. You are right. I found the problem is false commands from STM32cubeIDE and direct command from GDB command lines runs successfully. My next step is finding IDE settings to add GDB commands that overrides ST-LINK GDB server commands.