2022-10-09 |
Don't use whole-archive linking (#71)
...
* First attempt at converting to OBJECT libraries. Not working due to more object library limitations
* Only compile the main libraries as OBJECT, because that's all that CMake can be made to do right now.
* Fix availability of target-specific flags
* Missed some usages
* Fix some STM32 ethernet stuff that was not linking correctly
* More fixes for STM32 ethernet and weak symbols
* Fix prebuilt object file linking for MUSCA_S1
* Fix STM32 eth init license headers
Jamie Smith
authored
on 9 Oct 2022
GitHub
committed
on 9 Oct 2022
|
2021-07-22 |
Rework post-build to support multiple executables
...
When building greentea tests, each test is an executable with its
own output binary path. This is also the case when a user project
produces multiple executables. But the current implementation of
post-build operations always assumes there's only one executable,
at the root of the build directory.
The post-build command depends on Mbed target, and it always takes
the the executable we build as an input file. To achieve this, we
let each Mbed target (that has a post-build command) define a function
function(mbed_post_build_function target)
which takes a CMake executable target as an argument from which it can
get its binary path using generator expressions. It generates and adds
to the passed executable target a post-build custom command.
Notes:
* The function name needs to be exact, because CMake only supports
literal function calls - CMake can't dereference a function name from
a variable. To avoid multiple definitions of this function, each Mbed
target needs to guard it with a macro to check if the user is
building this Mbed target.
* `mbed_post_build_function()` is a function, but it is usually
defined by another macro rather than a parent function, because
nesting functions would make many variables inaccessible inside the
innermost `mbed_post_build_function()`.
* There's no more need to force regenerate images. Previously, post-
build commands were custom *targets* which always got to run, so we
force regenerated images on every build to avoid patching an image
that's already been patched once on previous build. Now post-build
commands are custom *commands* of the same executable target, and they
are only run if the executable target itself is rebuilt.
Lingkai Dong
committed
on 22 Jul 2021
|
2021-04-14 |
CMake: fix for CMAKE_CURRENT_LIST_DIR in functions
...
CMAKE_CURRENT_LIST_DIR behaves differently in functions. We store it in the CMakeLists itself, so anyone
calling a function would get the actual list dir where the scripts are.
To illustrate: if I call a function from src/CMakelists.txt, function located in src/scripts, `CMAKE_CURRENT_LIST_DIR` in the function would point
to the src/ folder but not to src/scripts.
Martin Kojtal
committed
on 14 Apr 2021
|
CMake targets: remove MBED_PATH, use stadard variables
...
- list files included via module path
- <project-name>_SOURCE_DIR for sources that are out of the current processed CMake
- CMAKE_CURRENT_LIST_DIR for listfiles
Martin Kojtal
committed
on 14 Apr 2021
|
2021-03-04 |
NXP: Query precise application names in post build
...
This removes the need to use "glob" a file extension, and uses
precise application names.
Lingkai Dong
committed
on 4 Mar 2021
|
2021-02-23 |
CMake: Remove references of APP_TARGET
...
This needs to be removed as there should not be a
name requirement for application CMake variable name.
Furthermore, in certain uses cases it prevents
successful builds for some Mbed targets. For instance
when building Greentea test applications for Mbed
targets that require post build operations as they do
not define APP_TARGET.
Hugues Kamba
committed
on 23 Feb 2021
|
2021-02-15 |
Fix post build mechanism with unique CMake custom targets
...
The CMake custom target must be unique to avoid more than one
Mbed target adding the same. Only the CMake custom command added for the
Mbed target being built is run as the custom CMake target now includes
the Mbed target name.
Hugues Kamba
committed
on 15 Feb 2021
|
2021-02-11 |
CMake: Add post build operation support
...
A CMake custom target, mbed-post-build, is added as a dependency of the
application CMake target if a Mbed target adds a CMake custom target
named mbed-post-build-bin. mbed-post-build-bin is added as a dependency
of mbed-post-build. mbed-post-build-bin depends on the application binary.
This is done so a CMake custom command that executes post-build can be added.
The Python scripts that implement the operations have been modified to add
CLI entry points so they can be called from CMake. Dependency on the old
tool has been removed on those scripts by passing them exactly what they
require instead of passing old tool Python objects. A consequence of that
was to slightly amend how the old tool calls some of those Python modules.
Support has only been added for Mbed targets that currently have a requirement
for post build operations. This includes: LPC1114, LPC1768, ARCH_PRO, LPC54114,
LPC546XX, FF_LPC546XX, CY8CKIT064B0S2_4343W, CYTFM_064B0S2_4343W, CYSBSYSKIT_01
The following targets are not supported as TFM support is not yet included:
ARM_MUSCA_B1, ARM_MUSCA_B1_NS, ARM_MUSCA_S1, ARM_MUSCA_S1_NS.
Hugues Kamba
committed
on 11 Feb 2021
|