Discuss here different C compiler set ups, and compiling executables for the ESP8266

User avatar
By CheapB
#2111
gerardwr wrote:I could really use some help in getting the make to run under OSX.

I have installed the VM (from Google Drive) under VirtualBox (4.3.10) acc. to the README on Google Drive. All is well until 'make" (step 6 in the Compile section). It results into a „permission denied” error.

I have downloaded the latest esp_iot_sdk_v0.9.2 dated 24-20-2014.


What are you trying to compile? the AT or IOT_demo example or something else? if you are trying to compile something else you need to edit the makefile
User avatar
By gerardwr
#2113
What are you trying to compile? the AT or IOT_demo example or something else? if you are trying to compile something else you need to edit the makefile


Thanks for your reaction.

I'm compiling the IOT demo, and have copied the contents of the IOT source in the EXAMPLES directory to the APP directory. I understand that you have to edit the MAKE file if you want to compile an other source.

Looks to me that it is a permission mismatch between the directory on the OSX host and the Lubuntu guest, but i can't really pinpoint the problem.

So, if anyone has it running on OSX, please give me a hand.
User avatar
By igrr
#2114 Well, your first snippet with ls output indicates that the whole contents of shared folder is writeable only by root. As you are running this as a regular user, you are getting permission denied error.
Next, when you sudo, the compiler is not being found (third snippet). Check that the compiler is indeed where it should be. Check the paths by doing sudo echo $PATH and compare that to the $PATH without sudo, just in case.
Or remount the shared folder as a regular user and skip the sudo part.

Personally I have built a native toolchain for OS X to avoid using a VM altogether. It is definitely worth the trouble if building a firmware is not a one-time task for you.
User avatar
By gerardwr
#2121 @iggr

Thanks for your comments, appreciate it.

Well, your first snippet with ls output indicates that the whole contents of shared folder is writeable only by root. As you are running this as a regular user, you are getting permission denied error.


Correct. I tried to correct this using SUDO CHOWN, command executes without error, but owner does not change. That’s why I tried SUDO MAKE, that resulted in the „xt-xcc not found” error.

Next, when you sudo, the compiler is not being found (third snippet). Check that the compiler is indeed where it should be. Check the paths by doing sudo echo $PATH and compare that to the $PATH without sudo, just in case.


Just checked again to be sure, see output below
- xt-xcc is in a directory that’s in the $PATH
- xt-xcc executes when used including dir name, but SUDO XT-XCC results in "command not found".
- xt-xcc executes when used without dir name, so $PATH looks OK
- $PATH and SUDO $PATH seems to be equal

Code: Select all esp8266@esp8266-VirtualBox:~$ ls /opt/xtensa-lx106-elf/
<snip>
elf-objcopy  xt-nm                     xt-xcc
<snip>

esp8266@esp8266-VirtualBox:~$ /opt/xtensa-lx106-elf/bin/xt-xcc
xt-xcc: fatal error: no input files
compilation terminated.

esp8266@esp8266-VirtualBox:~$ xt-xcc
xt-xcc: fatal error: no input files
compilation terminated.
esp8266@esp8266-VirtualBox:~$ sudo xt-xcc
[sudo] password for esp8266:
sudo: xt-xcc: command not found

esp8266@esp8266-VirtualBox:~$ sudo echo $PATH
/opt/xtensa-lx106-elf/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
esp8266@esp8266-VirtualBox:~$ echo $PATH
/opt/xtensa-lx106-elf/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
esp8266@esp8266-VirtualBox:~$


I still wonder why SUDO MAKE results in the xt-xcc not found error, call me stupid.

Or remount the shared folder as a regular user and skip the sudo part.

I will focus on doing that. I have added the ESP8266 use to the gid of 999 to VBOXSF, but that did not help. I will try to remount as regular user.

Personally I have built a native toolchain for OS X to avoid using a VM altogether. It is definitely worth the trouble if building a firmware is not a one-time task for you.


Ahah, great! In past years I have used Arduino’s/Atmega’s with 433Mhz RF xmitters and receivers as default platform for home automation. I would like to replace this platform with the ESP8266, so using a native OSX toolchain in the end would have my preference. But I fear the complexity of building a native toolchain, and thought that the VM would give me a flying start. It’s a Start, but not flying, yet!

Will report back on the remount suggestion.

Other suggestion of other OSX users are welcome. I can „repay” later with a tutorial for other OSX users of the VM.

Many thanks.