Code: Select all
#include <stdio.h>
#include <inttypes.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_log.h"
static const char *TAG = "MAIN";
void app_main()
{
int CoreID = xPortGetCoreID();
ESP_LOGI(TAG, "start CoreID=%d",CoreID);
ESP_LOGI(TAG, "This is only a string");
}
No problem.
Code: Select all
$ idf.py build
Executing action: all (aliases: build)
Running ninja in directory /home/nop/rtos/test/build
Executing "ninja all"...
[1/1] cd /home/nop/rtos/test/build/boo...s/test/build/bootloader/bootloader.bin
Bootloader binary size 0x6880 bytes. 0x780 bytes (7%) free.
[8/9] Generating binary image from built executable
esptool.py v4.8.1
Creating esp32 image...
Merged 2 ELF sections
Successfully created esp32 image.
Generated /home/nop/rtos/test/build/test.bin
[9/9] cd /home/nop/rtos/test/build/esp...bin /home/nop/rtos/test/build/test.bin
test.bin binary size 0x2b6e0 bytes. Smallest app partition is 0x100000 bytes. 0xd4920 bytes (83%) free.
Project build complete. To flash, run:
idf.py flash
or
idf.py -p PORT flash
or
python -m esptool --chip esp32 -b 460800 --before default_reset --after hard_reset write_flash --flash_mode dio --flash_size 2MB --flash_freq 40m 0x1000 build/bootloader/bootloader.bin 0x8000 build/partition_table/partition-table.bin 0x10000 build/test.bin
or from the "/home/nop/rtos/test/build" directory
python -m esptool --chip esp32 -b 460800 --before default_reset --after hard_reset write_flash "@flash_args"