0

Building Bootloaders with Windows Linux distribution
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Building Bootloaders with Windows Linux distribution

by BillBigge on Wed Aug 07, 2019 6:20 am

Hi,
I've been following the tutorial on how to build a bootloader. I'm very inexperienced with command line tools and make files so I started with the Linux distribution included with Windows 10, with the all new preview version of Windows Terminal (Version: 0.3.2171.0).

I have got as far as getting make to run in the bootloaders/zero/ directory, but it stops at the following error:

/bin/sh: 1: /home/bbigge/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/arm-none-eabi-gcc: not found


I have checked the Arduino15 directory and the /tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/ directory is all there, and I have both the Arduino SAM and SAMD board manager packages installed. I've fiddled with the make file a bit and found these lines, which specify the path (lines 38-43 of the MakeFile):

ifeq ($(UNAME_S),Linux)
MODULE_PATH?=$(HOME)/.Arduino15/packages/arduino
ARM_GCC_PATH?=$(MODULE_PATH)/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/arm-none-eabi-
RM=rm
SEP=/
endif


I've played around with different paths including changing it to this:

MODULE_PATH?=$(LOCALAPPDATA)/Arduino15/packages/arduino


but nothing has worked. Does anyone know what I am doing wrong?

BillBigge
 
Posts: 13
Joined: Mon Jan 22, 2018 6:49 am

Re: Building Bootloaders with Windows Linux distribution

by adafruit_support_mike on Fri Aug 09, 2019 11:38 pm

I'm afraid we haven't done much with that platform.

You might want to check over in the Arduino forums:

http://forum.arduino.cc/

They write and maintain the IDE, and will know the most about porting its build process to different operating systems.

adafruit_support_mike
 
Posts: 58856
Joined: Thu Feb 11, 2010 2:51 pm

Re: Building Bootloaders with Windows Linux distribution

by westfw on Sun Sep 01, 2019 11:46 am

Does the windows Unix shell define “LOCALAPPDATA”?
Have you tried making the gcc path entirely absolute, like:
/users/billw/appdata/local/arduino15/packages/arduino/... ?
By all means try running the compiler from the cmd prompt, where filename completion should help...
westfw
 
Posts: 1559
Joined: Fri Apr 27, 2007 1:01 pm
Location: SF Bay area

Re: Building Bootloaders with Windows Linux distribution

by BillBigge on Mon Sep 02, 2019 2:51 am

I've tried a lot of things, including that. I am wondering if I need to actually set those paths somewhere else in the Unix system.

I am going to try a completly different approach when I get a moment, which is to use Atmel Studio, and an extension it has that can apparently build a project solution from a makefile ...

BillBigge
 
Posts: 13
Joined: Mon Jan 22, 2018 6:49 am

Re: Building Bootloaders with Windows Linux distribution

by westfw on Mon Sep 02, 2019 3:17 am

Ah. I was wrong about how linux for windows works; it doesn't look like it has "easy" access to the windows filesystem :-(
Experimenting... I'll get back in a bit.
westfw
 
Posts: 1559
Joined: Fri Apr 27, 2007 1:01 pm
Location: SF Bay area

Re: Building Bootloaders with Windows Linux distribution

by westfw on Wed Sep 04, 2019 5:47 am

Do you have the Arduino for Linux installed within your Windows Linux, or are you trying to use the Windows install of Arduino?

Because the path containing ".Arduino15" is a unix style directory, but APPDATA stuff is windows. It looks like you can run windows programs from the linux shell, but the filenames with all need ".exe" at the end.

You may make it easier by installing the linux Arduino *as well* as the windows version, just for bootloader compilations. (An Arduino install is a relatively painless way to get a command-line compiler toolset installed, regardless of OS.)
westfw
 
Posts: 1559
Joined: Fri Apr 27, 2007 1:01 pm
Location: SF Bay area

Please be positive and constructive with your questions and comments.