mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-29 17:47:14 +02:00
Allow to specify own path to the linker script (ld) using build_flags option // Resolve #233
This commit is contained in:
@ -4,8 +4,11 @@ Release History
|
||||
2.2.0 (2015-??-??)
|
||||
------------------
|
||||
|
||||
* Allow to specify library compatibility with the all platforms/frameworks using
|
||||
``*`` symbol in
|
||||
* Allowed to specify own path to the linker script (ld) using
|
||||
`build_flags <http://docs.platformio.org/en/latest/projectconf.html#build-flags>`__ option
|
||||
(`issue #233 <https://github.com/platformio/platformio/issues/233>`_)
|
||||
* Allowed to specify library compatibility with the all platforms/frameworks
|
||||
using ``*`` symbol in
|
||||
`library.json <http://docs.platformio.org/en/latest/librarymanager/config.html>`__
|
||||
* Fixed ``stk500v2_command(): command failed``
|
||||
(`issue #238 <https://github.com/platformio/platformio/issues/238>`_)
|
||||
|
@ -226,10 +226,6 @@ processes:
|
||||
* - Format
|
||||
- Scope
|
||||
- Description
|
||||
* - ``-Wp,option``
|
||||
- CPPFLAGS
|
||||
- Bypass the compiler driver and pass *option* directly through to the
|
||||
preprocessor
|
||||
* - ``-D name``
|
||||
- CPPDEFINES
|
||||
- Predefine *name* as a macro, with definition 1.
|
||||
@ -241,6 +237,10 @@ processes:
|
||||
- CPPDEFINES
|
||||
- Cancel any previous definition of *name*, either built in or provided
|
||||
with a ``-D`` option.
|
||||
* - ``-Wp,option``
|
||||
- CPPFLAGS
|
||||
- Bypass the compiler driver and pass *option* directly through to the
|
||||
preprocessor
|
||||
* - ``-Wall``
|
||||
- CCFLAGS
|
||||
- Turns on all optional warnings which are desirable for normal code.
|
||||
@ -254,10 +254,18 @@ processes:
|
||||
- CCFLAGS
|
||||
- Process *file* as if ``#include "file"`` appeared as the first line of
|
||||
the primary source file.
|
||||
* - ``-Idir``
|
||||
- CPPPATH
|
||||
- Add the directory *dir* to the list of directories to be searched
|
||||
for header files.
|
||||
* - ``-Wa,option``
|
||||
- ASFLAGS, CCFLAGS
|
||||
- Pass *option* as an option to the assembler. If *option* contains
|
||||
commas, it is split into multiple options at the commas.
|
||||
* - ``-Wl,option``
|
||||
- LINKFLAGS
|
||||
- Pass *option* as an option to the linker. If *option* contains
|
||||
commas, it is split into multiple options at the commas.
|
||||
* - ``-llibrary``
|
||||
- LIBS
|
||||
- Search the *library* named library when linking
|
||||
@ -265,10 +273,6 @@ processes:
|
||||
- LIBPATH
|
||||
- Add directory *dir* to the list of directories to be searched for
|
||||
``-l``.
|
||||
* - ``-Idir``
|
||||
- CPPPATH
|
||||
- Add the directory *dir* to the list of directories to be searched
|
||||
for header files.
|
||||
|
||||
This option can be set by global environment variable
|
||||
:ref:`envvar_PLATFORMIO_BUILD_FLAGS`.
|
||||
@ -278,11 +282,14 @@ Example:
|
||||
.. code-block:: ini
|
||||
|
||||
[env:specific_defines]
|
||||
build_flags = -O2 -Dfoo -Dbar=1
|
||||
build_flags = -Dfoo -Dbar=1
|
||||
|
||||
[env:specific_inclibs]
|
||||
build_flags = -I/opt/include -L/opt/lib -lfoo
|
||||
|
||||
[env:specific_ld_script]
|
||||
build_flags = -Wl,-T/path/to/ld_script.ld
|
||||
|
||||
|
||||
For more detailed information about available flags/options go to:
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Copyright (C) Ivan Kravets <me@ikravets.com>
|
||||
# See LICENSE for details.
|
||||
|
||||
VERSION = (2, 2, "0.dev0")
|
||||
VERSION = (2, 2, "0.dev1")
|
||||
__version__ = ".".join([str(s) for s in VERSION])
|
||||
|
||||
__title__ = "platformio"
|
||||
|
@ -35,9 +35,10 @@ def BuildFirmware(env):
|
||||
deplibs = firmenv.BuildDependentLibraries("$PROJECTSRC_DIR")
|
||||
|
||||
# append specified LD_SCRIPT
|
||||
if "LDSCRIPT_PATH" in firmenv:
|
||||
if ("LDSCRIPT_PATH" in firmenv and
|
||||
not any(["-Wl,-T" in f for f in firmenv['LINKFLAGS']])):
|
||||
firmenv.Append(
|
||||
LINKFLAGS=["-T", "$LDSCRIPT_PATH"]
|
||||
LINKFLAGS=["-Wl,-T", "$LDSCRIPT_PATH"]
|
||||
)
|
||||
|
||||
# enable "cyclic reference" for linker
|
||||
|
Reference in New Issue
Block a user