Headers keep getting included in the project if used FreeRTOS template on AtmelStudio

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have used the FreeRTOS demo called FREERTOS_OLED1_XPRO_EXAMPLE from ASF to start away with FreeRTOS on SAMD21.

My project has advanced and moved away from the demo it used to be and I never needed the OLED part of the project but the main structure of FreeRTOS. Now, anytime I add a driver from ASF or remove one, two include files below keep getting added back to asf.h file. And considering that I have removed these two headers from the project long time ago, project goes to halt and doesn't compile.

// From module: User I/O driver for FreeRTOS demo
#include <cdc.h>
#include <oled1.h

Removing these two lines manually is a super easy thing to do but I am wondering where these two includes are coming from and getting generated? Is there a source somewhere which could be tweeked to stop the generation of these two lines. In the future I might want to use this on my favor and add include files to such places.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What does it matter if additional headers ARE included? If C is written properly a #include will add no data or code so you can happily #include even "dead" headers. What actually matters is whether calls are made to or data is accessed in the .c files that the .h may be documenting. That is when some additional flash usage may occur.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

well when the code has the chunk below added to it

 

// From module: User I/O driver for FreeRTOS demo
#include <cdc.h>
#include <oled1.h

 

and none of `cdc.h` and `oled1.h` exist anymore, the project would no compile. :)

Plus, I don't like something adding pieces of code to my project that I don't have any control over.

 

As I mentioned, this is easy as hitting "D" four times on VsVim to get rid of but I want to understand which piece of code is responsible of generating these two lines over and over again.

 

 

Last Edited: Tue. Mar 21, 2017 - 12:42 AM