how to build a project with just FreeRTOS support (no wifi, tcpip stack etc.)
Posted: Tue Aug 29, 2017 7:34 am
Hi,
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.
Any tips on how I could go about modifying the build process to create a project template that allows me to just build the above named minimum features ? Maybe this is blasphemy , but I am sure a lot of people would be interested in using the esp32 as a powerful dual-core microcontroller without it's networking features.
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);
}
}