Skip to content

Commit

Permalink
bugfix: esp32s3: allows QIO flash mode
Browse files Browse the repository at this point in the history
Allows QIO flash mode on esp32s3

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
  • Loading branch information
wmrsouza committed Oct 1, 2024
1 parent 8fda052 commit a756e4f
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
38 changes: 38 additions & 0 deletions soc/espressif/common/include/hexdump.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#ifndef __hexdump_included__
#define __hexdump_included__

#include "rom/ets_sys.h"

static void hexdump(const char *str, const void *packet, size_t length)
{
int n = 0;
uint32_t base = (uint32_t)packet;
const uint8_t *data = (const uint8_t*) packet;

Check failure on line 10 in soc/espressif/common/include/hexdump.h

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

POINTER_LOCATION

soc/espressif/common/include/hexdump.h:10 "(foo*)" should be "(foo *)"

Check notice on line 11 in soc/espressif/common/include/hexdump.h

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

You may want to run clang-format on this change

soc/espressif/common/include/hexdump.h:11 - const uint8_t *data = (const uint8_t*) packet; + const uint8_t *data = (const uint8_t *)packet;
if (!length) {
ets_printf("%s zero-length data\n", str);
return;
}

while (length--) {
if (n % 16 == 0) {
ets_printf("%s %08X: ", str, base+n);
}

Check notice on line 20 in soc/espressif/common/include/hexdump.h

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

You may want to run clang-format on this change

soc/espressif/common/include/hexdump.h:20 - ets_printf("%s %08X: ", str, base+n); + ets_printf("%s %08X: ", str, base + n);

ets_printf("%02X ", *data++);

n++;
if (n % 8 == 0) {
if (n % 16 == 0) {
ets_printf("\n");
} else {
ets_printf(" ");
}
}
}

if (n % 16) {
ets_printf("\n");
}
}
#endif /* __hexdump_included__ */
1 change: 1 addition & 0 deletions soc/espressif/esp32s3/default.ld
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,7 @@ SECTIONS
*libzephyr.a:bootloader_wdt.*(.literal .text .literal.* .text.*)
*libzephyr.a:bootloader_flash.*(.literal .text .literal.* .text.*)
*libzephyr.a:bootloader_flash_config_esp32s3.*(.literal .text .literal.* .text.*)
*libzephyr.a:flash_qio_mode.*(.literal .text .literal.* .text.*)
*libzephyr.a:bootloader_clock_loader.*(.literal .text .literal.* .text.*)
*libzephyr.a:bootloader_common_loader.*(.literal .text .literal.* .text.*)
*libzephyr.a:bootloader_mem.*(.literal .text .literal.* .text.*)
Expand Down

0 comments on commit a756e4f

Please sign in to comment.