What's the fastest form of debug output?
What's the fastest form of debug output?
I'm using serial at the moment for debug output. Is there a faster way of getting debug output? I'm outputting debug from an emulated 6502 and the serial is slowing things down quite a bit.
-
- Posts: 9772
- Joined: Thu Nov 26, 2015 4:08 am
Re: What's the fastest form of debug output?
Depends. You can set serial to a faster baud rate, that would net you more speed. If your chip supports it, you can also switch to USB-serial-JTAG or USB-OTG; those two are also faster.
Re: What's the fastest form of debug output?
I'm using a ESP-WROOM-32. I don't think I have a JTAG interface on this chip? Having said that, this post viewtopic.php?t=10044 refers to it here: https://www.espressif.com/sites/default ... eet_en.pdfESP_Sprite wrote: ↑Mon Jan 15, 2024 8:36 amDepends. You can set serial to a faster baud rate, that would net you more speed. If your chip supports it, you can also switch to USB-serial-JTAG or USB-OTG; those two are also faster.
I have a "USB Blaster" clone for my FPGA boards..
I need to do some JTAG research (and I should be sleeping now). What would be the overall JTAG debug setup - the ESP32, some wiring to a JTAG header, connect to the USB Blaster and use OpenOCD?
Re: What's the fastest form of debug output?
From here: https://docs.espressif.com/projects/esp ... index.htmlESP_Sprite wrote: ↑Mon Jan 15, 2024 8:36 amDepends. You can set serial to a faster baud rate, that would net you more speed. If your chip supports it, you can also switch to USB-serial-JTAG or USB-OTG; those two are also faster.
The quickest and most convenient way to start with JTAG debugging is by using ESP-WROVER-KIT. Each version of this development board has JTAG interface already built in. No need for an external JTAG adapter and extra wiring/cable to connect JTAG to ESP32. ESP-WROVER-KIT is using FT2232H JTAG interface operating at 20 MHz clock speed, which is difficult to achieve with an external adapter.
Does that mean that any WROVER board is capable of providing JTAG over USB without the need for USB Blaster etc? So any WROVER devkit board I may find on Aliexpress such as this one would work?
-
- Posts: 9772
- Joined: Thu Nov 26, 2015 4:08 am
Re: What's the fastest form of debug output?
I was referring to USB-serial-JTAG, which is an integrated peripheral later ESP32 chips have that allow you to directly connect it to an USB port. You can get speeds approaching 12MBit with that, which is nice and fast compared to UARTs.
I wouldn't go the JTAG way; I'm not sure if protocol overhead makes that any faster than pure serial, especially with a relatively slow adapter like an USB blaster. I'd simply increase the baudrate: I think you can go up to 1MBit with that hardware, which is 9x as fast as the default 115200 baud setting.
I wouldn't go the JTAG way; I'm not sure if protocol overhead makes that any faster than pure serial, especially with a relatively slow adapter like an USB blaster. I'd simply increase the baudrate: I think you can go up to 1MBit with that hardware, which is 9x as fast as the default 115200 baud setting.
Re: What's the fastest form of debug output?
1MBit - so that would be 921600 baud? Seems weird - I've never used anything faster than 115200.. and I do remember days of 9600 and below!ESP_Sprite wrote: ↑Tue Jan 16, 2024 1:29 amI was referring to USB-serial-JTAG, which is an integrated peripheral later ESP32 chips have that allow you to directly connect it to an USB port. You can get speeds approaching 12MBit with that, which is nice and fast compared to UARTs.
I wouldn't go the JTAG way; I'm not sure if protocol overhead makes that any faster than pure serial, especially with a relatively slow adapter like an USB blaster. I'd simply increase the baudrate: I think you can go up to 1MBit with that hardware, which is 9x as fast as the default 115200 baud setting.
Is there any particular dev board that pops into mind when you think about USB-serial-JTAG? 9x faster would be a bit improvement for now - but if I can get up to 12Mbit/s, I'd like to get one in the mail.
How do you I change the console baudrate to 921600? I've tried setting this in both sdkconfig and sdkconfig.defaults but the printf() commands are still output at 115200.
I've also had a look at menuconfig and can't find a UART console setting there either:
-
- Posts: 9772
- Joined: Thu Nov 26, 2015 4:08 am
Re: What's the fastest form of debug output?
In your case, you probably need all the CPU speed you can get, so I'd go for an ESP32-S3 devboard - e.g. the ESP32-S3-Devkit-C is the 'default' universal one you can use. There's different flavours depending on if you want external PSRAM - if speed is a concern and you need this, select one with octal PSRAM as it's the fastest.
The baud rate setting is a bit hidden: you need to select 'Custom UART' for that setting, then you can set the Tx and Rx pin as well as the baudrate. Simply keep the Tx and Rx at GPIO 1 and 3 and change the baud rate to whatever you need.
The baud rate setting is a bit hidden: you need to select 'Custom UART' for that setting, then you can set the Tx and Rx pin as well as the baudrate. Simply keep the Tx and Rx at GPIO 1 and 3 and change the baud rate to whatever you need.
Re: What's the fastest form of debug output?
Excellent! Thanks so much for that - I wouldn't have thought about changing the UART to "custom". I got my 921600 logging now which will help somewhat.ESP_Sprite wrote: ↑Wed Jan 17, 2024 12:25 amIn your case, you probably need all the CPU speed you can get, so I'd go for an ESP32-S3 devboard - e.g. the ESP32-S3-Devkit-C is the 'default' universal one you can use. There's different flavours depending on if you want external PSRAM - if speed is a concern and you need this, select one with octal PSRAM as it's the fastest.
The baud rate setting is a bit hidden: you need to select 'Custom UART' for that setting, then you can set the Tx and Rx pin as well as the baudrate. Simply keep the Tx and Rx at GPIO 1 and 3 and change the baud rate to whatever you need.
The only thing that's putting me off those S3-DevkitC devices at the moment is the lack of (cheap) breakout boards for them. I could make my own PCB.. But.. I'm also a bit worried about the IDF support. Does 4.3.6 support the S3 boards? I'm stuck with 4.3.6 at the moment because I'm using FabGL and don't want to go through the effort of porting it to the latest IDF.
Re: What's the fastest form of debug output?
Oh no.. I've had 2 blue screen of death occurrences on my Win10 machine with the new 921600 baud rate - probably a driver bug. I might have to smarten up my logging and disable it until a certain number of instructions have been processed or time elapsed since my ESP32 boots and go back to 115200 serial.. or something in between 115200 and 921600.ESP_Sprite wrote: ↑Wed Jan 17, 2024 12:25 amThe baud rate setting is a bit hidden: you need to select 'Custom UART' for that setting, then you can set the Tx and Rx pin as well as the baudrate. Simply keep the Tx and Rx at GPIO 1 and 3 and change the baud rate to whatever you need.
576000 seems stable enough..
-
- Posts: 9772
- Joined: Thu Nov 26, 2015 4:08 am
Re: What's the fastest form of debug output?
Ah, I don't know if FabGL already supports the S3 to begin with. I also don't think an esp-idf that old supports the S3, but I'm not sure.
Who is online
Users browsing this forum: Bing [Bot], Majestic-12 [Bot] and 84 guests