cancel
Showing results for 
Search instead for 
Did you mean: 

Nightmare on Linked Resource street!

Robmar
Senior III

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"

| ^~~~~~~~~~~~~~~~~

13 REPLIES 13
Pavel A.
Evangelist III

If you only want to replace one username to another, you already named your solution. it does not require changes in the project. For more thorough cure of include and other paths in project, consider using Build variables. These can be defined in GUI, no manual hacking needed. Their use are similar to macros in makefiles.

 

Sure, great hack, so all our developers are forced to change (or add a matching) username for every STM32CubeIDE project they import! Great! So STM==utter rubbish dev tools!

 

So you're confirming that linked resources just doesn't work, here we are in 2023 just like back in 1983!

No offer from STM to fix this bug, and now you say to use Build variables, without any suggestion of how a build variable could replace a link resource.

I've not seen build variables used in the include dialog box, is that even possible?

So you're confirming that linked resources just doesn't work,

Linked resources work - if done correctly. This are part of core Eclipse. ST should have made a non-trivial effort to break it )) But Eclipse CDT could have better integration of linked folders and build variables. Maybe I'd try to fix it when I retire. Sure it will wait for me;)

I've not seen build variables used in the include dialog box, is that even possible?

Just as all these ${variable} names. Just note that build variables belong to project configuration. Must be copied (or customized) in each configuration. Linked folders/files are global for all configurations (simply because they are in  .project  rather than in .cproject file)

 

 

When you retire ST may have virtually left the MCU market apart from simple and specialied MCUs for the auto industry.

ST staff, MCU dept, manager in particular, are sleeping on the job as industrial ESP and Raspberry products are rapidly taking the market.