(虽然人有备胎不好,但是做事还是要有备胎这个概念的。今天写了一篇搭建环境的帖子,就一个简单的链接点击就灰飞烟灭了。。。这是第二遍码字)
对于小 e开发板的开发环境问题,其实如果想要简单的,追求偷懒的话,易通星云公司在发放的资料里给出了 Lubuntu的开发环境,直接拿来用就可以了。 虽说站在巨人的肩膀上是很明智的,但是对于学习上来说,拿来主义还是少取,至少也感受一下其中的过程。
对于开发所用的系统选择,windows当然也是可以的,但是我还是大力推荐Linux。对于简单的使用,Linux只是一个操作系统而已,简单的学习一下就会的,不必要担心没用过吧。Linux发行版本太多了,具体用哪个,自己选吧。推荐ubuntu,安装软件比较容易。我看到易通星云用的是Lubuntu,所以我也装上尝尝鲜。如果使用windows的童鞋,不需要傻傻的就重新安装个ubuntu,或者装个双系统也是可以的,但是最简单的方法是装个虚拟机软件,然后在虚拟机上装个ubuntu系统。不会装?(那就不必往下看了。)
下面就摘取GitHub上的教程与大家分享一下,地址: https://github.com/pfalcon/esp-open-sdk 为了凑点字数,我还是再次copy一下,之前我是翻译好的,下面我就不翻译了,就当学学英语吧。
Requirementsand DependenciesTobuild the standalone SDK and toolchain, you need a GNU/POSIX system(Linux, BSD, MacOSX, Windows with Cygwin) with the standard GNUdevelopment tools installed: bash, gcc, binutils, flex, bison, etc.
Pleasemake sure that the machine you use to build the toolchain has atleast 1G free RAM+swap (or more, which will speed up the build).
Ubuntu14.04:
$ sudo apt-get install make unrar autoconf automake libtool gcc g++ gperf flex bison texinfo gawk ncurses-dev libexpat-dev python python-serial sed git unzip bash help2manLaterDebian/Ubuntu versions may require: $ sudo apt-get install libtool-bin
BuildingBesure to clone recursively:
$ git clone --recursive https://github.com/pfalcon/esp-open-sdk.gitTheproject can be built in two modes:
Where the toolchain and tools are kept separate from the vendor IoT SDK which contains binary blobs. This makes licensing more clear, and helps facilitate upgrades to vendor SDK releases. A completely standalone ESP8266 SDK with the vendor SDK files merged into the toolchain. This mode makes it easier to build software (no additional -I and -L flags are needed), but redistributability of this build is unclear and upgrades to newer vendor IoT SDK releases are complicated. This mode is default for local builds. Note that if you want to redistribute the binary toolchain built with this mode, you should:
Make it clear to your users that the release is bound to a particular vendor IoT SDK and provide instructions how to upgrade to a newer vendor IoT SDK releases. Abide by licensing terms of the vendor IoT SDK.
Tobuild the self-contained, standalone toolchain+SDK: $ make STANDALONE=yThisis the default choice which most people are looking for, so just thefollowing is enough: $ makeTobuild the bare Xtensa toolchain and leave ESP8266 SDK separate: $ make STANDALONE=nThiswill download all necessary components and compile them. Usingthe toolchainOnceyou complete build process as described above, the toolchain (withthe Xtensa HAL library) will be available in the xtensa-lx106-elf/subdirectory.Add xtensa-lx106-elf/bin/subdirectoryto your PATHenvironmentvariable to execute xtensa-lx106-elf-gccandother tools. At the end of build process, the exact command to setPATH correctly for your case will be output. You may want to save it,as you'll need the PATH set correctly each time you compile forXtensa/ESP.
ESP8266SDK will be installed in sdk/.If you chose the non-standalone SDK, run the compiler with thecorresponding include and lib dir flags: $ xtensa-lx106-elf-gcc -I$(THISDIR)/sdk/include -L$(THISDIR)/sdk/libTheextra -I and -L flags are not needed when using the standalone SDK. PullingupdatesTheproject is updated from time to time, to get updates and prepare tobuild a new SDK, run:
$ make clean$ git pull$ git submodule sync$ git submodule update --initIfyou don't issue makeclean (whichcauses toolchain and SDK to be rebuilt from scratch on next make),you risk getting broken/inconsistent results.
AdditionalconfigurationYoucan build a statically linked toolchain by uncommentingCT_STATIC_TOOLCHAIN=yinthe file crosstool-config-overrides.More fine-tunable options may be available in that file and/orMakefile.
最后给点图给点真相: |