Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6341258

Browse files
agattidpgeorge
authored andcommitted
esp32/mpconfigport: Enable Zcmp opcodes for ESP32P4.
This commit enables support for Zcmp opcodes when the firmware is builtto target ESP32P4 microcontrollers.The ESP32P4 explicitly supports the Zcmp extension for reducing theamount of code needed for function prologues and epilogues (see section4.1.1.1 of the ESP32P4 datasheet).Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
1 parentec5f2bc commit6341258

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

‎ports/esp32/esp32_common.cmake‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,11 @@ set(MICROPY_TARGET ${COMPONENT_TARGET})
244244
if(CONFIG_IDF_TARGET_ARCH_XTENSA)
245245
set(MICROPY_CROSS_FLAGS -march=xtensawin)
246246
elseif(CONFIG_IDF_TARGET_ARCH_RISCV)
247-
set(MICROPY_CROSS_FLAGS -march=rv32imc)
247+
if (CONFIG_IDF_TARGET_ESP32P4)
248+
set(MICROPY_CROSS_FLAGS"-march=rv32imc -march-flags=zcmp")
249+
else()
250+
set(MICROPY_CROSS_FLAGS -march=rv32imc)
251+
endif()
248252
endif()
249253

250254
# Set compile options for this port.

‎ports/esp32/mpconfigport.h‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@
4444
#defineMICROPY_EMIT_RV32 (0)
4545
#else
4646
#defineMICROPY_EMIT_RV32 (1)
47+
#ifCONFIG_IDF_TARGET_ESP32P4
48+
#defineMICROPY_EMIT_RV32_ZCMP (1)
49+
#endif
4750
#endif
4851
#else
4952
#defineMICROPY_EMIT_XTENSAWIN (1)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp