Skip to content

Commit

Permalink
ESP32: enable jump tables for libAtomVM for xtensa devices
Browse files Browse the repository at this point in the history
Starting from a certain point jump tables are disabled since they are
not compatible with moving code to IRAM.
Enable that again for libAtomVM since we are not moving code to IRAM for
it.

See also:
espressif/esp-idf@c02aa6d

Signed-off-by: Davide Bettio <davide@uninstall.it>
  • Loading branch information
bettio committed Feb 28, 2024
1 parent 84edf91 commit be15f06
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/platforms/esp32/components/libatomvm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,7 @@ add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/../../../../libAtomVM" "libAtomVM"
target_link_libraries(${COMPONENT_LIB}
INTERFACE libAtomVM "-u platform_nifs_get_nif" "-u platform_defaultatoms_init")

if ((IDF_VERSION_MAJOR GREATER_EQUAL 5) AND (${IDF_TARGET} MATCHES "^esp32$|esp32s2|esp32s3"))
target_compile_options("libAtomVM" PRIVATE "-fjump-tables -ftree-switch-conversion")
endif ()
target_compile_features(${COMPONENT_LIB} INTERFACE c_std_11)

0 comments on commit be15f06

Please sign in to comment.