esp_rom: add esp32s3 rom symbols

This commit is contained in:
morris 2020-06-10 19:07:48 +08:00
parent 067b1b91c2
commit 9cc0f33ed5
8 changed files with 2424 additions and 1 deletions

View file

@ -12,6 +12,10 @@ if(BOOTLOADER_BUILD)
list(APPEND scripts "esp32s2/ld/esp32s2.rom.spiflash.ld")
endif()
if(target STREQUAL "esp32s3")
list(APPEND scripts "esp32s3/ld/esp32s3.rom.spiflash.ld")
endif()
if(CONFIG_ESP32_REV_MIN_3)
list(APPEND scripts "esp32/ld/esp32.rom.eco3.ld")
endif()
@ -60,6 +64,16 @@ else() # Regular app build
if(CONFIG_NEWLIB_NANO_FORMAT)
list(APPEND scripts "esp32s2/ld/esp32s2.rom.newlib-nano.ld")
endif()
elseif(target STREQUAL "esp32s3")
# no SPIRAM workaround for esp32s3
list(APPEND scripts "esp32s3/ld/esp32s3.rom.newlib-funcs.ld"
"esp32s3/ld/esp32s3.rom.spiflash.ld")
if(CONFIG_NEWLIB_NANO_FORMAT)
list(APPEND scripts "esp32s3/ld/esp32s3.rom.newlib-nano.ld")
endif()
endif()
target_linker_script(${COMPONENT_LIB} INTERFACE "${scripts}")

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,99 @@
/**
* Unlike other ROM functions which declare weak symbols using PROVIDE,
* these libgcc functions are exported using assignment, which declare strong symbols.
*
* Note: These ROM functions are always linked instead of the ones provided by libgcc.a.
*/
__absvdi2 = 0x40037f14;
__absvsi2 = 0x40037f00;
__adddf3 = 0x4003bd5c;
__addsf3 = 0x4003b9f0;
__addvdi3 = 0x4003c488;
__addvsi3 = 0x4003c464;
__ashldi3 = 0x40055928;
__ashrdi3 = 0x40055940;
__bswapdi2 = 0x40039054;
__bswapsi2 = 0x4003902c;
__clear_cache = 0x40037ef8;
__clrsbdi2 = 0x400390c8;
__clrsbsi2 = 0x400390b0;
__clzdi2 = 0x40055bbc;
__clzsi2 = 0x400558f8;
__cmpdi2 = 0x40037eb8;
__ctzdi2 = 0x40055bd0;
__ctzsi2 = 0x40055900;
__divdc3 = 0x40038b74;
__divdf3 = 0x4003c120;
__divdi3 = 0x40055bf0;
__divsc3 = 0x400388d4;
__divsf3 = 0x40055974;
__divsi3 = 0x400558c8;
__eqdf2 = 0x40037d40;
__eqsf2 = 0x40037a0c;
__extendsfdf2 = 0x4003c400;
__ffsdi2 = 0x40055b98;
__ffssi2 = 0x40055914;
__fixdfdi = 0x4003c290;
__fixdfsi = 0x4003c244;
__fixsfdi = 0x4003bc18;
__fixsfsi = 0x4003bbd8;
__fixunsdfsi = 0x4003c2fc;
__fixunssfdi = 0x4003bcd0;
__fixunssfsi = 0x4003bc78;
__floatdidf = 0x40055af4;
__floatdisf = 0x40055a2c;
__floatsidf = 0x40055ab0;
__floatsisf = 0x400559dc;
__floatundidf = 0x40055ae4;
__floatundisf = 0x40055a1c;
__floatunsidf = 0x40055aa4;
__floatunsisf = 0x400559d0;
__gcc_bcmp = 0x40039100;
__gedf2 = 0x40037e00;
__gesf2 = 0x40037aa4;
__gtdf2 = 0x40037d74;
__gtsf2 = 0x40037a38;
__ledf2 = 0x40037d9c;
__lesf2 = 0x40037a58;
__lshrdi3 = 0x4005595c;
__ltdf2 = 0x40037e28;
__ltsf2 = 0x40037ac4;
__moddi3 = 0x40055eb8;
__modsi3 = 0x400558d0;
__muldc3 = 0x4003829c;
__muldf3 = 0x40037c24;
__muldi3 = 0x40055b68;
__mulsc3 = 0x40037fd8;
__mulsf3 = 0x40037960;
__mulsi3 = 0x400558c0;
__mulvdi3 = 0x4003c548;
__mulvsi3 = 0x4003c530;
__nedf2 = 0x40037d40;
__negdf2 = 0x40037b38;
__negdi2 = 0x40055b80;
__negsf2 = 0x4003b9c8;
__negvdi2 = 0x4003c664;
__negvsi2 = 0x4003c644;
__nesf2 = 0x40037a0c;
__nsau_data = 0x3ff07430;
__paritysi2 = 0x4003c730;
__popcountdi2 = 0x4003c6d8;
__popcountsi2 = 0x4003c6a0;
__popcount_tab = 0x3ff07430;
__powidf2 = 0x40037f74;
__powisf2 = 0x40037f34;
__subdf3 = 0x4003beb0;
__subsf3 = 0x4003bad8;
__subvdi3 = 0x4003c4ec;
__subvsi3 = 0x4003c4c8;
__truncdfsf2 = 0x4003c35c;
__ucmpdi2 = 0x40037ed8;
__udivdi3 = 0x40056160;
__udivmoddi4 = 0x40039140;
__udivsi3 = 0x400558d8;
__udiv_w_sdiv = 0x40039138;
__umoddi3 = 0x400563e4;
__umodsi3 = 0x400558e0;
__umulsidi3 = 0x400558e8;
__unorddf2 = 0x40037e8c;
__unordsf2 = 0x40037b10;

