Skip to content

Contribution: arduino-builder template file (and possible shortcoming) #220

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
aldrinleal opened this issue Feb 26, 2018 · 2 comments
Closed

Comments

@aldrinleal
Copy link

Not an issue, but an contribution:

Here's a template for arduino-builder. However, a good point is that the current arduino-builder has an issue with the way that boards.txt is structured, thus needing to manually copy each and every option from boards.txt into -prefs

ARDUINO_PATH=$(HOME)/share/arduino-1.8.5
ARDUINO_USER_TOOLS=$(HOME)/.arduino15/packages/arduino/tools
ARDUINO_HARDWARE=$(ARDUINO_PATH)/hardware
ARDUINO_TOOLS=$(ARDUINO_PATH)/tools
ARDUINO_BUILDER=$(ARDUINO_PATH)/arduino-builder
ARDUINO_USER_LIBRARIES=$(HOME)/Arduino/libraries/
ARDUINO_CORE_LIBRARIES=$(ARDUINO_PATH)/libraries
STM32=$(HOME)/.arduino15/packages/STM32
STM32_HARDWARE=$(STM32)/hardware
STM32_TOOLS=$(STM32)/tools
RELEASE=2018.1.18
PLATFORM=stm32:$(RELEASE):Nucleo_64
STM32_MCU_FLAGS=-prefs=upload.maximum_size=1048576 -prefs=upload.maximum_data_size=131072 '-prefs=build.mcu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard' '-prefs=build.board=NUCLEO_L476RG' '-prefs=build.series=STM32L4xx' -prefs=build.product_line=STM32L476xx -prefs=build.variant=NUCLEO_L476RG -prefs=build.cmsis_lib_gcc=arm_cortexM4l_math -prefs=build.variant.path=$(STM32_HARDWARE)/stm32/$(RELEASE)/variants/NUCLEO_L476RG
ARDUINO_BUILDER_EXTRA_FLAGS=-verbose -debug-level 10
ARDUINO_BUILDER_FLAGS=$(ARDUINO_BUILDER_EXTRA_FLAGS) $(STM32_MCU_FLAGS) -fqbn $(PLATFORM) $(EXTRA_MCU_FLAGS) -hardware $(STM32_HARDWARE) -hardware $(ARDUINO_HARDWARE) -tools $(ARDUINO_USER_TOOLS) -tools $(STM32_TOOLS) -libraries $(ARDUINO_USER_LIBRARIES) -libraries $(ARDUINO_CORE_LIBRARIES) -prefs=runtime.tools.ctags.path=$(ARDUINO_PATH)/tools-builder/ctags/5.8-arduino11

%.elf: %.ino
	-mkdir $(PWD)/output/
	$(ARDUINO_BUILDER) $(ARDUINO_BUILDER_FLAGS) -build-path=$(PWD)/output -compile $(PWD)/$<

all: HelloWorld.elf
@fpistm
Copy link
Member

fpistm commented Mar 6, 2018

Hi @aldrinleal
Currently, I use a script based on Arduino CLI (which use arduino-builder in background).
But I'm considering to switch on arduino builder which I though is better for build.
I already test a script done by one of my colleague on Windows
https://github.com/fpistm/stm32_tools/tree/arduino-builder/arduino-builder/windows
I will write a new one in python or perl in order to be multi platform.

@fpistm fpistm assigned fpistm and unassigned fpistm May 19, 2018
@fpistm
Copy link
Member

fpistm commented Jul 31, 2018

New script using arduino-builder released.
See CI/Build/
So I close this one.
Feel free to comment

@fpistm fpistm closed this as completed Jul 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants