Esp32 cannot start whitout serial monitor

Hello there

I’m developing a project with esp32 platformio

but my project does not work without connecting serial monitor, how can we fix it.

main.c

https://pastebin.pl/view/6f5edec0

platformio.ini

; PlatformIO Project Configuration File
;
;   Build options: build flags, source filter
;   Upload options: custom upload port, speed and extra flags
;   Library options: dependencies, extra library storages
;   Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html
 
[env:esp32-s2-saola-1]
platform = espressif32
board = esp32-s2-saola-1
framework = espidf
lib_deps = iotappstory/IOTAppStory-ESP@^2.1.0-RC4
monitor_speed = 115200
monitor_port = COM14
upload_port = COM14

Explain. What behavior and (serial) output do you expect, what do you get?

the problem is not serial output. The program I put into esp32 without connecting to serial port does not work.

But how do you determine that it works or not? What procedure are you doing?

Also, are you using custom hardware of a standard ESP32 development board?