View file

@ -0,0 +1,17 @@
/**
* These are the .bss/.data symbols used by newlib functions present in ESP32S3 ROM.
* See also esp32s3.rom.newlib-funcs.ld for the list of general newlib functions.
*
* Unlike other ROM functions which declare weak symbols using PROVIDE,
* newlib related functions are exported using assignment, which declare strong symbols.
*
* Note: These ROM data are always linked instead of the ones provided by libc.a.
*/
_ctype_ = 0x3ff0732c;
__default_global_locale = 0x3ff071c0;
_global_impure_ptr = 0x3fcefcdc;
__global_locale_ptr = 0x3fcefccc;
_PathLocale = 0x3fcefcd0;
__sf_fake_stderr = 0x3ff0c524;
__sf_fake_stdin = 0x3ff0c564;
__sf_fake_stdout = 0x3ff0c544;

View file

@ -0,0 +1,129 @@
/**
* These are the newlib functions present in ESP32S3 ROM.
* See also esp32s3.rom.newlib-data.ld for the list of .data/.bss symbols used by these functions,
* See also esp32s3.rom.newlib-nano.ld for "nano" versions of printf/scanf family of functions.
*
* Unlike other ROM functions which declare weak symbols using PROVIDE,
* newlib related functions are exported using assignment, which declare strong symbols.
*
* Note: These ROM functions are always linked instead of the ones provided by libc.a.
*/
abs = 0x40032344;
__ascii_mbtowc = 0x40039ec4;
__ascii_wctomb = 0x40033cb0;
__assert = 0x40054a5c;
__assert_func = 0x40054a30;
atoi = 0x40032984;
_atoi_r = 0x40032994;
atol = 0x400329ac;
_atol_r = 0x400329bc;
bzero = 0x40039d84;
_cleanup_r = 0x40054a6c;
creat = 0x40039d48;
div = 0x4003234c;
fclose = 0x40054e9c;
_fclose_r = 0x40054da4;
fflush = 0x40033fd8;
_fflush_r = 0x40033f50;
__fp_unlock_all = 0x40054cd4;
__fputwc = 0x40033b2c;
fputwc = 0x40033c40;
_fputwc_r = 0x40033bc0;
_fwalk = 0x40056670;
_fwalk_reent = 0x400566b0;
isalnum = 0x40039d94;
isalpha = 0x40039da4;
isascii = 0x4005546c;
_isatty_r = 0x40039d5c;
isblank = 0x40039db4;
iscntrl = 0x40039dd4;
isdigit = 0x40039dec;
isgraph = 0x40039e24;
islower = 0x40039e04;
isprint = 0x40039e3c;
ispunct = 0x40039e50;
isspace = 0x40039e68;
isupper = 0x40039e80;
__itoa = 0x40032938;
itoa = 0x40032974;
labs = 0x40032370;
ldiv = 0x40032378;
__locale_ctype_ptr = 0x40034050;
__locale_ctype_ptr_l = 0x40034048;
__locale_mb_cur_max = 0x40034030;
longjmp = 0x400322d0;
_mbtowc_r = 0x40039e9c;
memccpy = 0x40039ee8;
memchr = 0x40039f5c;
memcmp = 0x40055480;
memcpy = 0x40055528;
memmove = 0x40055620;
memrchr = 0x40039ff8;
memset = 0x40055710;
qsort = 0x4003239c;
rand_r = 0x4003a170;
__sclose = 0x40054d90;
__seofread = 0x40054d1c;
setjmp = 0x4003226c;
setlocale = 0x40034068;
_setlocale_r = 0x40033ffc;
__sflush_r = 0x40033dc8;
__sfmoreglue = 0x40054ab4;
__sfp = 0x40054bdc;
__sfp_lock_acquire = 0x40054c8c;
__sfp_lock_release = 0x40054c98;
__sfvwrite_r = 0x40033674;
__sinit = 0x40054af4;
__sinit_lock_acquire = 0x40054ca4;
__sinit_lock_release = 0x40054cb0;
__smakebuf_r = 0x40033d28;
srand = 0x4003a094;
__sread = 0x40054cec;
__sseek = 0x40054d5c;
strcasecmp = 0x4003a1bc;
strcasestr = 0x4003a850;
strcat = 0x4003aba8;
strchr = 0x4003abec;
strcmp = 0x4003acd8;
strcoll = 0x4003adfc;
strcpy = 0x4003ae10;
strcspn = 0x4005575c;
strdup = 0x4003aea0;
_strdup_r = 0x4003aeb4;
strlcat = 0x4003aed4;
strlcpy = 0x40055798;
strlen = 0x4003af3c;
strlwr = 0x4003afa0;
strncasecmp = 0x4003afd0;
strncat = 0x4003b028;
strncmp = 0x4003b088;
strncpy = 0x4003b178;
strndup = 0x4003b254;
_strndup_r = 0x4003b268;
strnlen = 0x400557d8;
strrchr = 0x4003b2b8;
strsep = 0x4003b2e4;
strspn = 0x4005580c;
strstr = 0x4003b674;
__strtok_r = 0x40055848;
strtok_r = 0x400558a4;
strtol = 0x40032b14;
strtol_l = 0x40032afc;
_strtol_r = 0x40032ad8;
strtoul = 0x40032c84;
strtoul_l = 0x40032c6c;
_strtoul_r = 0x40032c48;
strupr = 0x4003b8bc;
__swbuf = 0x40033a34;
__swbuf_r = 0x4003396c;
__swhatbuf_r = 0x40033cd4;
__swrite = 0x40054d24;
__swsetup_r = 0x40033a48;
toascii = 0x400558b8;
tolower = 0x4003b990;
toupper = 0x4003b9ac;
__utoa = 0x400321f4;
utoa = 0x4003225c;
wcrtomb = 0x40033618;
_wcrtomb_r = 0x400335c0;
_wctomb_r = 0x40033c88;

