Craig, welcome :) I've added your updates to the developer doc. Regards, Michael Am 23.06.2018 um 21:49 schrieb Craig Leres:
Initially I got a build environment up on a spare ubuntu system. But I wanted to work under FreeBSD so I wrote FreeBSD port for the tool chain:
https://www.freshports.org/devel/xtensa-esp32-elf/
My ubuntu system says:
sea 1 % xtensa-esp32-elf-gcc --version xtensa-esp32-elf-gcc (crosstool-NG crosstool-ng-1.22.0-80-g6c4433a) 5.2.0
And FreeBSD says:
ice 250 % xtensa-esp32-elf-gcc --version xtensa-esp32-elf-gcc (crosstool-NG crosstool-ng-1.22.0-80-g6c4433a5) 5.2.0
So I believe I have the same version. To make the tool chain available I used:
mkdir ~/esp ln -s ../../../../../usr/local/xtensa-esp32-elf ~/esp
A bonus of having the toolchain under FreeBSD is that (with a little work) it should be possible to build esp32 arduino sketches (which BTW is where all of my previous esp8266 and esp32 experience is).
In the process of getting this up I ran into a few rough edges.
First, on FreeBSD libintl.a is part of the gettext-runtime and installs with /usr/local as the PREFIX. Attached is the change I made to esp-idf/tools/kconfig/Makefile. It makes more sense to me to use -I and -L based on what files are found rather than keying off OS/OSNAME but I can't easily test this change on Windows. If this looks ok I can generate a pull request.
I had trouble getting a working copy esp-idf. The developer guide says to check out remotes/origin/release/v2.1 but that version was giving C errors. Eventually I diff'ed against the copy I had on ubuntu and found this to be a good set of instructions:
git clone https://github.com/openvehicles/esp-idf.git cd esp-idf git submodule update --init
I assume the v2.1 step is obsolete. When I need to update it I use:
git pull git submodule update
(If correct) I think this would worth adding to the developers guide. (I have to admit I'm pretty inexperienced with git; a majority of the work I do is with subversion.)
The developers guid says to:
cp sdkconfig.default sdkconfig
This should be updated to
cp support/sdkconfig.default.hw31 sdkconfig
And there are a lot of new options missing from support/sdkconfig.default.hw31. Maybe the guide should say, "using the defaults is usually safe." (Would it be possible to automatically generate a version of sdkconfig using the defaults and not asking any questions?)
I cloned Open-Vehicle-Monitoring-System-3 and to update it I've been using:
git fetch upstream git checkout master git merge upstream/master git push
My module is currently running:
3.1.007-2-gc3e62cc-dirty/ota_0/main (build idf v3.1-dev-987-g55d915e9-dirty Jun 23 2018 12:04:27)
built on a FreeBSD 11.1-RELEASE system.
Craig
P.S. Thanks to Steve for all the offline help.
_______________________________________________ OvmsDev mailing list OvmsDev@lists.openvehicles.com http://lists.openvehicles.com/mailman/listinfo/ovmsdev
-- Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal Fon 02333 / 833 5735 * Handy 0176 / 206 989 26