Skip to content

rpi (raspbian stretch) install doesn't seem to install toolchain #789

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
CosmicBandito69 opened this issue Oct 29, 2017 · 18 comments
Closed
Labels
Status: Solved Type: Feature request Feature request for Arduino ESP32

Comments

@CosmicBandito69
Copy link

CosmicBandito69 commented Oct 29, 2017

Hardware:

Board: DOIT ESP32 DEV KIT V1
Core Installation/update date: 29/Oct/2017
IDE name: Arduino IDE
Flash Frequency: ?40Mhz?
Upload Speed: ?115200?

Description:

On a raspberry pi 3, installed arduino IDE, then followed instructions to install esp32 arduino core, which appeared to work. However, the xtensa gcc binaries did not get installed to the proper location (if at all). boards show up in the board manager, but attempts to compile sketches fail because the binaries can't be found, because they aren't there. Everything works fine for esp8266, so arduino is set up correctly.

There is no xtensa-esp32-elf directory in home/pi/Arduino/hardware/espressif/esp32/tools

get.py does not appear to be working correctly. I tried the unicode fix, but it still didn't work, and it wouldn't download the binaries.

Sketch:

//Change the code below by your sketch
uint64_t chipid;  

void setup() {
	Serial.begin(115200);
}

void loop() {
	chipid=ESP.getEfuseMac();//The chip ID is essentially its MAC address(length: 6 bytes).
	Serial.printf("ESP32 Chip ID = %04X",(uint16_t)(chipid>>32));//print High 2 bytes
	Serial.printf("%08X\n",(uint32_t)chipid);//print Low 4bytes.

	delay(3000);

}

Debug Messages:

Error:
fork/exec /home/pi/Arduino/hardware/espressif/esp32/tools/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++: no such file or directory
Error compiling for board DOIT ESP32 DEVKIT V1.

@CosmicBandito69 CosmicBandito69 changed the title rpi install doesn't seem to install tooltchain rpi (raspbian stretch) install doesn't seem to install tooltchain Oct 29, 2017
@CosmicBandito69 CosmicBandito69 changed the title rpi (raspbian stretch) install doesn't seem to install tooltchain rpi (raspbian stretch) install doesn't seem to install toolchain Oct 29, 2017
@me-no-dev
Copy link
Member

we do not have the toolchain for RPI yet :) maybe you can build crosstool-ng yourself?

@CosmicBandito69
Copy link
Author

CosmicBandito69 commented Oct 30, 2017

Gosh, it's so much easier when someone else does it :) . Thank you for the response. I'll give it a go. I heard it takes 2.5 hours after starting. It's that starting part (setting it up to compile) that's going to take me a while.

@CosmicBandito69
Copy link
Author

CosmicBandito69 commented Oct 31, 2017

update: After following instructions available online here... At 85 minutes... Still going. Follow instructions to disable parallel processing before "./ct-ng build build.1" Will update.

@CosmicBandito69
Copy link
Author

Oh no, am I building it twice? It says it finished at 241min (!!!!) (running off usb stick) and seems to now be duplicating the same steps. Crap. I didn't want the build.1 argument, did I? How stupid. I don't see any binaries anywhere. Sigh. When it is built, what am I supposed to copy over to the esp32/tools directory? It looks like I'm 20 min into another 241min build. :( Cannot find the binaries.

@CosmicBandito69
Copy link
Author

CosmicBandito69 commented Oct 31, 2017

Success! Well another 238 minutes later I changed the permissions, as per instructions, and then copied the xtensa-esp32-elf directory (located in builds directory) over to /home/pi/Arduino/hardware/espressif/esp32/tools/ using copy and paste in the file browsers. And... The sketch compiled. Thank you. If you change the .config file to restrict parallel processing, I don't think you need the second argument "build.1", so "./ct-ng build" would take half as long.

@me-no-dev
Copy link
Member

Hey :) glad you succeeded :) BTW want to share that toolchain?

@CosmicBandito69
Copy link
Author

CosmicBandito69 commented Oct 31, 2017

How can I share it? The zip file is 77.5 mb (just the xtensa-esp32-elf directory). I seem to have a limit of 10mb on attachments at this comment section. Apparently I have a 25mb email attachment restriction. I guess I don't know how. Which directories do you need specifically under xtensa-esp32-elf?

@me-no-dev
Copy link
Member

maybe something like google drive?

@CosmicBandito69
Copy link
Author

CosmicBandito69 commented Oct 31, 2017

here should link you to my google drive with toolchain in 7z and zip form. unzip them in the tools directory. You should only need one or the other, whether you have 7zip or not. 7z brought the size down to 14mb.

@CosmicBandito69
Copy link
Author

CosmicBandito69 commented Nov 3, 2017

Well, my usb stick crashed, so I set everything up on a sd card install, like I was installing the esp32 arduino core on a normal linux system, and used the 7z (or zip) file from link (also above and below). The rpi binaries don't download when you run get.py, so instead of running get.py to download them, use link, download and unzip either the .7z or the .zip file into the /home/pi/Arduino/hardware/espressif/esp32/tools directory. It makes a directory, "xtensa-esp32-elf" Sketches compile now. Warning: sketch compile can take a very, very long time on rpi.

Today, I also rebuilt the toolchain again (In case someone wanted to do it themselves). I wanted to see if it would work without changing the .config file to turn off parallel builds, but it indeed crashed with a segmentation fault. Changing the one line in the .config file allowed it to finish. Also, you don't need the build.1 argument. just put "./ct-ng build"

@Jcspoza
Copy link

Jcspoza commented Dec 29, 2018

Thanks @CosmicBandito69 for the effort . It works on my RPI 3B pretty well (after a 1st try with a hook!!). Speed in compilation is acceptable, tested with short examples like ChipID or WIFIscan on a DOIT ESP32 DEV KIT V1.

@CosmicBandito69
Copy link
Author

CosmicBandito69 commented Dec 29, 2018 via email

@stale
Copy link

stale bot commented Aug 1, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Status: Stale Issue is stale stage (outdated/stuck) label Aug 1, 2019
@yoursunny
Copy link
Contributor

Toolchain for ARMv7 and ARMv8 would be useful for me as well. This issue should remain open.

@stale stale bot removed the Status: Stale Issue is stale stage (outdated/stuck) label Aug 1, 2019
@atanisoft
Copy link
Collaborator

@me-no-dev can we get the "enhancement" or "to be implemented" tag on this issue?

@stale
Copy link

stale bot commented Sep 30, 2019

[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Status: Stale Issue is stale stage (outdated/stuck) label Sep 30, 2019
@me-no-dev me-no-dev added the Status: To be implemented Selected for Development label Sep 30, 2019
@stale
Copy link

stale bot commented Sep 30, 2019

[STALE_CLR] This issue has been removed from the stale queue. Please ensure activity to keep it openin the future.

@stale stale bot removed the Status: Stale Issue is stale stage (outdated/stuck) label Sep 30, 2019
@igrr
Copy link
Member

igrr commented Apr 5, 2022

This seems to be fixed by 5ad468f and #4117. If you find an issue with the latest 2.0.3-rc1 release, please open a new issue.

@igrr igrr closed this as completed Apr 5, 2022
@igrr igrr removed the Status: To be implemented Selected for Development label Apr 5, 2022
@igrr igrr added Type: Feature request Feature request for Arduino ESP32 Status: Solved labels Apr 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Solved Type: Feature request Feature request for Arduino ESP32
Projects
None yet
Development

No branches or pull requests

6 participants