Add the fix-psram-cache-issue module only for esp32 chip

This commit is contained in:
Alex Duchesne 2025-07-25 23:35:28 -04:00
parent 88fd24fab5
commit 370ac66a63
2 changed files with 7 additions and 2 deletions

View File

@ -1,7 +1,10 @@
set(COMPONENT_SRCDIRS ".")
set(COMPONENT_ADD_INCLUDEDIRS ".")
register_component()
rg_setup_compile_options(-O2 -Wno-error=format -Wno-error=char-subscripts -mfix-esp32-psram-cache-issue)
if(IDF_TARGET STREQUAL "esp32")
component_compile_options(-mfix-esp32-psram-cache-issue)
endif()
rg_setup_compile_options(-O2 -Wno-error=format -Wno-error=char-subscripts)
# add_custom_command(OUTPUT images.c
# COMMAND python ${COMPONENT_DIR}/gen_images.py

View File

@ -6,6 +6,9 @@ register_component()
# The PSRAM cache bug seems responsible for very odd bugs that I spent way too much time
# trying to debug... In retro-go the fix is disabled because of the huge performance overhead
# but I guess we'll have to live with it in at least the prboom-go module...
if(IDF_TARGET STREQUAL "esp32")
component_compile_options(-mfix-esp32-psram-cache-issue)
endif()
rg_setup_compile_options(
-Wno-error=address
@ -13,7 +16,6 @@ rg_setup_compile_options(
-Wno-format-overflow
-Wno-char-subscripts
-Wno-missing-field-initializers
-mfix-esp32-psram-cache-issue
-DHAVE_CONFIG_H
-O2
)