workaround install toolchain

User avatar
rudi ;-)
Posts: 708
Joined: Fri Nov 13, 2015 3:25 pm
Location: germany
Contact:

workaround install toolchain

Postby rudi ;-) » Thu Dec 03, 2015 11:23 am

hi guys

i wrote, that a little broken was here in my VM at install the toolchain
so i switch to debug mode in ct-ng and get then in second build this:

[INFO ] Installing cross-gdb
[ERROR] configure: error: expat is missing or unusable
[ERROR] make[2]: *** [configure-gdb] Error 1
[ERROR] make[1]: *** [all] Error 2
[ERROR] |
[ERROR] >>
[ERROR] >> Build failed in step 'Installing cross-gdb'
[ERROR] >> called in step '(top-level)'
[ERROR] >>
[ERROR] >> Error happened in: CT_DoExecLog[scripts/functions@257]
[ERROR] >> called from: do_debug_gdb_build[scripts/build/debug/300-gdb.sh@181]
[ERROR] >> called from: do_debug[scripts/build/debug.sh@35]
[ERROR] >> called from: main[scripts/crosstool-NG.sh@638]
/

Current command:
'make' '-j2' '-l'
exited with error code: 2
Please fix it up and finish by exiting the shell with one of these values:
1 fixed, continue with next build command
2 repeat this build command
3 abort build



expat was missing / unusable
i was unsure, had installed it but i try so i do again

sudo apt-get install expat btw.


so here a little workaround if you have same problem:
try to install expat if you do not have

and if you run the crosstool-ng in debug mode you can read more infos
and can go on in the broken process again. you must then not start
from begin:

yes, current crosstool-ng has support this feature.

enable this feature in menuconfig

for ct-ng menuconfig, config Paths and misc options like this

─Paths and misc options ─

[*] Debug crosstool-NG
[ ] Pause between every steps
[*] Save intermediate steps
[*] gzip saved states
[*] Interactive shell on failed commands

when do build, for each step done successfully, you will see something like this:

Saving state to restart at step 'xxx'...

when fail, after fix it, then use ct-ng LAST_SUCCESSFUL_STETP_NAME+ to continue build

my example:

ct-ng:/opt/Espressif/crosstool-NG> ./ct-ng list-steps
make[2]: Entering directory `/opt/Espressif/crosstool-NG'
Available build steps, in order:
- libc_check_config
- companion_libs_for_build
- binutils_for_build
- companion_libs_for_host
- binutils_for_host
- cc_core_pass_1
- kernel_headers
- libc_start_files
- cc_core_pass_2
- libc
- cc_for_build
- cc_for_host
- libelf_for_target
- binutils_for_target
- debug (here in my install was broken)
- test_suite
- finish
Use "<step>" as action to execute only that step.
Use "+<step>" as action to execute up to that step.
Use "<step>+" as action to execute from that step onward.
make[2]: Leaving directory `/opt/Espressif/crosstool-NG'

so i can start here in this process and must not start from begin

ct-ng:/opt/Espressif/crosstool-NG> ./ct-ng debug+
make[2]: Entering directory `/opt/Espressif/crosstool-NG'
[INFO ] Performing some trivial sanity checks
[INFO ] Build started 20151203.173555
[INFO ] Building environment variables
[INFO ] Restoring state at step 'debug', as requested.
[INFO ] =================================================================
[INFO ] Installing cross-gdb
[INFO ] Installing cross-gdb: done in 1454.82s (at 24:50)
[INFO ] Saving state to restart at step 'test_suite'...
[INFO ] Saving state to restart at step 'finish'...
[INFO ] =================================================================
[INFO ] Cleaning-up the toolchain's directory
[INFO ] Stripping all toolchain executables
[INFO ] Cleaning-up the toolchain's directory: done in 14.95s (at 26:41)
[INFO ] Build completed at 20151203.180232
[INFO ] (elapsed: 401:28.41)
[INFO ] Finishing installation (may take a few seconds)...
[26:41] / make[2]: Leaving directory `/opt/Espressif/crosstool-NG'
ct-ng:/opt/Espressif/crosstool-NG>

and done!

my second workaround:
think there is a little mistake in "Project Template Compile" Part,

must add

cd ~/Workspace/project_template

before Step 6

make clean
make

because we are in ~/Workspace
( See Step 2 in this Part )

and there is no MAKEFILE



best wishes
rudi ;-)


btw:
i installed code::blocks for the first ESP32-Hello World in the lubuntu VM
if you want see this, i update today here with a small video from output.
Attachments
missing cd before Step 6 Start Compile_small.PNG
missing cd before Step 6 Start Compile_small.PNG (160.21 KiB) Viewed 2399 times
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

User avatar
rudi ;-)
Posts: 708
Joined: Fri Nov 13, 2015 3:25 pm
Location: germany
Contact:

Expand ESP8266 VM

Postby rudi ;-) » Tue Dec 15, 2015 9:35 pm

hi
on one PC, i use ESP8266 VM ( VirtualBox and espressif VM image ) because
no linux is installed on it.

