aboutsummaryrefslogtreecommitdiff
path: root/external/nanopb/nanopb.cmake
AgeCommit message (Collapse)Author
2023-02-15Fix libc dependency of external componentsGyorgy Szing
Currently the stdlib::c library, which represents the standard library in deployments compiled for "freestanding" environments (SPs) is added early to link dependencies of the target. As a result the link order is incorrect and symbol search for external components added later and depending on libc fails with GCC. As a workaround make external components depend on libc directly. Change-Id: Idb9da18bb8228dea56ef539cacf36964d2349937 Signed-off-by: Gyorgy Szing <Gyorgy.Szing@arm.com>
2022-11-03Build: add build type supportGyorgy Szing
Refactor cmake files to support setting the "build type" following CMake idioms. A "build type" is a set of compiler flags controlling code optimization and debug information generation. For more information on the supported types and their meaning please refer to the documentation. This change extends build type support to external components too. The build type of each component can be independently controlled using command line settings. For details about the supported types and settings, please refer to the cmake file of the external component and the documentation of the external project. This change tries to be backwards compatible and selects the default build type to be "Debug". This may change in the future. Change-Id: Ic041140bb8d4aaf0f07be9c4cac0638c03996eb5 Signed-off-by: Gyorgy Szing <Gyorgy.Szing@arm.com>
2022-05-20Change nanopb integration to use PropertyCopyGyorgy Szing
Pass libc specific compilation settings to nanopb build using PropertyCopy. This way not only system include and include paths are handled but compilation flags and linker flags too. This change makes nanopb build use the -nostdinc flag, which is needed for proper newlib integration and was missing. Change-Id: I9218a4261cee8acbb1d1e7076616f344edb5a272 Signed-off-by: Gyorgy Szing <Gyorgy.Szing@arm.com>
2022-05-18Fix passing libc settings to nanopb and MbedTLSGyorgy Szing
The nanobp and the MbedTLS build is not getting the system include PATH settings from stdlib::c. This patch fixes the issue. Change-Id: Ic345442590dcc1c2237377ef8cac3774ae8e7052 Signed-off-by: Gyorgy Szing <Gyorgy.Szing@arm.com>
2022-05-10Fix: nanopb_generator.py relative import issueGyorgy Szing
This change extends the PYTHON_PATH variable with the location of the nanopb python directory to fix stability issues when nanopb generation step is executed. Sometimes due to unknown circumstances, execution of nanopb_generator.py fails and the following import error is reported: ".... from .proto import nanopb_pb2 ImportError: attempted relative import with no known parent package" Some systems never encounter this problem, while others fail randomly. Change-Id: Idad916e30b6963369445f25085033ba035a39eca Signed-off-by: Gyorgy Szing <Gyorgy.Szing@arm.com>
2022-04-01Fix use of GIT_SHALLOW in external componentsJulian Hall
External component cmake files are specifying GIT_SHALLOW TRUE for the content fetch options for fetching upstream content. This option is intended for cases where a remote branch is being tracked and only the tip needs to be fetched. To maintain control over the versions of external components used, a specific tag or hash should be used as the refspec. For this behaviour, GIT_SHALLOW TRUE cannot be used as fetches will fail when the upstream repo changes. This change fixes the problem. Signed-off-by: Julian Hall <julian.hall@arm.com> Change-Id: I61cefb295352b0d2c46f6a426577605b6a3cfae6
2022-02-04Modify external dependencies to use LazyFetchGyorgy Szing
Refactor external dependencies use the new module. This gives more control over how external components is made available and allows the environment to use pre-build binaries or pre-fetched content. Moreover, passing parameters to external CMake build systems is made more robust by using initial cache files. Signed-off-by: Benedek Tomasik <benedek.tomasik@arm.com> Signed-off-by: Gyorgy Szing <Gyorgy.Szing@arm.com> Change-Id: I85d1990fc7697847307b0ca3a91052b35423d823
2021-10-04Fix: fix parallel build settings for dependenciesGyorgy Szing
- use the "ProcessorCount" module to determine available processors and use the value to configure parallel builds instead of constant number. Pass -DPROCESSOR_COUNT=<n> to cmake to override. - use cmake --build switches instead of build tool specific parameters - remove extra cmake run for install step Change-Id: I04981374be28a14e02dc7c85b230695f412b770e Signed-off-by: Gyorgy Szing <Gyorgy.Szing@arm.com>
2021-10-04Fix: Stop opteesp environment using default libcAndrew Beggs
The opteesp environment uses the libc implementation part of the SPDEV-KIT. Projects targeting the opteesp environment shall be configured to stop using the standard library and its header files part of the compiler package. This patch: - adds the missing compiler and linker options - adds header files missing from SPDEV-KITs libc implementation - extends the external component cmake files to align build options with the main project - moves environment specific mandatory flags to a common file - fixes the supported C standard from gnuc99 to c99 The following files where forked from TF-A (https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git; SHA: 7737fdf0ed): - stdarg.h - stdbool.h - stddef.h - stddef_.h Signed-off-by: Andrew Beggs <andrew.beggs@arm.com> Signed-off-by: Gyorgy Szing <Gyorgy.Szing@arm.com> Change-Id: I3890453a29b003c60c8f44dfd19d553e96b1796c
2021-07-01Fix: nanopb files always generatedGyorgy Szing
The dependencies of nanopb generation targets are incorrect and as a result the project is re-built even if there are no changed files. This patch corrects the dependencies and eliminates the unnecessary rebuilds. Change-Id: I52b07fcb868594994e2b61f4beb419a9928b8db2 Signed-off-by: Gyorgy Szing <Gyorgy.Szing@arm.com>
2020-11-27Add serializer service for protobufJulian Hall
Implements a serializer service for protobuf using nanopb. Adds external component to fetch nanopb. Change-Id: I31464be0e38d78bdf543e9f30bd51218e935dc9d Signed-off-by: Julian Hall <julian.hall@arm.com>