cancel
Showing results for 
Search instead for 
Did you mean: 

protected files change

dungeonlords789
Senior III

I use cubeIDE 1.5.1. I download standart example BLE_HeartRateFreeRTOS. It has got file app_conf.h In cubeIDE it has got strange icon. In app_conf.h I change CFG_LED_SUPPORTED to 1 and save. Clean and Build. But app_entry.c still thinks that define is 0... I also check app_conf.h by windows explorer.exe, app_conf.h isn't protected.0693W000006HwDLQA0.png

6 REPLIES 6

Hello

I don't use BLE. It seems like somewhere else CFG_LED_SUPPORTED is undefined (#undef) or app_conf.h is not included in app_entry.c

Pavel A.
Evangelist III

Rebuild index in Eclipse

0693W000006I4ObQAK.png 

-- pa

Now it works. But it is not normal to do extra things for define updating, isn't it?

@mattias norlander​ 

mattias norlander
ST Employee

Hi,

[Made a correction/update to this post]

Yes the behavior is unfortunately expected. It is a drawback of how example projects are packaged today.

If you look into any example project, you will find that only a few number of files are unique for each example/compiler: main.c/h, stm32X_hal_conf.h, stm32X_hal_it.c/h, ...

The rest of the files, for example: HAL/LL drivers as well as all middleware files are not stored INSIDE the example projects.

  • Most c-files are linked to the project (such links are defined in .project-file)
  • Most h-files are typically not linked to the project at all. They are only setup as include directories to the toolchain pre-processor

As @Pavel A.​ suggests, you can do an index re-build to make sure that Eclipse is aware of the changes. BUT - maybe you later make a change in a header-file, and since the header-file is not part of the .project-file, Eclipse will not keep track and re-scan that header file. As a consequence you may soon again find that the editor (and other Eclipse features) is not working as intended.

The only way to make Eclipse aware is to make sure that files that the project depend on are managed properly by Eclipse. This would either mean that they are physically inside the project. Not the case for example projects because firmware packages would be huge... Or that the .project-file specifies ALL (c/h) files that the project depends on. Also not done in the example projects of today. Ticket exist for this, thanks for reporting!

"Ticket exist for this, thanks for reporting!"

Any news @mattias norlander​ ?

I also suggest ST provide examples for CubeIDE with ioc file for code generator. For example there are very modern stm32wb. Why STM32Cube_FW_WB_V1.11.0\Projects\P-NUCLEO-WB55.Nucleo\Applications\BLE\BLE_MeshLightingProvisioner doesn't contains cubeIDE project? The best way if user can regenerate code using cubeMX. But now it doesn't work. I try regenerate code for BLE_HealthThermometer and there are a lot of errors after regeneration.

mattias norlander
ST Employee

@dungeonlords789​ ,

Unfortunately no news on this. It has been an issue for many years. Multiple teams and tools are involved. Certainly not easy to solve short-term.

About the missing example project. I am double-checking internally to see if there is a good justification that this specifiec example it missing for CubeIDE, or if this is just a human-error. To try to solve the long-term issue of missing examples, we have now extended our validation script to check that each example exist for each toolchain. Let's see if we can improve...