memfault / memfault-firmware-sdk

Memfault SDK for embedded systems. Observability, logging, crash reporting, and OTA all in one service. More information at https://docs.memfault.com.
https://memfault.com
Other
149 stars 75 forks source link

rand32.h needs changing to random.h for zephyr 3.5 #66

Closed nordicjm closed 11 months ago

nordicjm commented 11 months ago

Zephyr 3.5 deprecated rand32.h, the new include is random.h, this needs to be updated in ports/zephyr/common/memfault_http_periodic_upload.c

chrisc11 commented 11 months ago

Thanks for the report @nordicjm -- we'll have the update published in our release next week

nordicjm commented 11 months ago

@chrisc11 just checking which day you expect this release to be published on github?

noahp commented 11 months ago

@nordicjm - We hope to have this release (1.5.0) published tomorrow, 2023-11-30.

nordicjm commented 11 months ago

This appears to be a broken release, there is this unconditional cmake code in ports/zephyr/ncs/CMakeLists.txt:

  if (NCS_VERSION_MAJOR)
    # Note: Starting in nRF Connect SDK >= 1.3, NCS_VERSION_* fields are exposed
    if (${NCS_VERSION_MAJOR}.${NCS_VERSION_MINOR}.${NCS_VERSION_PATCH} GREATER_EQUAL 2.4.0)
      # We wrap download_client_get() in order to register multiple root certificates
      #   See comment in src/memfault_fota.c for more details
      zephyr_ld_options(-Wl,--wrap=download_client_get)
    endif()
  endif()

Which then causes a compilation failure because also in this file, the .c file that contains these wrapped functions is only included if a Kconfig is set:

zephyr_library_sources_ifdef(CONFIG_MEMFAULT_FOTA memfault_fota.c)

So when the download client is enabled and memfault FOTA is disabled, this prevents compilation of projects

noahp commented 11 months ago

@nordicjm apologies for that! I'll make a release asap, will respond back when it's published

noahp commented 11 months ago

@nordicjm Memfault SDK v1.5.1 is now available, with the fix for this issue

nordicjm commented 11 months ago

Perfect, all working, many thanks @noahp!