Hi,
I have written a cpp program with two threads, one thread for uart serial communication and other thread to control the GPIOs
i have compiled it, and i got a binary
But
When i transfered it to the board i get the error
./fw_dali_controller: line 1: syntax error: unexpected ")"
I will paste the Makefile below knidly help me in resolving the issue.
Makefile
# Makefile for fw_dali_controller
PROG = dali
CC = g++
#CFLAGS = -Wall -std=c++11
#LDFLAGS = -lpthread
# Add / change option in CFLAGS and LDFLAGS
CFLAGS += -Wall $(sudo shell /home/nitesh/STM32MPU_workspace/STM32MP1-Ecosystem-v5.0.0/Developer-Package/SDK/sysroots/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/usr/share --cflags gtk+-3.0)
CFLAGS += -Wall $(sudo shell /home/nitesh/STM32MPU_workspace/STM32MP1-Ecosystem-v5.0.0/Developer-Package/SDK/sysroots/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/usr/src/debug --cflags shared-mime-info)
LDFLAGS += $(sudo shell /home/nitesh/STM32MPU_workspace/STM32MP1-Ecosystem-v5.0.0/Developer-Package/SDK/sysroots/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/usr/share --libs gtk+-3.0)
LDFLAGS += $(sudo shell /home/nitesh/STM32MPU_workspace/STM32MP1-Ecosystem-v5.0.0/Developer-Package/SDK/sysroots/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/usr/src/debug --libs shared-mime-info)
SRC_DIR = src
INC_DIR = inc
BUILD_DIR = build
BIN_DIR = bin
# List of source files
SRCS = $(SRC_DIR)/Serial_Comm.cpp $(SRC_DIR)/Gpio_Control.cpp $(SRC_DIR)/main.cpp
# List of object files
OBJS = $(patsubst $(SRC_DIR)/%.cpp,$(BUILD_DIR)/%.o,$(SRCS))
# Target executable
TARGET = $(BIN_DIR)/fw_dali_controller
# Targets
$(TARGET): $(OBJS)
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
$(BUILD_DIR)/%.o: $(SRC_DIR)/%.cpp
$(CC) $(CFLAGS) -c -o $@ $< -I$(INC_DIR) -I$(SRC_DIR)
clean:
rm -rf $(BUILD_DIR)/*.o $(TARGET)
.PHONY: clean