【发布时间】:2018-02-26 11:25:15
【问题描述】:
在公司,我们使用 Eclipse CDT 来编译我们的嵌入式项目。使用所有编译选项,项目非常大,链接需要大量时间和 RAM 内存。
我有 8GB RAM 和 8GB 交换 linux 分区。有时在链接过程中会使用 4GB 的交换空间!在此操作系统几乎无法正常工作后,我必须重新启动 PC。有没有限制链接器 RAM 使用的解决方案?
(编译混合 C/C++ 项目。使用 gcc-arm-none-eabi-6-2017-q1-update 工具链。)
我的链接器
arm-none-eabi-ld --version
GNU ld (2.26-4ubuntu1+8) 2.26
Copyright (C) 2015 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
【问题讨论】:
-
Eclipse 没有任何链接器。它使用外部编译器和工具。实际上 Eclipse 本身可能非常消耗 RAM,我通常将 Eclipse 本身的堆限制提高到至少 8 Gb,这样它就不会经常崩溃。至于链接 RAM 的问题,你可以尝试切换到 Single Compilation Unit build(虽然这可能很耗时)。
-
好的。我添加了有关我的工具链的信息。