-
-
Notifications
You must be signed in to change notification settings - Fork 345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Guard CommandExecutor and CommandHandler #1014
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ADiea When I export DISABLE_CMD_EXEC=1 and the compile the samples some of them fail (Arducam, CommandProcessing_Debug and Telnet_TCPServer_TCPClient for example).
Please, make sure that they compile. Steps to reproduce
cd $SMING_HOME
export DISABLE_CMD_EXEC=1
make dist-clean
make samples
I prefer use full names to keep things clear, it shouldn't be problem to write it :) DISABLE_COMMAND_EXECUTOR or DISABLE_CMD_EXECUTOR |
Sorry! Have checked current Makefile code, if we already have "ENABLE_SSL" than we should add new flags in same manner, I think: ENABLE_XXX. |
Sming/Makefile-rboot.mk
Outdated
@@ -188,7 +191,7 @@ EXTRA_INCDIR += $(SMING_HOME)/include $(SMING_HOME)/ $(LWIP_INCDIR) $(SMING_HOME | |||
USER_LIBDIR = $(SMING_HOME)/compiler/lib/ | |||
|
|||
# compiler flags using during compilation of source files | |||
CFLAGS = -Wpointer-arith -Wundef -Werror -Wl,-EL -nostdlib -mlongcalls -mtext-section-literals -finline-functions -fdata-sections -ffunction-sections -D__ets__ -DICACHE_FLASH -DARDUINO=106 -DCOM_SPEED_SERIAL=$(COM_SPEED_SERIAL) $(USER_CFLAGS) | |||
CFLAGS = -Wpointer-arith -Wundef -Werror -Wl,-EL -nostdlib -mlongcalls -mtext-section-literals -finline-functions -fdata-sections -ffunction-sections -D__ets__ -DICACHE_FLASH -DARDUINO=106 -DCOM_SPEED_SERIAL=$(COM_SPEED_SERIAL) $(USER_CFLAGS) -DDISABLE_CMD_EXEC=$(DISABLE_CMD_EXEC) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same directive should be also in the Makefile-project.mk file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Basically this is only used for sming building so app should not care for this flag. But will add it anyway for completion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, then just remove it from here. Rename also the directive as anakod suggested: ENABLE_COMMAND_EXECUTOR and take care to change the preprocessor if-conditions accordingly.
This functionality is sometimes not used but because it is present in places like websock and http server it occupies RAM and heap
Without CommandExecutor, compiling sample HttpServer_WebSockets