Skip to content
Snippets Groups Projects
Commit 7327d5f6 authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

esp8266/scripts/port_diag: Add network diagnostic output.

parent a676a41c
No related branches found
No related tags found
No related merge requests found
import esp import esp
import uctypes import uctypes
import lwip
def main(): def main():
...@@ -7,6 +8,7 @@ def main(): ...@@ -7,6 +8,7 @@ def main():
ROM = uctypes.bytearray_at(0x40200000, 16) ROM = uctypes.bytearray_at(0x40200000, 16)
fid = esp.flash_id() fid = esp.flash_id()
print("FlashROM:")
print("Flash ID: %x (Vendor: %x Device: %x)" % (fid, fid & 0xff, fid & 0xff00 | fid >> 16)) print("Flash ID: %x (Vendor: %x Device: %x)" % (fid, fid & 0xff, fid & 0xff00 | fid >> 16))
print("Flash bootloader data:") print("Flash bootloader data:")
...@@ -15,5 +17,12 @@ def main(): ...@@ -15,5 +17,12 @@ def main():
print("Byte @2: %02x" % ROM[2]) print("Byte @2: %02x" % ROM[2])
print("Byte @3: %02x (Flash size: %s Flash freq: %s)" % (ROM[3], SZ_MAP.get(ROM[3] >> 4, "?"), FREQ_MAP.get(ROM[3] & 0xf))) print("Byte @3: %02x (Flash size: %s Flash freq: %s)" % (ROM[3], SZ_MAP.get(ROM[3] >> 4, "?"), FREQ_MAP.get(ROM[3] & 0xf)))
print("\nNetworking:")
print("Free WiFi driver buffers of type:")
for i in range(5):
print("%d: %d" % (i, esp.esf_free_bufs(i)))
print("lwIP PCBs:")
lwip.print_pcbs()
main() main()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment