Skip to content

Commit

Permalink
Merge branch 'fix/add_s3_example_variables' into 'master'
Browse files Browse the repository at this point in the history
fix: get_example_binaries() ESP32-S3 fixes

Closes ESF-80 and ESF-91

See merge request espressif/esp-serial-flasher!77
  • Loading branch information
DNedic committed Nov 24, 2023
2 parents 30de4b0 + 874e972 commit 979e057
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 2 deletions.
57 changes: 56 additions & 1 deletion examples/common/example_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,15 @@ extern const uint32_t ESP32_S2_hello_world_bin_size;
extern const uint8_t ESP32_S2_partition_table_bin[];
extern const uint32_t ESP32_S2_partition_table_bin_size;

extern const uint8_t ESP32_S3_bootloader_bin[];
extern const uint32_t ESP32_S3_bootloader_bin_size;
extern const uint8_t ESP32_S3_hello_world_bin[];
extern const uint32_t ESP32_S3_hello_world_bin_size;
extern const uint8_t ESP32_S3_partition_table_bin[];
extern const uint32_t ESP32_S3_partition_table_bin_size;



extern const uint8_t ESP8266_bootloader_bin[];
extern const uint32_t ESP8266_bootloader_bin_size;
extern const uint8_t ESP8266_hello_world_bin[];
Expand All @@ -67,6 +76,20 @@ extern const uint32_t ESP32_H2_hello_world_bin_size;
extern const uint8_t ESP32_H2_partition_table_bin[];
extern const uint32_t ESP32_H2_partition_table_bin_size;

extern const uint8_t ESP32_C2_bootloader_bin[];
extern const uint32_t ESP32_C2_bootloader_bin_size;
extern const uint8_t ESP32_C2_hello_world_bin[];
extern const uint32_t ESP32_C2_hello_world_bin_size;
extern const uint8_t ESP32_C2_partition_table_bin[];
extern const uint32_t ESP32_C2_partition_table_bin_size;

extern const uint8_t ESP32_C3_bootloader_bin[];
extern const uint32_t ESP32_C3_bootloader_bin_size;
extern const uint8_t ESP32_C3_hello_world_bin[];
extern const uint32_t ESP32_C3_hello_world_bin_size;
extern const uint8_t ESP32_C3_partition_table_bin[];
extern const uint32_t ESP32_C3_partition_table_bin_size;

extern const uint8_t ESP32_C6_bootloader_bin[];
extern const uint32_t ESP32_C6_bootloader_bin_size;
extern const uint8_t ESP32_C6_hello_world_bin[];
Expand Down Expand Up @@ -126,6 +149,26 @@ void get_example_binaries(target_chip_t target, example_binaries_t *bins)
bins->app.data = ESP32_H2_hello_world_bin;
bins->app.size = ESP32_H2_hello_world_bin_size;
bins->app.addr = APPLICATION_ADDRESS;
} else if (target == ESP32C2_CHIP){
bins->boot.data = ESP32_C2_bootloader_bin;
bins->boot.size = ESP32_C2_bootloader_bin_size;
bins->boot.addr = BOOTLOADER_ADDRESS_V1;
bins->part.data = ESP32_C2_partition_table_bin;
bins->part.size = ESP32_C2_partition_table_bin_size;
bins->part.addr = PARTITION_ADDRESS;
bins->app.data = ESP32_C2_hello_world_bin;
bins->app.size = ESP32_C2_hello_world_bin_size;
bins->app.addr = APPLICATION_ADDRESS;
} else if (target == ESP32C3_CHIP){
bins->boot.data = ESP32_C3_bootloader_bin;
bins->boot.size = ESP32_C3_bootloader_bin_size;
bins->boot.addr = BOOTLOADER_ADDRESS_V1;
bins->part.data = ESP32_C3_partition_table_bin;
bins->part.size = ESP32_C3_partition_table_bin_size;
bins->part.addr = PARTITION_ADDRESS;
bins->app.data = ESP32_C3_hello_world_bin;
bins->app.size = ESP32_C3_hello_world_bin_size;
bins->app.addr = APPLICATION_ADDRESS;
} else if (target == ESP32C6_CHIP){
bins->boot.data = ESP32_C6_bootloader_bin;
bins->boot.size = ESP32_C6_bootloader_bin_size;
Expand All @@ -136,7 +179,19 @@ void get_example_binaries(target_chip_t target, example_binaries_t *bins)
bins->app.data = ESP32_C6_hello_world_bin;
bins->app.size = ESP32_C6_hello_world_bin_size;
bins->app.addr = APPLICATION_ADDRESS;
} else {

} else if (target == ESP32S3_CHIP){
bins->boot.data = ESP32_S3_bootloader_bin;
bins->boot.size = ESP32_S3_bootloader_bin_size;
bins->boot.addr = BOOTLOADER_ADDRESS_V1;
bins->part.data = ESP32_S3_partition_table_bin;
bins->part.size = ESP32_S3_partition_table_bin_size;
bins->part.addr = PARTITION_ADDRESS;
bins->app.data = ESP32_S3_hello_world_bin;
bins->app.size = ESP32_S3_hello_world_bin_size;
bins->app.addr = APPLICATION_ADDRESS;
}
else {
abort();
}
}
Expand Down
2 changes: 1 addition & 1 deletion examples/esp32_example/partitions.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, , 0x6000,
phy_init, data, phy, , 0x1000,
factory, app, factory, , 1500K,
factory, app, factory, , 1920K,

0 comments on commit 979e057

Please sign in to comment.