Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pre-compiled binaries #8

Open
MrZANE42 opened this issue Apr 13, 2021 · 19 comments
Open

Pre-compiled binaries #8

MrZANE42 opened this issue Apr 13, 2021 · 19 comments

Comments

@MrZANE42
Copy link

MrZANE42 commented Apr 13, 2021

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
Copy link

neinseg commented Apr 29, 2021

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

@J-Wrobel
Copy link

J-Wrobel commented Sep 8, 2021

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
Copy link

drmpf commented Jan 8, 2022

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
Copy link

J-Wrobel commented Jan 8, 2022

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
Copy link

drmpf commented Jan 8, 2022

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
Copy link

J-Wrobel commented Jan 8, 2022

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
Copy link

drmpf commented Jan 8, 2022

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

@J-Wrobel
Copy link

J-Wrobel commented Jan 8, 2022

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
Copy link

drmpf commented Jan 8, 2022

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
Copy link

drmpf commented Jan 10, 2022

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
Copy link

drmpf commented Jan 10, 2022

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
Copy link

drmpf commented Jan 11, 2022

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
Copy link

drmpf commented Jan 14, 2022

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
Copy link

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
Copy link

drmpf commented Mar 8, 2022

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
Copy link

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
Copy link

ahmadmn commented Jan 17, 2023

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
Copy link

J-Wrobel commented Jan 18, 2023 via email

@ahmadmn
Copy link

ahmadmn commented Jan 18, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants