2024-08-09 07:28 AM
I added a Linked Resource and tested it on an include line, although the path is the same, it fails.
I have zero idea why, does it need another syntax?
Path variable:-> REPOSITORY_LOC set as C:\Users\Dev\STM32Cube\Repository
With GCC Copiler Include Paths this fails:- ${repository_loc}/STM32Cube_FW_H7_V1.11.1/Drivers/STM32H7xx_HAL_Driver/Inc
but this works:-
C:/Users/Dev/STM32Cube/Repository/STM32Cube_FW_H7_V1.11.1/Drivers/STM32H7xx_HAL_Driver/Inc
I tried with '\' and '/' no difference.
Why would this cause these errors:-
C:/Users/Dev/STM32Cube/Repository/STM32Cube_FW_H7_V1.11.1/Drivers/CMSIS/Device/ST/STM32H7xx/Include/stm32h7xx.h:282:11:
fatal error: stm32h7xx_hal.h: No such file or directory
282 | #include "stm32h7xx_hal.h"
| ^~~~~~~~~~~~~~~~~
2024-08-09 07:35 AM
@Robmar wrote:
C:/Users/Dev/STM32Cube/Repository/STM32Cube_FW_H7_V1.11.1/Drivers/CMSIS/Device/ST/STM32H7xx/Include/stm32h7xx.h:282:11:
fatal error: stm32h7xx_hal.h: No such file or directory
So it can't find the file stm32h7xx_hal.h.
Use the Windows File Explorer (or whatever) to find if/where that actually exists on your hard drive
2024-08-09 07:44 AM
Path variables are an Eclipse convention. Are they properly expanded before being passed to the compiler/linker? Show the full output of the Console tab so we get the full picture of what's going on. I doubt they're case sensitive, but that seems like an easy thing to get consistent.
2024-08-09 08:33 AM
As I wrote, with the linked path name "repository_loc" replaced with the same path text it works.
The problem is that the path name is the exact same path string, so why does it fail when the linked path "repository_loc" is used, as they are the same?
2024-08-09 08:45 AM
It all links perfectly until I add the linked resource path as indicted above and used it in an include.
Using the include path below, it throws up errors for the CMSIS directory**
${repository_loc}/STM32Cube_FW_H7_V1.11.1/Drivers/STM32H7xx_HAL_Driver/Inc
Error:-> **C:/Users/Dev/STM32Cube/Repository/STM32Cube_FW_H7_V1.11.1/Drivers/CMSIS/Device/ST/STM32H7xx/Include/stm32h7xx.h:282:11: fatal error file not found
repository_loc is set to C:\Users\Usuario\STM32Cube\Repository
If I put the include as: C:\Users\Usuario\STM32Cube\RepositorySTM32Cube_FW_H7_V1.11.1/Drivers/STM32H7xx_HAL_Driver/Inc then it all works (using same '/' or '\')