cancel
Showing results for 
Search instead for 
Did you mean: 

Issues Enabling SPI1 on Nucleo-H7S3L8 (Template_XIP Project) – macOS Environment

oalselwi
Associate II

Hello,

I'm working with the Nucleo-H7S3L8 board in a macOS development environment, and so far, the experience has been quite frustrating. The documentation is inconsistent, scattered across multiple sources, and often inaccurate. This has made development more difficult than it should be.

For context:
I’ve previously worked with the Nucleo-F401RE, and the development experience was significantly smoother — configuration was straightforward, and documentation was far more coherent.

Here's the issue I'm currently facing:

I imported the Template_XIP project into STM32CubeIDE. The project compiled, uploaded to the board successfully, and I was able to debug without any issues. However, after attempting to enable SPI1 using both STM32CubeIDE and STM32CubeMX, and generating code based on those settings, I encountered the following build error in the Template_XIP_Appli project:

 

/Users/xxxxxx/STM32Cube/Repository/STM32Cube_FW_H7RS_V1.2.0/Projects/NUCLEO-H7S3L8/Templates/Template_XIP/Appli/Src/main.c:201:(.text.MX_SPI1_Init+0x96): undefined reference to `HAL_SPI_Init'

/Users/xxxxxx/STM32Cube/Repository/STM32Cube_FW_H7RS_V1.2.0/Projects/NUCLEO-H7S3L8/Templates/Template_XIP/Appli/Src/stm32h7rsxx_it.c:253:(.text.SPI1_IRQHandler+0x6): undefined reference to `HAL_SPI_IRQHandler'

make: *** [makefile:66: Template_XIP_Appli.elf] Error 1

Screenshot 2025-07-21 at 17.06.21.png



From my understanding, HAL_SPI_Init and related functions should be automatically generated when enabling SPI1 in STM32CubeMX/IDE. I’ve tried the following:

  • Regenerating code multiple times

  • Running both STM32CubeIDE and STM32CubeMX as administrator

  • Verifying project settings and middleware configurations

  • Searching extensively across ST documentation, forums, and community discussions

Unfortunately, I’ve found no solution after two full days of trying. It's unclear whether this is a problem with the project template, the HAL package, or the toolchain integration.

I would deeply appreciate expert guidance on:

  1. How to properly enable and use SPI1 in the Template_XIP_Appli project.

  2. Whether the Nucleo-H7S3L8 board currently supports common peripherals like SPI and I2C in XIP mode.

  3. Why a major company like ST would release a product with documentation and software support in such a fragmented state.

At this point, I’m seriously questioning whether reliable SPI/I2C connectivity is even possible on this board without deep manual intervention. Any clarification or official insights would be extremely helpful.

Thank you in advance.

 

2 REPLIES 2
oalselwi
Associate II

 

Hi everyone,
Just a quick follow-up to my previous post.

I recently got access to a Dell laptop running Windows 10 and set up my STM32 development environment. I installed STM32CubeIDE, STM32CubeMX, and STM32CubeProgrammer, then imported the Template_XIP project for the NUCLEO-H7S3L8 board. Everything worked fine at first — the project compiled, uploaded to the board, and ran without any issues.

The problem started when I tried to enable SPI1 using STM32CubeMX. I ran the tool as administrator, made the necessary changes, regenerated the code, and attempted to build the project. Unfortunately, I keep running into the same error every time, as mentioned in my previous blog post. I’ve double-checked everything multiple times, but the issue persists.

main.c:167:(.text.MX_SPI1_Init+0x96): undefined reference to `HAL_SPI_Init'
collect2.exe: error: ld returned 1 exit status
make: *** [makefile:66: Template_XIP_Appli.elf] Error 1
"make -j8 all" terminated with exit code 2. Build might be incomplete.

oalselwi_1-1753298318052.png

On top of that, the documentation for the NUCLEO-H7S3L8 still doesn’t include a proper pinmap. Unlike other boards like the NUCLEO-F401RE, there’s no clear, visual reference (see picture) 

Screenshot 2025-07-23 at 21.19.28.png

Can someone from ST please respond or provide guidance? Getting SPI to work on this board shouldn’t be this difficult.

Thanks.

 

oalselwi
Associate II

Hi everybody, 


Just a quick follow-up to my previous post.  
The STM32CubeIDE/STM32CubeMX does not generate the stm32h7rsxx_hal_spi.c and the stm32h7rsxx_hal_spi_ex.c

can anybody help ?

Screenshot 2025-07-25 at 02.01.27.png