2024-09-03 07:37 AM
I will attach my project below if you want the code for reference.
I am making a HMI for construction workers for reference. Although my screen does everything I've needed thus far it has been hard to organize my code because I keep running into the error of "No such file or directory" when I begin to go from a large file into a more organized file.
Due to the nature of my project I do not know if the BSP.h file is generated for everyone. So I will try to be as general as possible. I want to take a function in a file found in Code/Inc/#organizedFileName# I want to include and run this function in a View.cpp file found in, TouchGFX/gui/src/#screenName#. When I leave the file in Code/Inc/#organizedFileName# I get the error "No such file or directory". When I take the file out into Code/Inc I do not get this error. My knowledge tells me it's a compilation path issue but I do not know how to fix that. For now I have been running most variable and function declaration through main.h(THIS IS NOT A GOAL OF MINE). Once I can fix this path issue I want to clean up my code.
Any advice and knowledge would be greatly appreciated.
Code in drop box https://www.dropbox.com/home
2024-09-03 07:46 AM
Have you correctly set your Include Paths ?
2024-09-03 11:23 AM
I think I have set it correctly, I do #include "main.h" for example and that will work. For this specific file I called it #include bsp.h and that gave me an error only when it was in a level deeper than Core/Inc. If it is in Core/Inc/BSP it will not be recognized. I event did the whole path to make sure by doing #include <Core/Inc/BSP/bsp.h>. I attempted to substitute the < for a ", that did not work either. Does this have anything to do with whatever directory is supposed to be higher than Core?