cancel
Showing results for 
Search instead for 
Did you mean: 

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

lame_stmr
Associate II

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

1 ACCEPTED SOLUTION

Accepted Solutions

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.

View solution in original post

4 REPLIES 4
STTwo-32
ST Employee

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

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

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.

haenes_joo
Associate

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

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!