update makefiles
This commit is contained in:
parent
bc91dc1ae2
commit
17caf1a667
|
@ -1,3 +1,3 @@
|
|||
SRC_FILES :=s7_demo.c
|
||||
SRC_FILES :=s7_demo.cpp
|
||||
|
||||
include $(KERNEL_ROOT)/compiler.mk
|
||||
|
|
|
@ -9,11 +9,6 @@ static int Area = S7AreaDB, DBNumber = 13, Start = 0, Amount = 4, WordLen = S7WL
|
|||
static int bRead = 1; // By default read
|
||||
static int bWrite = 0; // By default not write
|
||||
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Unit Connection
|
||||
//------------------------------------------------------------------------------
|
||||
static int CliConnect()
|
||||
{
|
||||
int Requested, Negotiated, res;
|
||||
|
@ -28,17 +23,12 @@ static int CliConnect()
|
|||
};
|
||||
return !res;
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
// Unit Disconnection
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
static void CliDisconnect()
|
||||
{
|
||||
Cli_Disconnect(Client);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Perform tasks
|
||||
//------------------------------------------------------------------------------
|
||||
void PerformTasks()
|
||||
{
|
||||
while(true){
|
||||
|
@ -80,3 +70,5 @@ void s7_demo()
|
|||
// Deletion
|
||||
Cli_Destroy(Client);
|
||||
}
|
||||
SHELL_EXPORT_CMD(SHELL_CMD_PERMISSION(0) | SHELL_CMD_TYPE(SHELL_TYPE_CMD_MAIN) | SHELL_CMD_PARAM_NUM(0),
|
||||
S7Demo, s7_demo, Siemens Snap7 Demo);
|
||||
|
|
|
@ -4,7 +4,7 @@ menuconfig USING_CONTROL_PLC_OPCUA
|
|||
default y
|
||||
depends on RESOURCES_LWIP
|
||||
|
||||
menuconfig CONFIG_USING_CONTROL_PLC_S7
|
||||
menuconfig USING_CONTROL_PLC_S7
|
||||
bool "PLC support S7"
|
||||
default y
|
||||
depends on RESOURCES_LWIP
|
|
@ -1,5 +1,3 @@
|
|||
SRC_DIR :=
|
||||
|
||||
ifeq ($(CONFIG_RESOURCES_LWIP),y)
|
||||
|
||||
ifeq ($(CONFIG_USING_CONTROL_PLC_OPCUA), y)
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
* @date 2021.12.15
|
||||
*/
|
||||
|
||||
#include "../interoperability/opcua/open62541.h"
|
||||
// #include "../interoperability/opcua/open62541.h"
|
||||
#include "plc.h"
|
||||
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@ endif
|
|||
ifeq ($(CONFIG_SUPPORT_CONTROL_FRAMEWORK), y)
|
||||
APPPATHS += -I$(KERNEL_ROOT)/../../APP_Framework/Framework/control #
|
||||
APPPATHS += -I$(KERNEL_ROOT)/../../APP_Framework/Framework/control/plc/interoperability/opcua #
|
||||
APPPATHS += -I$(KERNEL_ROOT)/../../APP_Framework/Framework/control/plc/interoperability/s7 #
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_CRYPTO), y)
|
||||
|
|
|
@ -253,6 +253,7 @@ endif
|
|||
ifeq ($(CONFIG_SUPPORT_CONTROL_FRAMEWORK), y)
|
||||
KERNELPATHS += -I$(KERNEL_ROOT)/../../APP_Framework/Framework/control #
|
||||
KERNELPATHS += -I$(KERNEL_ROOT)/../../APP_Framework/Framework/control/plc/interoperability/opcua #
|
||||
KERNELPATHS += -I$(KERNEL_ROOT)/../../APP_Framework/Framework/control/plc/interoperability/s7 #
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_CRYPTO), y)
|
||||
|
|
Loading…
Reference in New Issue