Click here to Skip to main content
15,892,927 members
Home / Discussions / Linux Programming
   

Linux Programming

 
GeneralRe: Bluetooth socket failures Pin
Vaclav_28-Feb-20 7:12
Vaclav_28-Feb-20 7:12 
GeneralRe: Bluetooth socket failures Pin
k505429-Feb-20 6:14
mvek505429-Feb-20 6:14 
GeneralRe: Bluetooth socket failures Pin
Vaclav_29-Feb-20 8:27
Vaclav_29-Feb-20 8:27 
GeneralRe: Bluetooth socket failures Pin
Richard MacCutchan29-Feb-20 21:19
mveRichard MacCutchan29-Feb-20 21:19 
GeneralRe: Bluetooth socket failures Pin
Vaclav_1-Mar-20 4:02
Vaclav_1-Mar-20 4:02 
GeneralRe: Bluetooth socket failures Pin
Vaclav_28-Feb-20 8:32
Vaclav_28-Feb-20 8:32 
QuestionRunning console apps on windows 7 Pin
Calin Negru23-Feb-20 20:07
Calin Negru23-Feb-20 20:07 
AnswerRe: Running console apps on windows 7 Pin
Victor Nijegorodov23-Feb-20 20:45
Victor Nijegorodov23-Feb-20 20:45 
GeneralRe: Running console apps on windows 7 Pin
Calin Negru23-Feb-20 21:22
Calin Negru23-Feb-20 21:22 
AnswerRe: Running console apps on windows 7 Pin
Richard MacCutchan23-Feb-20 20:59
mveRichard MacCutchan23-Feb-20 20:59 
GeneralRe: Running console apps on windows 7 Pin
Calin Negru23-Feb-20 21:21
Calin Negru23-Feb-20 21:21 
GeneralRe: Running console apps on windows 7 Pin
jsc4229-Feb-20 11:16
professionaljsc4229-Feb-20 11:16 
Questiongetting started with ASM, what compilers do you use? Pin
Calin Negru21-Feb-20 1:47
Calin Negru21-Feb-20 1:47 
AnswerRe: getting started with ASM, what compilers do you use? Pin
Richard MacCutchan21-Feb-20 1:52
mveRichard MacCutchan21-Feb-20 1:52 
GeneralRe: getting started with ASM, what compilers do you use? Pin
Calin Negru21-Feb-20 2:40
Calin Negru21-Feb-20 2:40 
GeneralRe: getting started with ASM, what compilers do you use? Pin
Richard MacCutchan21-Feb-20 3:54
mveRichard MacCutchan21-Feb-20 3:54 
GeneralRe: getting started with ASM, what compilers do you use? Pin
Calin Negru21-Feb-20 6:39
Calin Negru21-Feb-20 6:39 
GeneralRe: getting started with ASM, what compilers do you use? Pin
Richard MacCutchan21-Feb-20 6:50
mveRichard MacCutchan21-Feb-20 6:50 
GeneralRe: getting started with ASM, what compilers do you use? Pin
Calin Negru21-Feb-20 7:04
Calin Negru21-Feb-20 7:04 
QuestionCross compilation mystery Pin
fd97504-Feb-20 4:53
professionalfd97504-Feb-20 4:53 
Hi,

I had a nicely operating cross compilation tool setup ( see the article I wrote about it Toolset to Cross Compile/Remote Debug Raspberry from Windows Host[^] )

Today I tried to run a python script but it needed python 3.7. I did not have that in the Msys32 setup I was using. After some searching I tried to put the Msys32 configuration up to date but it completely failed and became totally inoperable. It was not even possible to start the Mingw32 shell in it any more.

I Also had an Msys64 setup available and tried to update that one and it worked perfectly. I installed python 3.8.1.1 and was able to run the python script from within the updated Mingw64 shell. The Msys64 setup also contains a Mingw32 shell which runs equally well.

So far so good but now I have a completely different problem: whenever I try to run the make command for my project ( either manually in the Mingw32 or Mingw64 shell or from Visual studio code ) I get a really odd error message:

$ make
mkdir -p build/./main/
The syntax of the command is incorrect.
make: *** [build/./main/hello_world_main.c.o] Error 1


It is the mkdir -p build/./main/ which appears to be the culprit but strangely enough that used to work perfectly and when I type the exact same command from within either the Mingw32 or Mingw64 shell it executes perfectly without the slightest trace of an error message.

For completeness I have included the Makefile content below but this has really thrown a spanner in the works. Does anyone have an idea as to what may be the cause of this?


TARGET_EXEC ?= Hello_world_c

BUILD_DIR ?= ./build
SRC_DIRS ?= ./main

SYSROOT = $(RPIDEV_LOC)/arm-linux-gnueabihf/sysroot
CROSS_COMPILE = $(RPIDEV_LOC)/bin/arm-linux-gnueabihf

CXX = $(CROSS_COMPILE)-g++ --sysroot $(SYSROOT)
CC = $(CROSS_COMPILE)-gcc --sysroot $(SYSROOT) -lpigpio
AS = $(CROSS_COMPILE)-as
AR = $(CROSS_COMPILE)-ar
NM = $(CROSS_COMPILE)-nm
LD = $(CROSS_COMPILE)-ld

SRCS := $(shell find $(SRC_DIRS) -name *.cpp -or -name *.c -or -name *.s)
OBJS := $(SRCS:%=$(BUILD_DIR)/%.o)
DEPS := $(OBJS:.o=.d)

INC_DIRS := $(shell find $(SRC_DIRS) -type d)
INC_FLAGS := $(addprefix -I,$(INC_DIRS))

CPPFLAGS ?= $(INC_FLAGS) -MMD -MP -g

$(BUILD_DIR)/$(TARGET_EXEC): $(OBJS)
	$(CC) $(OBJS) -o $@ $(LDFLAGS)

# assembly
$(BUILD_DIR)/%.s.o: %.s
	$(MKDIR_P) $(dir $@) 
	$(AS) $(ASFLAGS) -c $< -o $@

# c source
$(BUILD_DIR)/%.c.o: %.c
	$(MKDIR_P) $(dir $@)
	$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@

# c++ source
$(BUILD_DIR)/%.cpp.o: %.cpp
	$(MKDIR_P) $(dir $@)
	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@


.PHONY: clean

clean:
	$(RM) -r $(BUILD_DIR)

-include $(DEPS)

MKDIR_P ?= mkdir -p

GeneralRe: Cross compilation mystery Pin
Richard MacCutchan4-Feb-20 6:14
mveRichard MacCutchan4-Feb-20 6:14 
GeneralRe: Cross compilation mystery Pin
k50544-Feb-20 6:53
mvek50544-Feb-20 6:53 
GeneralRe: Cross compilation mystery Pin
Richard MacCutchan4-Feb-20 7:32
mveRichard MacCutchan4-Feb-20 7:32 
GeneralRe: Cross compilation mystery Pin
k50544-Feb-20 8:11
mvek50544-Feb-20 8:11 
GeneralRe: Cross compilation mystery Pin
Richard MacCutchan4-Feb-20 8:43
mveRichard MacCutchan4-Feb-20 8:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.