mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
esp32c2: Support riscv floating-point library selection
This commit is contained in:
parent
03aeac1dde
commit
0580d68b69
21
Kconfig
21
Kconfig
@ -278,6 +278,26 @@ mainmenu "Espressif IoT Development Framework Configuration"
|
||||
|
||||
endchoice # assertions
|
||||
|
||||
choice COMPILER_FLOAT_LIB_FROM
|
||||
prompt "Compiler float lib source"
|
||||
default COMPILER_FLOAT_LIB_FROM_RVFPLIB if ESP_ROM_HAS_RVFPLIB
|
||||
default COMPILER_FLOAT_LIB_FROM_GCCLIB
|
||||
help
|
||||
In the soft-fp part of libgcc, riscv version is written in C,
|
||||
and handles all edge cases in IEEE754, which makes it larger
|
||||
and performance is slow.
|
||||
|
||||
RVfplib is an optimized RISC-V library for FP arithmetic on 32-bit
|
||||
integer processors, for single and double-precision FP.
|
||||
RVfplib is "fast", but it has a few exceptions from IEEE 754 compliance.
|
||||
|
||||
config COMPILER_FLOAT_LIB_FROM_GCCLIB
|
||||
bool "libgcc"
|
||||
config COMPILER_FLOAT_LIB_FROM_RVFPLIB
|
||||
depends on ESP_ROM_HAS_RVFPLIB
|
||||
bool "librvfp"
|
||||
endchoice # COMPILER_FLOAT_LIB_FROM
|
||||
|
||||
config COMPILER_OPTIMIZATION_ASSERTION_LEVEL
|
||||
int
|
||||
default 0 if COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE
|
||||
@ -418,7 +438,6 @@ mainmenu "Espressif IoT Development Framework Configuration"
|
||||
If enabled, RTL files will be produced during compilation. These files
|
||||
can be used by other tools, for example to calculate call graphs.
|
||||
|
||||
|
||||
endmenu # Compiler Options
|
||||
|
||||
menu "Component config"
|
||||
|
@ -58,7 +58,11 @@ if(target STREQUAL "linux")
|
||||
else()
|
||||
target_linker_script(${COMPONENT_LIB} INTERFACE "${target}/${ld_folder}/${target}.rom.ld")
|
||||
rom_linker_script("api")
|
||||
rom_linker_script("libgcc")
|
||||
if(CONFIG_COMPILER_FLOAT_LIB_FROM_GCCLIB)
|
||||
rom_linker_script("libgcc")
|
||||
else()
|
||||
rom_linker_script("rvfp")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
idf_build_get_property(time_t_size TIME_T_SIZE)
|
||||
|
@ -22,3 +22,7 @@ config ESP_ROM_HAS_RETARGETABLE_LOCKING
|
||||
config ESP_ROM_GET_CLK_FREQ
|
||||
bool
|
||||
default y
|
||||
|
||||
config ESP_ROM_HAS_RVFPLIB
|
||||
bool
|
||||
default y
|
||||
|
@ -11,3 +11,4 @@
|
||||
#define ESP_ROM_UART_CLK_IS_XTAL (1) // UART clock source is selected to XTAL in ROM
|
||||
#define ESP_ROM_HAS_RETARGETABLE_LOCKING (1) // ROM was built with retargetable locking
|
||||
#define ESP_ROM_GET_CLK_FREQ (1) // Get clk frequency with rom function `ets_get_cpu_frequency`
|
||||
#define ESP_ROM_HAS_RVFPLIB (1) // ROM has the rvfplib
|
||||
|
2
tools/test_apps/system/build_test/sdkconfig.ci.rvfplib
Normal file
2
tools/test_apps/system/build_test/sdkconfig.ci.rvfplib
Normal file
@ -0,0 +1,2 @@
|
||||
CONFIG_IDF_TARGET="esp32c2"
|
||||
CONFIG_COMPILER_FLOAT_LIB_FROM_GCCLIB=y
|
Loading…
Reference in New Issue
Block a user