Skip to content

Problems with mcrun. #715

Answered by Frida854
Frida854 asked this question in Q&A
Discussion options

You must be logged in to vote

After some searching in makefiles, it seems that after the first time a variable is used, "? =" is used.
But if it needs to be changed afterwards, use "=".

So now I have changed "make.esp32.mk" to:

HOST_OS := $(shell uname)

PROJ_DIR_TEMPLATE = $(BUILD_DIR)/devices/esp32/xsProj-$(ESP32_SUBCLASS)

UPLOAD_PORT ?= $(shell bash -c "python $(PROJ_DIR_TEMPLATE)/getPort.py")

ifeq ($(HOST_OS),Darwin)
	ifeq ($(findstring _11.,_$(shell sw_vers -productVersion)),_11.)
		UPLOAD_PORT = /dev/cu.usbserial-0001
	else
		UPLOAD_PORT = /dev/cu.SLAB_USBtoUART
	endif
else
	UPLOAD_PORT = /dev/ttyUSB0
endif

And it works fine for me.
Yours sincerely
Poul

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by Frida854
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants