Go Down

Topic: Arduino on Xcode Project — Official Thread (Read 153 times) previous topic - next topic

avenue33

There's a small problem with uploading too, for some reason the port for AVRdude to use gets lost somewhere. Changing AVRDUDE_PORT in Avrdude.mk to $(BOARD_PORT) fixes that.


That's strange, AVRDUDE_PORT is defined in Avrdude.mk by:
Code: [Select]
AVRDUDE_PORT      = $(firstword $(wildcard $(BOARD_PORT)))
with BOARD_PORT defined in Arduino UNO.xconfig by
Code: [Select]
BOARD_PORT = /dev/tty.usbmodem*
or in Step1.mk otherwise by
Code: [Select]
ifndef BOARD_PORT
    BOARD_PORT = /dev/tty.usb*
endif
Arduino UNO.xconfig has priority over Step1.mk.

Elijahg


That's strange, AVRDUDE_PORT is defined in Avrdude.mk by:
Code: [Select]
AVRDUDE_PORT      = $(firstword $(wildcard $(BOARD_PORT)))
with BOARD_PORT defined in Arduino UNO.xconfig by
Code: [Select]
BOARD_PORT = /dev/tty.usbmodem*
or in Step1.mk otherwise by
Code: [Select]
ifndef BOARD_PORT
    BOARD_PORT = /dev/tty.usb*
endif
Arduino UNO.xconfig has priority over Step1.mk.


Board_port is pulled from the config file fine, but "$(firstword $(wildcard $(BOARD_PORT)))" seems to return nothing, making AVRDUDE_PORT blank. Without $(firstword $(wildcard it works fine.

Elijahg

Hi again, I've discovered another problem, but unfortunately my makefile writing skills aren't up to scratch to fix this one.

For some reason the Step2 makefile is losing the USER_LIBS_LIST. USER_LIB_PATH works for me when in Arduino.mk I change 
Quote
USER_LIB_PATH  = $(wildcard $(SKETCHBOOK_DIR)/libraries)

to
Quote
USER_LIB_PATH  = $(SKETCHBOOK_DIR)/libraries


However, for some reason USER_LIBS_LIST is always "0" in the debug info. Any ideas? The only way to get non-core libraries to compile is to enter their full path into the source.pde. Thanks!

avenue33

Just open makefile
Code: [Select]
# Libraries
# ----------------------------------
# Declare application Arduino/chipKIT/Wiring and users libraries used
# Short-listing libraries speeds-up building
# Typing = 0 takes none
# Otherwise, all will be considered (default)

you can define which Arduino/chipKIT/Wiring libraries you want
Code: [Select]
# List Arduino/chipKIT/Wiring libraries here
#

as well as which users libraries
Code: [Select]
# List users libraries here
#

Those parameters are intended to avoid compiling all the libraries each time and thus, speed-up the process.

Elijahg

Ah that's great, thanks :)

Perhaps it'd be better to have an environment variable set in Xcode defining whether you want to compile user libraries or not, would be much easier than changing a list in the makefile. You could have the envar as a list of user librares too.

Go Up