Hi @application_ninja ,
create .c files in "custom" folder with your favorite editor and they will be built with your application (custom.mk takes care of it).
Best regards,
Paolo
I've tried this, I want to add folders, not just .c files. Adding folders doesn't work.
You should then modify the custom.mk makefile file to build subfolders too.
My question is how to use the IDE, not outside the IDE. Anyone can manually manipulate the "make" files to compile whatever they need, but I want to use the IDE to build an interface with sub-folders / files / structure, etc...
Hi,
This is AE reply:
You have two application scenarios to add your custom code in GUI Guider.
1. For example, there is a screen named scrHome in you design. You want to add some initialization code when this screen is initialized. You can do it like this
then you reopen or update your project, you can see the new code are all added to the project like this:
2. For example, you have a button and you hope when this button is clicked, you can execute your custom code. You can do it like this:
1.Place a button in the editor
2.Add a clicked event
3. Add your code with method described in scenario 1, your code will be added into the event handler
4. If your code in event handler has a function call, you can implement it in custom.c located in the custom folder, certainly, you can create your own file and placed into custom folder.
However, the current version, 1.6.1, GUI Guider doesn't support subfolder. Subfolder will be supported in 1.7.1.
Hope it can help you
BR
XiangJun Rong
OK, thank you for the response, looks like I have to wait until version 1.7.1 to fully use GUI Guider as I'd like to.
Thanks for your question and comments
Below is the workaround for subfolder support based on GUI Guider v1.6.1.
1. create "src" subfolder in "custom" folder
2. add source files, e.g. "mytest.c" and "mytest.h"
3. add "src.mk" in "src“ folder, the following is the content of src.mk
GEN_CSRCS += $(notdir $(wildcard $(PRJ_DIR)/custom/src/*.c))
DEPPATH += --dep-path $(PRJ_DIR)/custom/src
VPATH += :$(PRJ_DIR)/custom/src
CFLAGS += "-I$(PRJ_DIR)/custom/src"
4. edit "custom.mk" to add "include $(PRJ_DIR)/custom/src/src.mk"
## SPDX-License-Identifier: MIT
## Copyright 2020 NXP
include $(PRJ_DIR)/custom/src/src.mk
GEN_CSRCS += $(notdir $(wildcard $(PRJ_DIR)/custom/*.c))
DEPPATH += --dep-path $(PRJ_DIR)/custom
VPATH += :$(PRJ_DIR)/custom
CFLAGS += "-I$(PRJ_DIR)/custom"
Then the newly added source files in subfolder will be included and built.
Best Regards,
Zhenhua
Hi,
I suppose that the simulator compiles the code in custom.c, whether the customer.c will be overwritten by simulator is dependent on the version of GUI guider.
I will ask the AE team for detailed information.
BR
XiangJun Rong
Thank you for the response, urgently looking for a response if additional files could be added to GUI Guider project rather than only using custom.c...