View file

@ -0,0 +1,28 @@
/**
* These are the printf/scanf related newlib functions present in ESP32S3 ROM.
* These functions are compiled with newlib "nano" format option.
* As such, they don't support 64-bit integer formats.
* Floating point formats are supported by setting _printf_float and
* _scanf_float entries in syscall table. This is done automatically by startup code.
*
* See also esp32s3.rom.newlib-data.ld for the list of .data/.bss symbols used by newlib functions.
* See also esp32s3.rom.newlib-funcs.ld for the list of general newlib functions.
*
* Unlike other ROM functions which declare weak symbols using PROVIDE,
* newlib related functions are exported using assignment, which declare strong symbols.
*
* Note: These ROM functions are always linked instead of the ones provided by libc.a.
*/
_printf_common = 0x40033114;
_printf_i = 0x40033214;
__sfputs_r = 0x40032d44;
fiprintf = 0x40032cdc;
_fiprintf_r = 0x40032cac;
__fp_lock_all = 0x40054cbc;
fprintf = 0x40032cdc;
_fprintf_r = 0x40032cac;
__sprint_r = 0x40032d90;
vfiprintf = 0x400330f4;
_vfiprintf_r = 0x40032df8;
vfprintf = 0x400330f4;
_vfprintf_r = 0x40032df8;

View file

@ -0,0 +1,24 @@
/**
* SPI flash driver function, compatibility names.
*/
PROVIDE ( g_rom_spiflash_dummy_len_plus = dummy_len_plus);
PROVIDE ( g_ticks_per_us_pro = g_ticks_per_us );
PROVIDE ( g_rom_flashchip = SPI_flashchip_data );
PROVIDE ( g_rom_spiflash_chip = SPI_flashchip_data );
PROVIDE ( esp_rom_spiflash_config_param = SPIParamCfg );
PROVIDE ( esp_rom_spiflash_read_statushigh = SPI_read_status_high );
PROVIDE ( esp_rom_spiflash_read_user_cmd = SPI_user_command_read );
PROVIDE ( esp_rom_spiflash_write = SPIWrite );
PROVIDE ( esp_rom_spiflash_read = SPIRead );
PROVIDE ( esp_rom_spiflash_write_encrypted_disable = SPI_Write_Encrypt_Disable );
PROVIDE ( esp_rom_spiflash_write_encrypted_enable = SPI_Write_Encrypt_Enable );
PROVIDE ( esp_rom_spiflash_config_clk = SPIClkConfig );
PROVIDE ( esp_rom_spiflash_select_qio_pins = SelectSpiQIO );
PROVIDE ( esp_rom_spiflash_unlock = SPIUnlock );
PROVIDE ( esp_rom_spiflash_erase_sector = SPIEraseSector );
PROVIDE ( esp_rom_spiflash_erase_block = SPIEraseBlock );
PROVIDE ( esp_rom_spiflash_wait_idle = SPI_Wait_Idle );
PROVIDE ( esp_rom_spiflash_config_readmode = SPIReadModeCnfig );
PROVIDE ( esp_rom_spiflash_erase_block = SPIEraseBlock );
PROVIDE ( esp_rom_spiflash_write_encrypted = SPI_Encrypt_Write );

View file

@ -16,7 +16,6 @@
#define _ROM_RSA_PSS_H_
#include <stdint.h>
#include "rsa_pss.h"
#define ETS_SIG_LEN 384 /* Bytes */
#define ETS_DIGEST_LEN 32 /* SHA-256, bytes */