HandHeldLegend / HOJA-LIB-ESP32

An API project to emulate various retro and modern controllers on ESP32.
Other
56 stars 12 forks source link

Cannot serial "monitor" using CORE_NINTENDOSWITCH #7

Closed Calebe94 closed 1 year ago

Calebe94 commented 1 year ago

When I build the firmware using CORE_NINTENDOSWITCH core, I cannot monitor the serial logs through idf.py monitor because the esp32 keeps restarting.

The full log can be seeing bellow:

I (28) boot: ESP-IDF v4.4.2 2nd stage bootloader
I (28) boot: compile time 13:26:27
I (29) boot: chip revision: 1
I (31) boot_comm: chip revision: 1, min. bootloader chip revision: 0
I (38) boot.esp32: SPI Speed      : 40MHz
I (43) boot.esp32: SPI Mode       : DIO
I (47) boot.esp32: SPI Flash Size : 2MB
I (52) boot: Enabling RNG early entropy source...
I (57) boot: Partition Table:
I (61) boot: ## Label            Usage          Type ST Offset   Length
I (68) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (76) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (83) boot:  2 factory          factory app      00 00 00010000 00100000
I (91) boot: End of partition table
I (95) boot_comm: chip revision: 1, min. application chip revision: 0
I (102) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=264d4h (156884) map
I (167) esp_image: segment 1: paddr=000364fc vaddr=3ffbdb60 size=05110h ( 20752) load
I (176) esp_image: segment 2: paddr=0003b614 vaddr=40080000 size=04a04h ( 18948) load
I (184) esp_image: segment 3: paddr=00040020 vaddr=400d0020 size=9f314h (652052) map
I (420) esp_image: segment 4: paddr=000df33c vaddr=40084a04 size=13e40h ( 81472) load
I (454) esp_image: segment 5: paddr=000f3184 vaddr=50000000 size=00010h (    16) load
I (466) boot: Loaded app from partition at offset 0x10000
I (466) boot: Disabling RNG early entropy source...
I (478) cpu_start: Pro cpu up.
I (478) cpu_start: Starting app cpu, entry point is 0x400811e4
0x400811e4: call_start_cpu1 at /home/calebe94/esp/esp-idf/components/esp_system/port/cpu_start.c:160

I (0) cpu_start: App cpu up.
I (494) cpu_start: Pro cpu start user code
I (494) cpu_start: cpu freq: 160000000
I (494) cpu_start: Application information:
I (499) cpu_start: Project name:     RetroBlue
I (504) cpu_start: App version:      643e708
I (509) cpu_start: Compile time:     Sep 18 2022 13:26:21
I (515) cpu_start: ELF file SHA256:  f0a4bf1d11f36152...
I (521) cpu_start: ESP-IDF:          v4.4.2
I (526) heap_init: Initializing. RAM available for dynamic allocation:
I (533) heap_init: At 3FFAFF10 len 000000F0 (0 KiB): DRAM
I (539) heap_init: At 3FFB6388 len 00001C78 (7 KiB): DRAM
I (545) heap_init: At 3FFB9A20 len 00004108 (16 KiB): DRAM
I (551) heap_init: At 3FFCA340 len 00015CC0 (87 KiB): DRAM
I (558) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (564) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (570) heap_init: At 40098844 len 000077BC (29 KiB): IRAM
I (578) spi_flash: detected chip: generic
I (581) spi_flash: flash io: dio
W (585) spi_flash: Detected size(4096k) larger than the size in the binary image header(2048k). Using the size in the binary image header.
I (599) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (610) gpio: GPIO[17]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 
I (620) gpio: GPIO[23]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 
I (630) gpio: GPIO[26]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 
I (640) gpio: GPIO[33]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 
I (650) gpio: GPIO[18]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 
I (660) gpio: GPIO[25]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 
I (670) gpio: GPIO[27]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 
I (680) gpio: GPIO[32]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 
I (700) rb_settings_init: Required size: 36
I (710) rb_settings_init: Settings loaded with magic byte 0x72623033
I (710) rb_settings_init: RB Settings initialized OK.
I (710) rb_api_init: Retroblue API initialized.
I (720) rb_api_setCore: RetroBlue core set.
I (720) rb_api_startController: Attempting Nintendo Switch Core start...
I (730) ns_input_stickcalibration: Nintendo Switch Core stick calibration translated.
I (740) rbc_core_ns_start: CONTROLLER BT ADDRESS: 98
I (740) rbc_core_ns_start: CONTROLLER BT ADDRESS: 41
I (750) rbc_core_ns_start: CONTROLLER BT ADDRESS: 5c
I (750) rbc_core_ns_start: CONTROLLER BT ADDRESS: 92
I (760) rbc_core_ns_start: CONTROLLER BT ADDRESS: 7b
I (770) rbc_core_ns_start: CONTROLLER BT ADDRESS: 95
I (770) rbc_core_ns_start: CONTROLLER BT ADDRESS: a
I (780) rbc_core_ns_start: CONTROLLER BT ADDRESS: 7b
I (780) BTDM_INIT: BT controller compile version [bf9c077]
I (790) phy_init: phy_version 4670,719f9f6,Feb 18 2021,17:07:07
device reports readiness to read but returned no data (device disconnected or multiple access on port?)
Waiting for the device to reconnect
mitchellcairns commented 1 year ago

There's a note in one of the files that is not documented publicly at this point

// The SDP_PAD_LEN define must be altered to be much higher in bt_target.h. // Default is 300 which is too low for Nintendo Switch.

// Example of new define

define SDP_MAX_PAD_LEN 500

This should do it.

Cheers!