Loading...
 

Zephyr project on STM32

   Zephyr Workbench, a VSCode extension to manage Zephyr on STM32.
It enables users to easily create, develop, and debug Zephyr applications.
Main features:
  • Install host dependencies.
  • Import toolchain and SDK.
  • Create, configure, build and manage apps.
  • Debug STM32.
You can directly download it from the VSCode marketplace
For more details, visit the Zephyr Workbench

System Workbench for STM32


Solved - Adding a Source Folder Changes it to Static Library and creates VFP error

Hi,
I’ve got several pairs of *.c *.h files that i use as my custom libraries that i copy into my project’s folder. I then proceed to add it as a source folder as given inthe FAQ.

However, instead of showing a ‘C’ symbol for source folder, it displays a pinned icon like in a static library upon compiling. After compiling i get VFP errors due to different FPU setting used for this particular folder, which i cant change!

How do I add a source folder and make sure this doesnt happen? How to make ac6 realize this is NOT a static lib?

Dear Shreeyak
Here is the way I am using to add folders/files into my project’s folder :

  • Using Windows Explorer, I copied a folder containing several files;
  • I pasted it in my project’s folder (in the Project Explorer window of SW4STM32);
  • Right-click to open the build properties dialog for this new folder (folder >> Properties >> C/C++ Build) and uncheck the Exclude resource from build checkbox;


Using these steps, the new files are properly compiled.
Note : the new files are part of the project. The new folder is not seen as a library.
The new code will be included in the final object code, as the linked does not know how to choose what is really needed.

I made trials but I cannot reproduce the issue you faced, so feel free to give more details :

  • How do you copy the files into your project’s folder?
  • How do you add it as a source folder?

I use Git to manage my project. I set up my custom libraries as a subtree.
Moment i pull in my subtree, git adds the files into the root directory of the project.
I use the method mentioned in the FAQ to add my folder ( File->New->Source Folder ) which worked perfectly well earlier.

I tried checking and unchecking the “exclude from build” option in folder properties as mentioned, but that didnt help.

However, I deleted the files and added them again as given by you above, but the folder did not get added to the include path. I simply added the path in Project->Properties->C/C++ Build->Settings->Tool Settings-> MCU GCC Compiler->Includes.
That did the trick and now my files are compiling properly. I dont know why it was giving an error earlier.

Sw4stm32 Add Include Path

Thank you for helping out, this method is working now. Do you also have to manually add the include path in properties like i have to do?


Edited the post’s Title

Hello Shreeyak,
I do not use GIT. I will make a trial.
Any way, No, I didn’ t add any include path.
Usually, I force the update of the indexer : Right-click on your project >> index >> Rebuild;


 

Newest Forum Posts

  1. Монтаж камина с грилем в Москве - установка и барбекю by KpddomErorb, 2025-05-10 18:28
  2. SPI on Nucleo_STMH533RE by royjamil, 2025-05-04 20:13
  3. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-25 07:37
  4. SPI on Nucleo_STMH533RE by royjamil, 2025-03-23 11:31
  5. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-23 09:33
  6. Configuring DMA for ADC in SW? by sam.hodgson, 2025-03-04 12:58
  7. Build a project in "release" mode by info@creosrl.it, 2025-02-20 18:12
  8. Build a project in "release" mode by info@creosrl.it, 2025-02-20 17:05
  9. Build a project in "release" mode by tang, 2025-02-20 10:36
  10. Build a project in "release" mode by info@creosrl.it, 2025-02-19 17:35

Last-Modified Blogs