Deep Dive w/Scott: ESP Hacking #adafruit

Subscribers:
459,000
Published on ● Video Link: https://www.youtube.com/watch?v=RoLcCLuQ5vc



Duration: 2:05:30
1,225 views
23


Join Scott as he answers questions and debugs an issue on the ESP32-S3. Tim is hosting next week as Scott moves his office out of the house.

0:00 Starting
2:03 getting started
4:00 foamy guy streaming next week Scott should be back following week
6:30 does the I2S library do both left and right channels / yes
6:58 new office description
7:59 option for green screen
8:35 likely will not work from home
8:47 cats stay at home no cat cam
13:25 wifi configuration in CP load credentials when loading
16:10 tiny code reader to read qr code
16:38 Metro ESP32-s2 issue 8288 watchdog timer
18:40 yield to freertos in CP maybe garbage collection?
19:44 replicate on new branch idf-4 still
24:50 review circuitpython/ports/espressif/Makefile
26:37 flash stays in bootloader
28:10 switch from flash target to regular target
29:36 try DEBUG=1 build
30:25 maybe switch to 82x branch
30:55 main is where CP works on 9.0 since mpy files change
32:50 warnings come from IDF not CP ( stricter rules for warnings from CP )
34:00 erase flash and build
34:50 no output, but CP drive popped up
35:50 look at flash and ram settings ( mpconfigboard.h )
36:45 it takes a while to boot 16MB flash esp32s2
37:05 expecting to get debug logging
37:35 copy debug config settings
39:00 still no debug output
40:20 may need to connect to debug serial ?
42:30 metro rp2040 has rx/tx switch
43:00 we have serial debug!
44:06 reset and observe the tio timestamps reviewing boot messages
45:00 tio showing duration since last message
45:47 try power cycle
46:10 first time after erasing flash the is extra delay
46:55 install new code.py
47:27 both cpus reset by watchdog we can reproduce the issue
47:55 saved program counter check map file addresses
49:21 check linker script
50:55 does CP do any JIT ?
51:30 Construct call add log message
52:45 could try address to line (addr2line)
53:35 not getting to the above iserted line
54:27 add another ESP_LOGI log statement in SPI.c construct
55:35 looking for where in the flow we are getting...
57:20 rebooting ... now we are "boot looping"
58:10 got above log messages!
58:42 look at espressif IDF docs for watchdog timer errors
1:00:10 disable or change watchdog timer ?
1:01:28 menuconfig increase interrupt timer watchdog
1:02:50 place panic handler in ram
1:03:05 do a make clean after menuconfig
1:05:20 would be nice to get a backtrace
1:06:00 3 seconds from last log till WDT
1:07:25 add more log messages CP DIO bindings also busio
1:09:40 could be USB issue maybe disable USB
1:11:10 esp code similar to imx
1:12:00 try without USB seems to be code.py related
1:12:30 maybe background task?
1:13:20 background tasks like filling audio buffers ...
1:13:50 adding logging to background_callback.c
1:15:03 partial rebuild for CP changes
1:15:20 MMU present ?
1:15:44 backtrace !
1:16:30 python tools decode backtrace lock acquisition aborting! (uses addr2line)
1:19:04 iram_0_0seg the panic code?
1:20:25 linker script magic
1:22:10 "no I don't understand what's going on"
1:23:00 "DO NOT USE FOR MASS PRODUCTION" ( psram or flash timing )
1:23:51 spi_timing_psram_tuning where the warning comes from
1:25:00 maybe turn off autodetecton
1:26:24 back to esp-idf github repo (v4.4 code)
1:27:16 ESP32 platform preferred platform
1:28:30 exp removed the warning what else?
1:32:40 maybe turn off psram tuning in menuconfig ?
1:33:15 what branch are we on CP is 8 months of fixes behind
1:34:35 would I use CP over C? ( yes ), but then it is work related and I find bugs
1:35:50 CP development workflow is easier
1:36:20 continue to merge and update with newer IDF code
1:37:20 make clean
1:37:50 prefer CP because it is portable
1:38:45 will the update fix it?
1:39:20 we don't use octal flash that much on other esp boards
1:40:06 micropython vs. circuit python tradeoffs pro/con
1:41:06 still get the backtrace
1:42:20 building in wrong directory :-)
1:43:33 git remote add espressif
1:44:00 git fetch unshallow
1:45:10 "1 core mode" sounds suspect
1:45:50 make clean / flash
1:46:20 deactivate ?
1:47:31 missing .h file ? esp_bt.h
1:51:00 turning BLE off
1:52:00 still aborted
1:52:30 verify idf version still in 1-core mode
1:53:00 idf builds prefer to not use multiple cores
1:53:35 menuconfig
1:55:40 rebuilding
1:55:55 menuconfig based on multiple kconfig files
1:56:30 http server / micropython vs. cp question
1:57:45 still aborted after slowing flash down
1:59:58 maybe logging is causing errors? ( consider log early api )
2:00:35 back to the original problem
2:01:17 GH issue github.com/adafruit/circuitpython/issues/8288
2:02:05 Wrap up discord open all the time

