Skip to main content
Visitor
Sep 28, 2026 7:59 PM UTC
Question

STM32CubeMX 6.17.0/6.18.1 - NullPointerException in RIFService.getExtraTableModel when enabling SDMMC2 as TF-A_BL2 boot device (STM32MP215)

MCU: STM32MP215DAN3 (custom board, STM32MP2 series)
STM32CubeMX versions tested: 6.17.0 and 6.18.1 — identical crash in both
STM32Cube FW_MP2: V1.3.1

Steps to reproduce:

  1. Open a working project where SDMMC1 is the boot device (A35 ROM + A35S(TF-A_BL2) runtime context checked)
  2. In SDMMC1 Mode and Configuration: uncheck A35 ROM and A35S(TF-A_BL2)
  3. In SDMMC2 Mode and Configuration: check A35 ROM and A35S(TF-A_BL2) (making SDMMC2/eMMC the new boot device instead of the SD card)
  4. Save project, click Generate Code

Result: Code generation crashes with the following exception, reproducible 100% of the time with this exact configuration:

 

java.lang.NullPointerException: Cannot invoke "javax.swing.table.TableModel.getRowCount()" because "RifIPExtraTableModel" is null
    at com.st.microxplorer.mcu.rif.RIFService.getExtraTableModel(RIFService.java:341)
    at com.st.microxplorer.codegenerator.McuDataModel.getRIFInfo(McuDataModel.java:824)
    at com.st.microxplorer.codegenerator.McuDataModel.initMcuData(McuDataModel.java:334)
    at com.st.microxplorer.codegenerator.McuDataModel.<init>(McuDataModel.java:181)
    at com.st.microxplorer.codegenerator.CodeGenerator.generateCode(CodeGenerator.java:1562)
    at com.st.microxplorer.plugins.projectmanager.engine.ProjectBuilder.generateCode(ProjectBuilder.java:3469)
    at com.st.microxplorer.plugins.projectmanager.engine.ProjectBuilder.createCode(ProjectBuilder.java:2272)
    at com.st.microxplorer.plugins.projectmanager.engine.ProjectBuilder.createProject(ProjectBuilder.java:821)
    at com.st.microxplorer.plugins.projectmanager.engine.GenerateProjectThread.run(GenerateProjectThread.java:61)

 

What I've already ruled out:

  • Not caused by a stale/incomplete local database (re-downloaded MCU package files, same result)
  • Not caused by not visiting the RIF configuration panel before generating (visited it, same result)
  • Not caused by BOOTDEVICE_LABELS in openconnect.inc being stale (updated it from sdcard to emmc per the file's own documented table, same result)
  • Not version-specific (reproduced identically in 6.17.0 and 6.18.1)
  • Reverting the boot device config back to SDMMC1 (original) generates successfully every time — the crash only occurs with SDMMC2 as boot device

Possible lead: In the generated optee-os RIF file, I noticed the RIMU section treats the current boot device (SDMMC1) differently from the others:

 

RIMUPROT(RIMU_ID(1), RIF_UNUSED, RIF_NSEC, RIF_PRIV, RIF_CIDSEL_P) /* RIMU IP = SDMMC1 */
RIMUPROT(RIMU_ID(2), RIF_CID1,   RIF_NSEC, RIF_PRIV, RIF_CIDSEL_M) /* RIMU IP = SDMMC2 */

 

Wondering if the code generator is supposed to swap this CIDSEL_P/RIF_UNUSED role to the new boot device and is failing/nulling out somewhere in that recomputation. Any insight into what RifIPExtraTableModel is supposed to be populated from would help me work around this.

1 reply

ST Technical Moderator
Oct 22, 2026 3:37 PM UTC

Hello ​@nadolny 

Could you provide an IOC illustrating the issue in order to investigate further the problem?

KR, Souhaib

To give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.