I'm trying to build a project template that only uses rom functions, peripheral libraries (timer, i2c, i2s, spi etc.), plus dual-core FreeRTOS api.
With 'make menuconfig' I have disabled Wifi, ethernet, bluetooth, AWS. However, when I then build a simple main.c that just toggles an led, I see that the build system continues to compile un-needed networking functionality - tcpip, lwip,mbedtls,ssl,crypto,nghttp etc. It looks like about 75% of the code compiled is not required.
Code: Select all
#include "freertos/FreeRTOS.h"
#include "esp_system.h"
#include "esp_event.h"
#include "esp_event_loop.h"
#include "nvs_flash.h"
#include "driver/gpio.h"
esp_err_t event_handler(void *ctx, system_event_t *event)
{
return ESP_OK;
}
void app_main(void)
{
nvs_flash_init();
ESP_ERROR_CHECK( esp_event_loop_init(event_handler, NULL) );
gpio_set_direction(GPIO_NUM_4, GPIO_MODE_OUTPUT);
int level = 0;
while (true) {
gpio_set_level(GPIO_NUM_4, level);
level = !level;
vTaskDelay(300 / portTICK_PERIOD_MS);
}
}