if you plane to use the VM for ESP32 too, then it is recommend to expand
the ImageFile before, because the 8 GB Place will fill out fast if you develop
for ESP8266, ESP31 and ESP32. ( i installed Develop IDE Code:Blocks, and other..)

Steps to expand the standard ESP8266 VM Diskimage ( VirtualBox Image File )

1. Download & Installation VM Oracle VirtualBox like descript in bbs.espressif.com
2. Setup Lubuntu Image
before we can expand the image we must
convert vmdk - > vdi
then we can
resize the vdi file

so please,
clone your vmdk for backup , do not work with the one original
then resize the clone.
change in vm the src of your new clone and tell vm the place of vdi file

The Image is now expanded but not "declare" what is with the expand space
so we must expand the /dev/sda# and say, that free space is now part of the partion

3. expand the Partion
http://gparted.sourceforge.net/download.php

If you boot the new clone in VM, then press F12, load by the iso and delete the swap
expand the /dev/sda# and have a rest of swap free

create new swap

now you have a new UUID for the /dev/sda#
you must now entry the new UUID in /etc/fstab
you must boot the clone, ( there will be fail login in the desktop )
you must open a shell/terminal ( ALT + T )
no you can entry...

4. Entry UUID in /etc/fstab
this video will help you:
https://www.youtube.com/watch?v=LxLqjzzJNAo

because we have now new system, we must install / expand the share function in VM

5. Share expansion install
cd /opt/VBoxGuestAdditions-*/init
sudo ./vboxadd setup

now you are ready for install toolchain ect for the core 108..
update your lubuntu - and read Clemente tip too!
viewtopic.php?f=9&p=184#p180

6. SDK and Toolchchain install
https://github.com/espressif/ESP32_RTOS_SDK

If you need a detailed help, write here your question.
would try to answere it.

if you have VM/Core 108 on windows and windows in front,
you can use your favorite IDE in windows, ( use the share folder to the VM for your projects )and jump to the vm shell to run "make" ... you can use the windows flash tool then because you can load the share bins.

if you fit in linux, you can make a udp/tcp pipeline to the vm, create a bat file to do a automatically batch to the vm shell (tcp/udp listener) by click "build" in your windows IDE ( entry simply the bat file for your process ) for run the make commands
in background. later time you can use debug tools too .. :shock:

yes its simple to do this.
nice combinate, if you come from windows,btw.
my tip:
add the RTOS path in .bashrc
add the core108 path in .basrc
entry the bin export in the top makefile
then you allways free in head.

alternate:
Install Ubuntu on a Sytem

hope there are welcome tips in it.
not all are descripted in details, but there are steps
if detailed need, ask for the detail step. the tcp/udp listener is more time,
if you not fit in this, please install ubuntu directly, there are more details need.
( firewall..) this is for inspiration to plane next system ...

best wishes
rudi ;-)
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

RuiSantos
Posts: 2
Joined: Sat Dec 19, 2015 9:27 pm

Re: workaround install toolchain

Postby RuiSantos » Sun Dec 27, 2015 12:16 pm

Hi Rudi,
Thank you for sharing your experience on preparing the work environment.
I'm having a problem and I don't know how to fix... I've followed these instructions to install everything: https://github.com/espressif/ESP32_RTOS_SDK

I've installed the toolchain successfully in the recommended directory.
I've also downloaded the sdk to the ~/Workspace folder and I've followed all the instructions.

directories.png
directories.png (69.14 KiB) Viewed 2040 times


I've also added the exports to the ~/.bashrc
bashrc.png
bashrc.png (71.57 KiB) Viewed 2040 times


When I go to the ~/Workspace/project_template
And I run the command make clean && make I get this:

make clean and make.png
make clean and make.png (37.16 KiB) Viewed 2040 times


Do you know how to fix it? I think I've defined all the paths properly and I checked everything multiple times...
I'm using Ubuntu 14 with VirtualBox.

Thank you,
Rui

Baoshi
Posts: 11
Joined: Sun Nov 22, 2015 3:30 am

Re: workaround install toolchain

Postby Baoshi » Sun Dec 27, 2015 3:02 pm

Rui,

Do not put sudo before make, that should work.

Baoshi

RuiSantos
Posts: 2
Joined: Sat Dec 19, 2015 9:27 pm

Re: workaround install toolchain

Postby RuiSantos » Mon Dec 28, 2015 11:31 am

Baoshi wrote:Rui,

Do not put sudo before make, that should work.

Baoshi


Thanks for the suggestion. I've tried and it actually solved my problem Baoshi. It was a permissions issue, if I did:
make clean && make
It was saying permission denied, so I've tried with the
sudo make clean && sudo make
Unfortunately that doesn't work, because it needs to be the $USER running that command. To solve this issue I simply ran:

sudo chown -R $USER ~/Workspace
make clean
make

And finally compiled.
Thanks again,
Rui

Who is online

Users browsing this forum: No registered users and 2 guests