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

User avatar
By jcmvbkbc
gerardwr wrote:esp8266@esp8266-VirtualBox:~$ sudo echo $PATH

$PATH here is expanded in the context of a shell where you type and run the command.
If you want the root shell to expand its own environment, try this: sudo bash -c 'echo $PATH'
User avatar
By gerardwr
jcmvbkbc wrote:If you want the root shell to expand its own environment, try this: sudo bash -c 'echo $PATH'

Damn, Linux continues to fool me.

Now I understand why SUDO MAKE cannot find XT-XCC.

Thanks jcmvbkbc.

Code: Select allesp8266@esp8266-VirtualBox:~$ echo $PATH
esp8266@esp8266-VirtualBox:~$ sudo bash -c 'echo $PATH'
[sudo] password for esp8266:

Inspired by the tip from jcmvbkbc I switched to the root environment with SUDO-S. XT-XCC is in $PATH, and MAKE in the APP directory compiles, and generates BIN files. I'm over this hurdle now, time to call it quits for today. Thanks for the inspiration in my hour of need.

Code: Select allesp8266@esp8266-VirtualBox:~$ sudo -s
root@esp8266-VirtualBox:~# echo $PATH
root@esp8266-VirtualBox:~# cd Share/esp_iot_sdk_v0.9.2/app
root@esp8266-VirtualBox:~/Share/esp_iot_sdk_v0.9.2/app# makeroot@esp8266-VirtualBox:~/Share/esp_iot_sdk_v0.9.2/app# make
make[1]: Entering directory `/mnt/Share/esp_iot_sdk_v0.9.2/app/user'
DEPEND: xt-xcc -M -Os -g -O2 -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -D__ets__ -DICACHE_FLASH -DLWIP_OPEN_SRC -DPBUF_RSV_FOR_WLAN -DEBUF_LWIP -I include -I ./ -I ../../include/ets -I ../include -I ./ -I ../../include -I ../../include/eagle user_webserver.c
DEPEND: xt-xcc -M -Os -g -O2 -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -D__ets__ -DICACHE_FLASH -DLWIP_OPEN_SRC -DPBUF_RSV_FOR_WLAN -DEBUF_LWIP -I include -I ./ -I ../../include/ets -I ../include -I ./ -I ../../include -I ../../include/eagle user_sensor.c


xt-objcopy -O binary .output/eagle/debug/image/eagle.app.v6.out .output/eagle/debug/bin/eagle.app.v6.bin
User avatar
By Fadi
#2150 Were you able to successfully burn the compiled code into the module and boot it?
I have tried with the provided iot_demo and AT source, both compiled, both burned but didn't run
flashed the bins at 0x0 and 0x40000 as stated in the docs.