Skip to main content
lame_stmr
Associate III
July 31, 2025
Solved

'IPCC_C2_RX_C2_TX_IRQn' undeclared (first use in this function); did you mean 'IPCC_C1_TX_IRQn'? stm32wl

  • July 31, 2025
  • 2 replies
  • 817 views

Hello everyone,

Newbie to the whole stm environment here but am trying to learn. I'm developing on the NUCLEO-WL55JC1.

I've been trying to create a dual core communication design using IPCC. I started with loading the "IPCC_HalfDuplexMode_DualCore" example available in the STM32CubeWL firmware package -- which worked just fine. Moving forward, I created a new project using CubeMX from the IOC file in the example so I could develop further using that as a base. However, I keep getting this error:

'IPCC_C2_RX_C2_TX_IRQn' undeclared (first use in this function); did you mean 'IPCC_C1_TX_IRQn'? stm32wlxx_hal_msp.c /DualCoreComm_LVL1_CM0PLUS/Core/Src line 92 C/C++ Problem

The problem originates in the "stm32wlxx_hal_msp.c" file in the "HAL_IPCC_MspInit" and "...DeInit" functions at the "HAL_NVIC_SetPriority()" and "...DisableIRQ" function calls. 

Of course, the first thing I did was check if the IRQn type "IPCC_C2_RX_C2_TX_IRQn" was declared for CM0. As far as I can tell, it is in the "stm32wl55xx.h" but it is under a "#if defined(CORE_CM0PLUS)" condition and so, I went into my main.h file for CM0 and defined CORE_CM0PLUS there just to see. That took the error away and I could load both cores but the IPCC did NOT work. 

I then tried to just replace the "..Init" and "...DeInit" functions in CM0 with the ones CM4 uses to just follow the suggestion from the compiler which also loaded just fine but did NOT work. At this point, I'm lost in so many header and source files I don't really know what's up and down anymore.

In "stm32wlxx_hal_ipcc.h" all of the defines, variables, and function declarations are under a "#if defined(IPCC)" but are "crossed" out in the outline window as if they aren't initialized properly. But, IPCC also seems to be defined in "stm32wl55xx.h".

I've tried cross checking all (maybe i missed some?) the files used by the example and what my project has available but see no relevant differences. What am I missing here, am I an *** (likely)? Please help. Thank you

Best answer by lame_stmr

Hey, so I just got back around to testing this again and I misremembered the fix. It wasn't related to the includes but rather the Preprocessor symbols for the GCC compiler. What I ended up doing was right clicking each core -> Properties->C/C++ Build (Press Settings in the drop-down) -> MCU/MPU GCC Compiler -> Preprocessor-> match your project defines on the right with the example project's defines exactly.

For my CM0 core, I had the core defined as "CORE_CM0+" but in the example it was "CORE_CM0PLUS" which is ridiculous but I changed that and it worked. I also removed the "USE_NUCLEO_64" define in both CM4 and CM0 as I didn't see those in the example defines. Hope this works for you!

2 replies

STTwo-32
Technical Moderator
September 11, 2025

Hello @lame_stmr 

Could you please give more details about your configuration, what are the problems you are facing and what is the current states of your development. If it works fine, please post the steps you followed.

Best Regards.

STTwo-32

lame_stmr
lame_stmrAuthor
Associate III
September 11, 2025

Hello,

Thank you for the reply. Work has taken me away from stm development for the meantime but the problem was preprocessor defines. 

What I ended up doing was right clicking each core -> Properties->C/C++ Build (Press Settings in the drop-down) -> MCU/MPU GCC Compiler -> Preprocessor-> match your project defines on the right with the example project's defines exactly.

For my CM0 core, I had the core defined as "CORE_CM0+" but in the example it was "CORE_CM0PLUS" which is ridiculous but I changed that and it worked. I also removed the "USE_NUCLEO_64" define in both CM4 and CM0 as I didn't see those in the example defines.

Associate II
September 12, 2025

I would appreciate it if you could let me know how you solved it. I am having the same issue right now

lame_stmr
lame_stmrAuthorBest answer
Associate III
September 12, 2025

Hey, so I just got back around to testing this again and I misremembered the fix. It wasn't related to the includes but rather the Preprocessor symbols for the GCC compiler. What I ended up doing was right clicking each core -> Properties->C/C++ Build (Press Settings in the drop-down) -> MCU/MPU GCC Compiler -> Preprocessor-> match your project defines on the right with the example project's defines exactly.

For my CM0 core, I had the core defined as "CORE_CM0+" but in the example it was "CORE_CM0PLUS" which is ridiculous but I changed that and it worked. I also removed the "USE_NUCLEO_64" define in both CM4 and CM0 as I didn't see those in the example defines. Hope this works for you!

Associate II
September 15, 2025

Thank you. This part has been resolved.