Visit the Adafruit shop online - http://www.adafruit.com

-----------------------------------------
LIVE CHAT IS HERE! http://adafru.it/discord
Subscribe to Adafruit on YouTube: http://adafru.it/subscribe
New tutorials on the Adafruit Learning System: http://learn.adafruit.com/
-----------------------------------------




Other Videos By Adafruit Industries


2023-08-29Conveyor belt Sushi! Testing out a 4.6" diagonal bar TFT display ๐Ÿฃ ๐Ÿ“ ๐Ÿ–ฅ
2023-08-28Croc Toes #timelapse #3dprinting #adafruit
2023-08-28Would you play round DOOM? ๐ŸŽฎ๐Ÿ‘พ๐Ÿ”ฅ
2023-08-28CircuitPython Weekly Meeting for August 28, 2023 @circuitpython #circuitpython #adafruit
2023-08-28Desktop portable Stargate ๐ŸŒŒ๐Ÿ›ธ๐Ÿ’ก
2023-08-28The Great Search: Replacement capacitors for old boards #TheGreatSearch #digikey #adafruit @DigiKey
2023-08-28The Desk of Ladyada - ESP32-S3 RGB TFT Experimentation
2023-08-28MJPEGs are a great way to play small animations on TFTs ๐ŸŽž๏ธ ๐Ÿ–ฅ๏ธ ๐Ÿ”„
2023-08-27PCB of the Day! Trinket - Mini Microcontroller - 3.3V Logic - MicroUSB
2023-08-26PCB of the Day! SPI Non-Volatile FRAM Breakout - 2 Mbit / 256 KBytes - MB85RS2MTA ๐Ÿ”Œ๐Ÿ› ๏ธ๐Ÿ’พ
2023-08-26Deep Dive w/Scott: ESP Hacking #adafruit
2023-08-25PCB of the Day! ESP32-S3 RGB TTL Experimentation board...take 2! ๐Ÿ”ง๐Ÿ’ก๐Ÿ”„#adafruit
2023-08-24#NewProducts 8/23/23 Featuring Adafruit Metro ESP32-S3 with 16 MB Flash 8 MB PSRAM!
2023-08-24PCB of the day! 1.8" Color TFT Shield w/microSD and Joystick ๐Ÿ–ฅ๏ธ๐ŸŽฎ๐Ÿ”Œ
2023-08-24EYE on NPI Renesas ZSSC3241 Sensor Signal Conditioning IC #EyeOnNPI #digikey @RenesasGlobal @digikey
2023-08-24Advanced Manufacturing: Made in NYC by Adafruit 8/23/2023
2023-08-24Adafruit Top Secret August 23, 2023 #Adafruit #AdafruitTopSecret @Adafruit
2023-08-24Python on Hardware weekly video 244 #CircuitPython #Python #adafruit @Adafruit @micropython
2023-08-24ASK AN ENGINEER 8/23/2023 LIVE!
2023-08-233D Hangouts โ€“ Ahsoka Saber, Talking D20 and Gothic Crown
2023-08-23SHOW and TELL 8/23/2023



Tags:
adafruit
electronics
diy
arduino
hardware
opensource
projects
raspberry
pi
computer
raspberrypi
microcontrollers
limor
limorfried
ladyada
STEAM
STEM
python
microbit
circuitpython
neopixel
neopixels
raspberry pi
circuitplaygound
nyc
make
makers
micro:bit
adafrit
adafruit promo code
ada fruit
adafruit coupons
raspberry pi zero
micropython
machine learning
ai
tensorflow