LCOV - code coverage report
Current view: top level - zephyr - bindesc.h Hit Total Coverage
Test: new.info Lines: 46 62 74.2 %
Date: 2025-01-09 21:13:38

          Line data    Source code
       1           0 : /*
       2             :  * Copyright (c) 2023 Yonatan Schachter
       3             :  *
       4             :  * SPDX-License-Identifier: Apache-2.0
       5             :  */
       6             : 
       7             : #ifndef ZEPHYR_INCLUDE_ZEPHYR_BINDESC_H_
       8             : #define ZEPHYR_INCLUDE_ZEPHYR_BINDESC_H_
       9             : 
      10             : #include <zephyr/sys/util_macro.h>
      11             : 
      12             : #ifdef __cplusplus
      13             : extern "C" {
      14             : #endif /* __cplusplus */
      15             : 
      16             : /*
      17             :  * Corresponds to the definitions in scripts/west_commands/bindesc.py.
      18             :  * Do not change without syncing the definitions in both files!
      19             :  */
      20           0 : #define BINDESC_MAGIC 0xb9863e5a7ea46046
      21           0 : #define BINDESC_ALIGNMENT 4
      22           0 : #define BINDESC_TYPE_UINT 0x0
      23           0 : #define BINDESC_TYPE_STR 0x1
      24           0 : #define BINDESC_TYPE_BYTES 0x2
      25           0 : #define BINDESC_TYPE_DESCRIPTORS_END 0xf
      26             : /* sizeof ignores the data as it's a flexible array */
      27           0 : #define BINDESC_ENTRY_HEADER_SIZE (sizeof(struct bindesc_entry))
      28             : 
      29             : /**
      30             :  * @brief Binary Descriptor Definition
      31             :  * @defgroup bindesc_define Bindesc Define
      32             :  * @ingroup os_services
      33             :  * @{
      34             :  */
      35             : 
      36             : /*
      37             :  * Corresponds to the definitions in scripts/west_commands/bindesc.py.
      38             :  * Do not change without syncing the definitions in both files!
      39             :  */
      40             : 
      41             : /** The app version string such as "1.2.3" */
      42           1 : #define BINDESC_ID_APP_VERSION_STRING 0x800
      43             : 
      44             : /** The app version major such as 1 */
      45           1 : #define BINDESC_ID_APP_VERSION_MAJOR 0x801
      46             : 
      47             : /** The app version minor such as 2 */
      48           1 : #define BINDESC_ID_APP_VERSION_MINOR 0x802
      49             : 
      50             : /** The app version patchlevel such as 3 */
      51           1 : #define BINDESC_ID_APP_VERSION_PATCHLEVEL 0x803
      52             : 
      53             : /** The app version number such as 0x10203 */
      54           1 : #define BINDESC_ID_APP_VERSION_NUMBER 0x804
      55             : 
      56             : /** The app git reference such as "v3.3.0-18-g2c85d9224fca" */
      57           1 : #define BINDESC_ID_APP_BUILD_VERSION 0x805
      58             : 
      59             : /** The kernel version string such as "3.4.0" */
      60           1 : #define BINDESC_ID_KERNEL_VERSION_STRING 0x900
      61             : 
      62             : /** The kernel version major such as 3 */
      63           1 : #define BINDESC_ID_KERNEL_VERSION_MAJOR 0x901
      64             : 
      65             : /** The kernel version minor such as 4 */
      66           1 : #define BINDESC_ID_KERNEL_VERSION_MINOR 0x902
      67             : 
      68             : /** The kernel version patchlevel such as 0 */
      69           1 : #define BINDESC_ID_KERNEL_VERSION_PATCHLEVEL 0x903
      70             : 
      71             : /** The kernel version number such as 0x30400 */
      72           1 : #define BINDESC_ID_KERNEL_VERSION_NUMBER 0x904
      73             : 
      74             : /** The kernel git reference such as "v3.3.0-18-g2c85d9224fca" */
      75           1 : #define BINDESC_ID_KERNEL_BUILD_VERSION 0x905
      76             : 
      77             : /** The year the image was compiled in */
      78           1 : #define BINDESC_ID_BUILD_TIME_YEAR 0xa00
      79             : 
      80             : /** The month of the year the image was compiled in */
      81           1 : #define BINDESC_ID_BUILD_TIME_MONTH 0xa01
      82             : 
      83             : /** The day of the month the image was compiled in */
      84           1 : #define BINDESC_ID_BUILD_TIME_DAY 0xa02
      85             : 
      86             : /** The hour of the day the image was compiled in */
      87           1 : #define BINDESC_ID_BUILD_TIME_HOUR 0xa03
      88             : 
      89             : /** The minute the image was compiled in */
      90           1 : #define BINDESC_ID_BUILD_TIME_MINUTE 0xa04
      91             : 
      92             : /** The second the image was compiled in */
      93           1 : #define BINDESC_ID_BUILD_TIME_SECOND 0xa05
      94             : 
      95             : /** The UNIX time (seconds since midnight of 1970/01/01) the image was compiled in */
      96           1 : #define BINDESC_ID_BUILD_TIME_UNIX 0xa06
      97             : 
      98             : /** The date and time of compilation such as "2023/02/05 00:07:04" */
      99           1 : #define BINDESC_ID_BUILD_DATE_TIME_STRING 0xa07
     100             : 
     101             : /** The date of compilation such as "2023/02/05" */
     102           1 : #define BINDESC_ID_BUILD_DATE_STRING 0xa08
     103             : 
     104             : /** The time of compilation such as "00:07:04" */
     105           1 : #define BINDESC_ID_BUILD_TIME_STRING 0xa09
     106             : 
     107             : /** The name of the host that compiled the image */
     108           1 : #define BINDESC_ID_HOST_NAME 0xb00
     109             : 
     110             : /** The C compiler name */
     111           1 : #define BINDESC_ID_C_COMPILER_NAME 0xb01
     112             : 
     113             : /** The C compiler version */
     114           1 : #define BINDESC_ID_C_COMPILER_VERSION 0xb02
     115             : 
     116             : /** The C++ compiler name */
     117           1 : #define BINDESC_ID_CXX_COMPILER_NAME 0xb03
     118             : 
     119             : /** The C++ compiler version */
     120           1 : #define BINDESC_ID_CXX_COMPILER_VERSION 0xb04
     121             : 
     122           0 : #define BINDESC_TAG_DESCRIPTORS_END BINDESC_TAG(DESCRIPTORS_END, 0x0fff)
     123             : 
     124             : /**
     125             :  * @cond INTERNAL_HIDDEN
     126             :  */
     127             : 
     128             : /*
     129             :  * Utility macro to generate a tag from a type and an ID
     130             :  *
     131             :  * type - Type of the descriptor, UINT, STR or BYTES
     132             :  * id - Unique ID for the descriptor, must fit in 12 bits
     133             :  */
     134             : #define BINDESC_TAG(type, id) ((BINDESC_TYPE_##type & 0xf) << 12 | (id & 0x0fff))
     135             : 
     136             : /**
     137             :  * @brief Utility macro to get the type of a bindesc tag
     138             :  *
     139             :  * @param tag Tag to get the type of
     140             :  */
     141             : #define BINDESC_GET_TAG_TYPE(tag) ((tag >> 12) & 0xf)
     142             : 
     143             : /**
     144             :  * @endcond
     145             :  */
     146             : 
     147             : #if !defined(_LINKER) || defined(__DOXYGEN__)
     148             : 
     149             : #include <zephyr/sys/byteorder.h>
     150             : #include <zephyr/device.h>
     151             : 
     152             : /**
     153             :  * @cond INTERNAL_HIDDEN
     154             :  */
     155             : 
     156             : /*
     157             :  * Utility macro to get the name of a bindesc entry
     158             :  */
     159             : #define BINDESC_NAME(name) bindesc_entry_##name
     160             : 
     161             : /* Convenience helper for declaring a binary descriptor entry. */
     162             : #define __BINDESC_ENTRY_DEFINE(name)                                                    \
     163             :         __aligned(BINDESC_ALIGNMENT) const struct bindesc_entry BINDESC_NAME(name)      \
     164             :         __in_section(_bindesc_entry, static, name) __used __noasan
     165             : 
     166             : /**
     167             :  * @endcond
     168             :  */
     169             : 
     170             : /**
     171             :  * @brief Define a binary descriptor of type string.
     172             :  *
     173             :  * @details
     174             :  * Define a string that is registered in the binary descriptor header.
     175             :  * The defined string can be accessed using @ref BINDESC_GET_STR
     176             :  *
     177             :  * @note The defined string is not static, so its name must not collide with
     178             :  * any other symbol in the executable.
     179             :  *
     180             :  * @param name Name of the descriptor
     181             :  * @param id Unique ID of the descriptor
     182             :  * @param value A string value for the descriptor
     183             :  */
     184           1 : #define BINDESC_STR_DEFINE(name, id, value)                                                     \
     185             :         __BINDESC_ENTRY_DEFINE(name) = {                                                        \
     186             :                 .tag = BINDESC_TAG(STR, id),                                                    \
     187             :                 .len = (uint16_t)sizeof(value),                                                 \
     188             :                 .data = value,                                                                  \
     189             :         };                                                                                      \
     190             :         BUILD_ASSERT(sizeof(value) <= CONFIG_BINDESC_DEFINE_MAX_DATA_SIZE,                   \
     191             :                      "Bindesc " STRINGIFY(name) " exceeded maximum size, consider reducing the"     \
     192             :                      " size or changing CONFIG_BINDESC_DEFINE_MAX_DATA_SIZE. ")
     193             : 
     194             : /**
     195             :  * @brief Define a binary descriptor of type uint.
     196             :  *
     197             :  * @details
     198             :  * Define an integer that is registered in the binary descriptor header.
     199             :  * The defined integer can be accessed using @ref BINDESC_GET_UINT
     200             :  *
     201             :  * @note The defined integer is not static, so its name must not collide with
     202             :  * any other symbol in the executable.
     203             :  *
     204             :  * @param name Name of the descriptor
     205             :  * @param id Unique ID of the descriptor
     206             :  * @param value An integer value for the descriptor
     207             :  */
     208           1 : #define BINDESC_UINT_DEFINE(name, id, value)            \
     209             :         __BINDESC_ENTRY_DEFINE(name) = {                \
     210             :                 .tag = BINDESC_TAG(UINT, id),           \
     211             :                 .len = (uint16_t)sizeof(uint32_t),      \
     212             :                 .data = sys_uint32_to_array(value),     \
     213             :         }
     214             : 
     215             : /**
     216             :  * @brief Define a binary descriptor of type bytes.
     217             :  *
     218             :  * @details
     219             :  * Define a uint8_t array that is registered in the binary descriptor header.
     220             :  * The defined array can be accessed using @ref BINDESC_GET_BYTES.
     221             :  * The value should be given as an array literal, wrapped in parentheses, for
     222             :  * example:
     223             :  *
     224             :  *     BINDESC_BYTES_DEFINE(name, id, ({1, 2, 3, 4}));
     225             :  *
     226             :  * @note The defined array is not static, so its name must not collide with
     227             :  * any other symbol in the executable.
     228             :  *
     229             :  * @param name Name of the descriptor
     230             :  * @param id Unique ID of the descriptor
     231             :  * @param value A uint8_t array as data for the descriptor
     232             :  */
     233           1 : #define BINDESC_BYTES_DEFINE(name, id, value)                                                   \
     234             :         __BINDESC_ENTRY_DEFINE(name) = {                                                        \
     235             :                 .tag = BINDESC_TAG(BYTES, id),                                                  \
     236             :                 .len = (uint16_t)sizeof((uint8_t [])__DEBRACKET value),                         \
     237             :                 .data = __DEBRACKET value,                                                      \
     238             :         };                                                                                      \
     239             :         BUILD_ASSERT(sizeof((uint8_t [])__DEBRACKET value) <=                                        \
     240             :                      CONFIG_BINDESC_DEFINE_MAX_DATA_SIZE,                                       \
     241             :                      "Bindesc " STRINGIFY(name) " exceeded maximum size, consider reducing the"     \
     242             :                      " size or changing CONFIG_BINDESC_DEFINE_MAX_DATA_SIZE. ")
     243             : 
     244             : /**
     245             :  * @brief Get the value of a string binary descriptor
     246             :  *
     247             :  * @details
     248             :  * Get the value of a string binary descriptor, previously defined by
     249             :  * BINDESC_STR_DEFINE.
     250             :  *
     251             :  * @param name Name of the descriptor
     252             :  */
     253           1 : #define BINDESC_GET_STR(name) BINDESC_NAME(name).data
     254             : 
     255             : /**
     256             :  * @brief Get the value of a uint binary descriptor
     257             :  *
     258             :  * @details
     259             :  * Get the value of a uint binary descriptor, previously defined by
     260             :  * BINDESC_UINT_DEFINE.
     261             :  *
     262             :  * @param name Name of the descriptor
     263             :  */
     264           1 : #define BINDESC_GET_UINT(name) *(uint32_t *)&(BINDESC_NAME(name).data)
     265             : 
     266             : /**
     267             :  * @brief Get the value of a bytes binary descriptor
     268             :  *
     269             :  * @details
     270             :  * Get the value of a string binary descriptor, previously defined by
     271             :  * BINDESC_BYTES_DEFINE. The returned value can be accessed as an array:
     272             :  *
     273             :  *     for (size_t i = 0; i < BINDESC_GET_SIZE(name); i++)
     274             :  *         BINDESC_GET_BYTES(name)[i];
     275             :  *
     276             :  * @param name Name of the descriptor
     277             :  */
     278           1 : #define BINDESC_GET_BYTES(name) BINDESC_NAME(name).data
     279             : 
     280             : /**
     281             :  * @brief Get the size of a binary descriptor
     282             :  *
     283             :  * @details
     284             :  * Get the size of a binary descriptor. This is particularly useful for
     285             :  * bytes binary descriptors where there's no null terminator.
     286             :  *
     287             :  * @param name Name of the descriptor
     288             :  */
     289           1 : #define BINDESC_GET_SIZE(name) BINDESC_NAME(name).len
     290             : 
     291             : /**
     292             :  * @}
     293             :  */
     294             : 
     295             : /*
     296             :  * An entry of the binary descriptor header. Each descriptor is
     297             :  * described by one of these entries.
     298             :  */
     299           0 : struct bindesc_entry {
     300             :         /** Tag of the entry */
     301           1 :         uint16_t tag;
     302             :         /** Length of the descriptor data */
     303           1 :         uint16_t len;
     304             :         /** Value of the entry. This is either an integer or a string */
     305           1 :         uint8_t data[];
     306             : } __packed;
     307             : 
     308             : /*
     309             :  * We're assuming that `struct bindesc_entry` has a specific layout in
     310             :  * memory, so it's worth making sure that the layout is really what we
     311             :  * think it is. If these assertions fail for your toolchain/platform,
     312             :  * please open a bug report.
     313             :  */
     314           0 : BUILD_ASSERT(offsetof(struct bindesc_entry, tag) == 0, "Incorrect memory layout");
     315             : BUILD_ASSERT(offsetof(struct bindesc_entry, len) == 2, "Incorrect memory layout");
     316             : BUILD_ASSERT(offsetof(struct bindesc_entry, data) == 4, "Incorrect memory layout");
     317             : 
     318           0 : struct bindesc_handle {
     319           0 :         const uint8_t *address;
     320           0 :         enum {
     321             :                 BINDESC_HANDLE_TYPE_RAM,
     322             :                 BINDESC_HANDLE_TYPE_MEMORY_MAPPED_FLASH,
     323             :                 BINDESC_HANDLE_TYPE_FLASH,
     324           0 :         } type;
     325           0 :         size_t size_limit;
     326             : #if IS_ENABLED(CONFIG_BINDESC_READ_FLASH)
     327             :         const struct device *flash_device;
     328             :         uint8_t buffer[sizeof(struct bindesc_entry) +
     329             :                         CONFIG_BINDESC_READ_FLASH_MAX_DATA_SIZE] __aligned(BINDESC_ALIGNMENT);
     330             : #endif /* IS_ENABLED(CONFIG_BINDESC_READ_FLASH) */
     331             : };
     332             : 
     333             : /**
     334             :  * @brief Reading Binary Descriptors of other images.
     335             :  * @defgroup bindesc_read Bindesc Read
     336             :  * @ingroup os_services
     337             :  * @{
     338             :  */
     339             : 
     340             : /**
     341             :  * @brief Callback type to be called on descriptors found during a walk
     342             :  *
     343             :  * @param entry Current descriptor
     344             :  * @param user_data The user_data given to @ref bindesc_foreach
     345             :  *
     346             :  * @return Any non zero value will halt the walk
     347             :  */
     348           1 : typedef int (*bindesc_callback_t)(const struct bindesc_entry *entry, void *user_data);
     349             : 
     350             : /**
     351             :  * @brief Open an image's binary descriptors for reading, from a memory mapped flash
     352             :  *
     353             :  * @details
     354             :  * Initializes a bindesc handle for subsequent calls to bindesc API.
     355             :  * Memory mapped flash is any flash that can be directly accessed by the CPU,
     356             :  * without needing to use the flash API for copying the data to RAM.
     357             :  *
     358             :  * @param handle Bindesc handle to be given to subsequent calls
     359             :  * @param offset The offset from the beginning of the flash that the bindesc magic can be found at
     360             :  *
     361             :  * @retval 0 On success
     362             :  * @retval -ENOENT If no bindesc magic was found at the given offset
     363             :  */
     364           1 : int bindesc_open_memory_mapped_flash(struct bindesc_handle *handle, size_t offset);
     365             : 
     366             : /**
     367             :  * @brief Open an image's binary descriptors for reading, from RAM
     368             :  *
     369             :  * @details
     370             :  * Initializes a bindesc handle for subsequent calls to bindesc API.
     371             :  * It's assumed that the whole bindesc context was copied to RAM prior to calling
     372             :  * this function, either by the user or by a bootloader.
     373             :  *
     374             :  * @note The given address must be aligned to BINDESC_ALIGNMENT
     375             :  *
     376             :  * @param handle Bindesc handle to be given to subsequent calls
     377             :  * @param address The address that the bindesc magic can be found at
     378             :  * @param max_size Maximum size of the given buffer
     379             :  *
     380             :  * @retval 0 On success
     381             :  * @retval -ENOENT If no bindesc magic was found at the given address
     382             :  * @retval -EINVAL If the given address is not aligned
     383             :  */
     384           1 : int bindesc_open_ram(struct bindesc_handle *handle, const uint8_t *address, size_t max_size);
     385             : 
     386             : /**
     387             :  * @brief Open an image's binary descriptors for reading, from flash
     388             :  *
     389             :  * @details
     390             :  * Initializes a bindesc handle for subsequent calls to bindesc API.
     391             :  * As opposed to reading bindesc from RAM or memory mapped flash, this
     392             :  * backend requires reading the data from flash to an internal buffer
     393             :  * using the flash API
     394             :  *
     395             :  * @param handle Bindesc handle to be given to subsequent calls
     396             :  * @param offset The offset from the beginning of the flash that the bindesc magic can be found at
     397             :  * @param flash_device Flash device to read descriptors from
     398             :  *
     399             :  * @retval 0 On success
     400             :  * @retval -ENOENT If no bindesc magic was found at the given offset
     401             :  */
     402           1 : int bindesc_open_flash(struct bindesc_handle *handle, size_t offset,
     403             :                        const struct device *flash_device);
     404             : 
     405             : /**
     406             :  * @brief Walk the binary descriptors and run a user defined callback on each of them
     407             :  *
     408             :  * @note
     409             :  * If the callback returns a non zero value, the walk stops.
     410             :  *
     411             :  * @param handle An initialized bindesc handle
     412             :  * @param callback A user defined callback to be called on each descriptor
     413             :  * @param user_data User defined data to be given to the callback
     414             :  *
     415             :  * @return If the walk was finished prematurely by the callback,
     416             :  *         return the callback's retval, zero otherwise
     417             :  */
     418           1 : int bindesc_foreach(struct bindesc_handle *handle, bindesc_callback_t callback, void *user_data);
     419             : 
     420             : /**
     421             :  * @brief Find a specific descriptor of type string
     422             :  *
     423             :  * @warning
     424             :  * When using the flash backend, result will be invalidated by the next call to any bindesc API.
     425             :  * Use the value immediately or copy it elsewhere.
     426             :  *
     427             :  * @param handle An initialized bindesc handle
     428             :  * @param id ID to search for
     429             :  * @param result Pointer to the found string
     430             :  *
     431             :  * @retval 0 If the descriptor was found
     432             :  * @retval -ENOENT If the descriptor was not found
     433             :  */
     434           1 : int bindesc_find_str(struct bindesc_handle *handle, uint16_t id, const char **result);
     435             : 
     436             : /**
     437             :  * @brief Find a specific descriptor of type uint
     438             :  *
     439             :  * @warning
     440             :  * When using the flash backend, result will be invalidated by the next call to any bindesc API.
     441             :  * Use the value immediately or copy it elsewhere.
     442             :  *
     443             :  * @param handle An initialized bindesc handle
     444             :  * @param id ID to search for
     445             :  * @param result Pointer to the found uint
     446             :  *
     447             :  * @retval 0 If the descriptor was found
     448             :  * @retval -ENOENT If the descriptor was not found
     449             :  */
     450           1 : int bindesc_find_uint(struct bindesc_handle *handle, uint16_t id, const uint32_t **result);
     451             : 
     452             : /**
     453             :  * @brief Find a specific descriptor of type bytes
     454             :  *
     455             :  * @warning
     456             :  * When using the flash backend, result will be invalidated by the next call to any bindesc API.
     457             :  * Use the value immediately or copy it elsewhere.
     458             :  *
     459             :  * @param handle An initialized bindesc handle
     460             :  * @param id ID to search for
     461             :  * @param result Pointer to the found bytes
     462             :  * @param result_size Size of the found bytes
     463             :  *
     464             :  * @retval 0 If the descriptor was found
     465             :  * @retval -ENOENT If the descriptor was not found
     466             :  */
     467           1 : int bindesc_find_bytes(struct bindesc_handle *handle, uint16_t id, const uint8_t **result,
     468             :                        size_t *result_size);
     469             : 
     470             : /**
     471             :  * @brief Get the size of an image's binary descriptors
     472             :  *
     473             :  * @details
     474             :  * Walks the binary descriptor structure to caluculate the total size of the structure
     475             :  * in bytes. This is useful, for instance, if the whole structure is to be copied to RAM.
     476             :  *
     477             :  * @param handle An initialized bindesc handle
     478             :  * @param result Pointer to write result to
     479             :  *
     480             :  * @return 0 On success, negative errno otherwise
     481             :  */
     482           1 : int bindesc_get_size(struct bindesc_handle *handle, size_t *result);
     483             : 
     484             : /**
     485             :  * @}
     486             :  */
     487             : 
     488             : #if defined(CONFIG_BINDESC_KERNEL_VERSION_STRING)
     489             : extern const struct bindesc_entry BINDESC_NAME(kernel_version_string);
     490             : #endif /* defined(CONFIG_BINDESC_KERNEL_VERSION_STRING) */
     491             : 
     492             : #if defined(CONFIG_BINDESC_KERNEL_VERSION_MAJOR)
     493             : extern const struct bindesc_entry BINDESC_NAME(kernel_version_major);
     494             : #endif /* defined(CONFIG_BINDESC_KERNEL_VERSION_MAJOR) */
     495             : 
     496             : #if defined(CONFIG_BINDESC_KERNEL_VERSION_MINOR)
     497             : extern const struct bindesc_entry BINDESC_NAME(kernel_version_minor);
     498             : #endif /* defined(CONFIG_BINDESC_KERNEL_VERSION_MINOR) */
     499             : 
     500             : #if defined(CONFIG_BINDESC_KERNEL_VERSION_PATCHLEVEL)
     501             : extern const struct bindesc_entry BINDESC_NAME(kernel_version_patchlevel);
     502             : #endif /* defined(CONFIG_BINDESC_KERNEL_VERSION_PATCHLEVEL) */
     503             : 
     504             : #if defined(CONFIG_BINDESC_KERNEL_VERSION_NUMBER)
     505             : extern const struct bindesc_entry BINDESC_NAME(kernel_version_number);
     506             : #endif /* defined(CONFIG_BINDESC_KERNEL_VERSION_NUMBER) */
     507             : 
     508             : #if defined(CONFIG_BINDESC_KERNEL_BUILD_VERSION)
     509             : extern const struct bindesc_entry BINDESC_NAME(kernel_build_version);
     510             : #endif /* defined(CONFIG_BINDESC_KERNEL_BUILD_VERSION) */
     511             : 
     512             : #if defined(CONFIG_BINDESC_APP_VERSION_STRING)
     513             : extern const struct bindesc_entry BINDESC_NAME(app_version_string);
     514             : #endif /* defined(CONFIG_BINDESC_APP_VERSION_STRING) */
     515             : 
     516             : #if defined(CONFIG_BINDESC_APP_VERSION_MAJOR)
     517             : extern const struct bindesc_entry BINDESC_NAME(app_version_major);
     518             : #endif /* defined(CONFIG_BINDESC_APP_VERSION_MAJOR) */
     519             : 
     520             : #if defined(CONFIG_BINDESC_APP_VERSION_MINOR)
     521             : extern const struct bindesc_entry BINDESC_NAME(app_version_minor);
     522             : #endif /* defined(CONFIG_BINDESC_APP_VERSION_MINOR) */
     523             : 
     524             : #if defined(CONFIG_BINDESC_APP_VERSION_PATCHLEVEL)
     525             : extern const struct bindesc_entry BINDESC_NAME(app_version_patchlevel);
     526             : #endif /* defined(CONFIG_BINDESC_APP_VERSION_PATCHLEVEL) */
     527             : 
     528             : #if defined(CONFIG_BINDESC_APP_VERSION_NUMBER)
     529             : extern const struct bindesc_entry BINDESC_NAME(app_version_number);
     530             : #endif /* defined(CONFIG_BINDESC_APP_VERSION_NUMBER) */
     531             : 
     532             : #if defined(CONFIG_BINDESC_APP_BUILD_VERSION)
     533             : extern const struct bindesc_entry BINDESC_NAME(app_build_version);
     534             : #endif /* defined(CONFIG_BINDESC_APP_BUILD_VERSION) */
     535             : 
     536             : #if defined(CONFIG_BINDESC_BUILD_TIME_YEAR)
     537             : extern const struct bindesc_entry BINDESC_NAME(build_time_year);
     538             : #endif /* defined(CONFIG_BINDESC_BUILD_TIME_YEAR) */
     539             : 
     540             : #if defined(CONFIG_BINDESC_BUILD_TIME_MONTH)
     541             : extern const struct bindesc_entry BINDESC_NAME(build_time_month);
     542             : #endif /* defined(CONFIG_BINDESC_BUILD_TIME_MONTH) */
     543             : 
     544             : #if defined(CONFIG_BINDESC_BUILD_TIME_DAY)
     545             : extern const struct bindesc_entry BINDESC_NAME(build_time_day);
     546             : #endif /* defined(CONFIG_BINDESC_BUILD_TIME_DAY) */
     547             : 
     548             : #if defined(CONFIG_BINDESC_BUILD_TIME_HOUR)
     549             : extern const struct bindesc_entry BINDESC_NAME(build_time_hour);
     550             : #endif /* defined(CONFIG_BINDESC_BUILD_TIME_HOUR) */
     551             : 
     552             : #if defined(CONFIG_BINDESC_BUILD_TIME_MINUTE)
     553             : extern const struct bindesc_entry BINDESC_NAME(build_time_minute);
     554             : #endif /* defined(CONFIG_BINDESC_BUILD_TIME_MINUTE) */
     555             : 
     556             : #if defined(CONFIG_BINDESC_BUILD_TIME_SECOND)
     557             : extern const struct bindesc_entry BINDESC_NAME(build_time_second);
     558             : #endif /* defined(CONFIG_BINDESC_BUILD_TIME_SECOND) */
     559             : 
     560             : #if defined(CONFIG_BINDESC_BUILD_TIME_UNIX)
     561             : extern const struct bindesc_entry BINDESC_NAME(build_time_unix);
     562             : #endif /* defined(CONFIG_BINDESC_BUILD_TIME_UNIX) */
     563             : 
     564             : #if defined(CONFIG_BINDESC_BUILD_DATE_TIME_STRING)
     565             : extern const struct bindesc_entry BINDESC_NAME(build_date_time_string);
     566             : #endif /* defined(CONFIG_BINDESC_BUILD_DATE_TIME_STRING) */
     567             : 
     568             : #if defined(CONFIG_BINDESC_BUILD_DATE_STRING)
     569             : extern const struct bindesc_entry BINDESC_NAME(build_date_string);
     570             : #endif /* defined(CONFIG_BINDESC_BUILD_DATE_STRING) */
     571             : 
     572             : #if defined(CONFIG_BINDESC_BUILD_TIME_STRING)
     573             : extern const struct bindesc_entry BINDESC_NAME(build_time_string);
     574             : #endif /* defined(CONFIG_BINDESC_BUILD_TIME_STRING) */
     575             : 
     576             : #if defined(CONFIG_BINDESC_HOST_NAME)
     577             : extern const struct bindesc_entry BINDESC_NAME(host_name);
     578             : #endif /* defined(CONFIG_BINDESC_HOST_NAME) */
     579             : 
     580             : #if defined(CONFIG_BINDESC_C_COMPILER_NAME)
     581             : extern const struct bindesc_entry BINDESC_NAME(c_compiler_name);
     582             : #endif /* defined(CONFIG_BINDESC_C_COMPILER_NAME) */
     583             : 
     584             : #if defined(CONFIG_BINDESC_C_COMPILER_VERSION)
     585             : extern const struct bindesc_entry BINDESC_NAME(c_compiler_version);
     586             : #endif /* defined(CONFIG_BINDESC_C_COMPILER_VERSION) */
     587             : 
     588             : #if defined(CONFIG_BINDESC_CXX_COMPILER_NAME)
     589             : extern const struct bindesc_entry BINDESC_NAME(cxx_compiler_name);
     590             : #endif /* defined(CONFIG_BINDESC_CXX_COMPILER_NAME) */
     591             : 
     592             : #if defined(CONFIG_BINDESC_CXX_COMPILER_VERSION)
     593             : extern const struct bindesc_entry BINDESC_NAME(cxx_compiler_version);
     594             : #endif /* defined(CONFIG_BINDESC_CXX_COMPILER_VERSION) */
     595             : 
     596             : #endif /* !defined(_LINKER) */
     597             : 
     598             : #ifdef __cplusplus
     599             : }
     600             : #endif
     601             : 
     602             : #endif /* ZEPHYR_INCLUDE_ZEPHYR_BINDESC_H_ */

Generated by: LCOV version 1.14