Overview
For more flexibility and upgradeability, GNU MCU Eclipse is not packed as a all-inclusive suite to be installed in a single step. However, the separate steps are relatively easy to perform, and installing the plug-ins and the tools can be successfully completed even by non-experienced users.
為了獲得更靈活、可升級的特性,GUN MCU Eclipse 沒有在單步安裝中集成所有內容的套件。然而,獨立步驟也是相對簡單的,並且安裝插件與工具甚至對於沒有經驗的用戶來說也是可以成功完成的。
Note for beginners: If performed for the first time, it is recommended to follow the steps by the book and avoid poetic licenses, since they might lead to tricky situations and subtle functional problems.
初學者請注意:如果是第一次操作,建議根據 "by the book"步驟,並避免poetic licenses(因為它們可能會導致棘手和微妙的問題)
建議的操作順序如下所示:
The recommended sequence is described below.
xpm - the xPack Manager
xpm
是一個新的工具,目前還在發展中,意在管理軟件包(xPacks),其中包括了安裝二進制發行版。
xpm
is a new tool, currently under development, intended to manage software packages (xPacks), including to install binary distributions. It is built on top of Node.js and is highly portable; the install steps are described in the xpm install page.
對於 GNU/Linux 用戶 : 你的發行版系統中可能已經裝有一個
node
,如果它的版本小於8,那么xpm
會停止並彈出警告。總之,我們強烈建議你避免使用發行版的node
,並至少安裝Node.js的長期支持包。
Warning for GNU/Linux users: your distribution may already have anode
binary installed; if it is not >= 8.x,xpm
will complain and do not start; anyway, we strongly recommend to avoid the distribution binary and install at least the LTS package from Node.js.
Warning for Windows users: binary packages are .zip files containing .exe files; some aggressive antivirus programs may quarantine those files, or even modify the content of the archives, thus changing the checksum and thus preventing the packages to be installed; either configure or temporarily disable the antivirus if necessary.
目前,xpm
不是強制安裝的,但它是一個有用的附加部分,因為它提供了便捷的方式來安裝以及更新 ARM 與 RISC-V 工具鏈,PopenOCD,QEMU和 Windows構建工具。
Currently xpm
is not mandatory, but it is a useful addition since it provides a convenient way to install and later upgrade the ARM and RISC-V toolchains, OpenOCD, QEMU and the Windows Build Tools.
$ sudo npm install --global xpm@latest
[sudo] password for schips:
/usr/local/bin/xpm -> /usr/local/lib/node_modules/xpm/bin/xpm.js
+ xpm@0.5.0
added 260 packages from 146 contributors in 15.142s
xPack Dev Tools
在2019年中,主要的工具從GNU MCU Eclipse 項目移到了 xPack 項目,而且所有新發布版本都可以通過@xpack-dev-tools
獲得
In mid-2019, the main binary tools were moved from the GNU MCU Eclipse project to xPack project, and all new releases are available via the @xpack-dev-tools
scope.
所有先前的發布版本仍然存在於@gnu-mcu-eclipse
中,但這些是過時的版本,不推薦在新項目中使用。
All previous releases are still available in the @gnu-mcu-eclipse
scope, but were deprecated and are not recommended for new projects.
Toolchain(s)
通常這一步是強制性的,因為大多數平台在默認情況下都沒有嵌入GCC工具鏈(ARM或RISC-V)。
This is generally mandatory, since most platforms do not come by default with an embedded GCC toolchain (ARM or RISC-V).
Please follow the steps in the ARM Toolchain install or RISC-V Toolchain install page.
For ARM, the easy install method is:
$ xpm install --global @xpack-dev-tools/arm-none-eabi-gcc@latest
For RISC-V, the easy install method is:
$ xpm install --global @xpack-dev-tools/riscv-none-embed-gcc@latest
Windows Build Tools
This step is Windows specific, and it is highly recommended to use the GNU MCU Eclipse Windows Build Tools, and avoid other make.exe
programs, even if they apparently work, since subtle differences in path processing exists between different versions of make
.
Please follow the steps in the How to install the Windows Build Tools page.
The easy install method is:
$ xpm install --global @gnu-mcu-eclipse/windows-build-tools
POSIX platforms generally include make
in the system distribution, or might require to install some developer packages (for example on macOS you need to install the Xcode Command Line Tools).
SEGGER J-Link
SEGGER J-Link is the recommended debugger and, if available, please follow the steps in the How to install the SEGGER J-Link page.
OpenOCD
For the unfortunate developers who do not have a J-Link available, the alternative is to follow the steps in the How to install the OpenOCD binaries page.
The easy install method is:
$ xpm install --global @xpack-dev-tools/openocd@latest
OpenOCD might be needed when using development boards with integrated debuggers, like STM32F4-DISCOVERY boards, although the recommended solution is to prepare a custom cable and connect them to J-Link.
OpenOCD is also needed when using RISC-V boards with integrated debuggers.
QEMU
QEMU is a hardware emulator that can be successfully used to run simple blinky applications, and the default tutorial requires QEMU, so it is highly recommended to install it.
The easy install method is:
$ xpm install --global @xpack-dev-tools/qemu-arm@latest
For more details, please follow the steps in the How to install the QEMU binaries page.
Jumper Virtual Lab
Jumper Virtual lab is an emulator that provides a fast and easy way to execute firmware files on a virtual device running on the development machine. Jumper’s Eclipse plug-in uses the debug framework provided by the GNU MCU Eclipse plug-ins.
To install the Jumper Virtual Lab, use the following links:
Jumper Virtual lab is a product of Jumper Labs Ltd, a third party company not directly related to GNU MCU Eclipse. For questions and further info, please contact Jumper Labs via their support channels.
Java
As a prerequisite for Eclipse, Java is required.
Java is no longer a very hot technology, so it is generally not available by default on most platforms and requires separate installation.
More details are available in the How to install the GNU MCU Eclipse plug-ins page.
Eclipse & CDT
Eclipse is the development platform where the GNU MCU Eclipse plug-ins run. Generally it is not available by default on most platforms and requires separate installation.
The simple way is to download GNU MCU Eclipse IDE for C/C++ Developers from GitHub Releases and you get at once both Eclipse CDT and the MCU plug-ins.
If you prefer the manual way, be sure you install the Eclipse IDE for C/C++ Developers, not other package, since otherwise you’ll have to manually install CDT.
More details are available in the How to install the GNU MCU Eclipse plug-ins page.
Note: on GNU/Linux be sure you manually install the Eclipse; DO NOT try to install it via the Synaptics package manager, or similar, since usually you get an older version and the CDT plug-ins are not included.
Plug-ins
Once the Java & Eclipse are functional, please proceed with plug-ins install, as explains in the How to install the GNU MCU Eclipse plug-ins page.
Workspace preferences
It is highly recommended that this step be performed after creating each and any Eclipse workspace; for this please follow the steps in the Workspace preferences page.
CMSIS packages
To assist the debugger in finding the peripheral registers definitions, please check the The CMSIS Packs manager page, and install the CMSIS packs for the family of devices used by your projects.m