diff --git a/messages/common.options b/messages/common.options index 42ff843..76a6a2a 100644 --- a/messages/common.options +++ b/messages/common.options @@ -1,3 +1,3 @@ -FirmwareUpdateData.image_block max_size: 39 -Log.log max_length: 50 -MemfaultEvent.chunk max_size: 50 +orb.FirmwareUpdateData.image_block max_size: 39 +orb.Log.log max_length: 50 +orb.MemfaultEvent.chunk max_size: 50 diff --git a/messages/main.options b/messages/main.options index 50f9a23..e24c067 100644 --- a/messages/main.options +++ b/messages/main.options @@ -1,12 +1,12 @@ -GNSSData.nmea max_length: 82 -GNSSDataPartial.nmea_part max_length: 50 -UserCenterLEDsSequence.rgb_uncompressed max_size: 192 -UserCenterLEDsSequence.argb32_uncompressed max_size: 256 -UserRingLEDsSequence.rgb_uncompressed max_size: 672 -UserRingLEDsSequence.argb32_uncompressed max_size: 396 -DistributorLEDsSequence.rgb_uncompressed max_size: 15 -DistributorLEDsSequence.argb32_uncompressed max_size: 20 -ConeLEDsSequence.rgb_uncompressed max_size: 192 -ConeLEDsSequence.argb32_uncompressed max_size: 256 -IREyeCameraFocusSweepLensValues max_size: 600 -BatteryInfoHwFw.mcu_id max_size: 12 +orb.main.GNSSData.nmea max_length: 82 +orb.main.GNSSDataPartial.nmea_part max_length: 50 +orb.main.UserCenterLEDsSequence.rgb_uncompressed max_size: 192 +orb.main.UserCenterLEDsSequence.argb32_uncompressed max_size: 256 +orb.main.UserRingLEDsSequence.rgb_uncompressed max_size: 672 +orb.main.UserRingLEDsSequence.argb32_uncompressed max_size: 396 +orb.main.DistributorLEDsSequence.rgb_uncompressed max_size: 15 +orb.main.DistributorLEDsSequence.argb32_uncompressed max_size: 20 +orb.main.ConeLEDsSequence.rgb_uncompressed max_size: 192 +orb.main.ConeLEDsSequence.argb32_uncompressed max_size: 256 +orb.main.IREyeCameraFocusSweepLensValues max_size: 600 +orb.main.BatteryInfoHwFw.mcu_id max_size: 12 diff --git a/messages/orb.proto b/messages/orb.proto index efcbbb1..d461636 100644 --- a/messages/orb.proto +++ b/messages/orb.proto @@ -1,11 +1,10 @@ syntax = "proto3"; -// This file is the root of the entire package heirarchy. +// This file is the root of the entire package hierarchy. package orb; import "main.proto"; import "sec.proto"; -import "common.proto"; // Any change in version number should be made only if: // - at least one new field is mandatory for the message to be correctly @@ -31,4 +30,3 @@ message McuMessage sec.SecToJetson sec_to_jetson_message = 5; } } - diff --git a/messages/sec.options b/messages/sec.options index c4c570f..b745266 100644 --- a/messages/sec.options +++ b/messages/sec.options @@ -1 +1 @@ -SERequest.data max_size: 512 +orb.sec.SERequest.data max_size: 512 diff --git a/messages/sec.proto b/messages/sec.proto index f4d5711..ab8a3ff 100644 --- a/messages/sec.proto +++ b/messages/sec.proto @@ -37,12 +37,12 @@ message SecToJetson orb.Ack ack = 1; orb.Versions versions = 2; orb.Log log = 3; - sec.private.SEResponse se_response = 4; - sec.private.Tamper tampered = 5; + orb.sec.private.SEResponse se_response = 4; + orb.sec.private.Tamper tampered = 5; orb.BatteryStatus battery_status = 7; orb.FatalError fatal_error = 8; - sec.private.TamperRaw tamper_raw = 9; - sec.private.TamperStates tamper_states = 10; + orb.sec.private.TamperRaw tamper_raw = 9; + orb.sec.private.TamperStates tamper_states = 10; orb.Temperature temperature = 11; orb.MemfaultEvent memfault_event = 12; orb.HardwareDiagnostic hardware_diag = 13; diff --git a/zephyr/CMakeLists.txt b/zephyr/CMakeLists.txt index 0255c4a..1d081ec 100644 --- a/zephyr/CMakeLists.txt +++ b/zephyr/CMakeLists.txt @@ -19,23 +19,18 @@ if (CONFIG_ORB_MCU_MESSAGING_LIB) set(NANOPB_OPTIONS "-I${CMAKE_CURRENT_SOURCE_DIR}/../messages/") set(SRC_FILES) - if (CONFIG_BOARD_PEARL_SECURITY OR CONFIG_BOARD_DIAMOND_SECURITY) - # look for mcu_messaging_sec_priv.proto in private first, then in private_stub - set(PRIV_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../messages/private) - if (NOT EXISTS ${PRIV_INCLUDE_DIR}/mcu_messaging_sec_priv.proto) - set(PRIV_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../messages/private_stub) - if (NOT EXISTS ${PRIV_INCLUDE_DIR}/mcu_messaging_sec_priv.proto) - message(FATAL_ERROR "mcu_messaging_sec_priv.proto not found in private or private_stub") - endif () + # look for sec_priv.proto in private first, then in private_stub + set(PRIV_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../messages/private) + if (NOT EXISTS ${PRIV_INCLUDE_DIR}/sec_priv.proto) + set(PRIV_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../messages/private_stub) + if (NOT EXISTS ${PRIV_INCLUDE_DIR}/sec_priv.proto) + message(FATAL_ERROR "sec_priv.proto not found in private or private_stub") endif () - # mcu_messaging_sec_priv.proto must be first in the list - list(APPEND PROTO_FILES ${PRIV_INCLUDE_DIR}/mcu_messaging_sec_priv.proto ../messages/mcu_messaging_sec.proto ../messages/mcu_messaging_common.proto) - list(APPEND SRC_FILES ${CMAKE_CURRENT_BINARY_DIR}/mcu_messaging_sec.pb.c ${CMAKE_CURRENT_BINARY_DIR}/mcu_messaging_common.pb.c ${CMAKE_CURRENT_BINARY_DIR}/mcu_messaging_sec_priv.pb.c) - list(APPEND NANOPB_OPTIONS "-I${PRIV_INCLUDE_DIR}") - else () - list(APPEND PROTO_FILES ../messages/mcu_messaging_main.proto ../messages/mcu_messaging_common.proto) - list(APPEND SRC_FILES ${CMAKE_CURRENT_BINARY_DIR}/mcu_messaging_main.pb.c ${CMAKE_CURRENT_BINARY_DIR}/mcu_messaging_common.pb.c) endif () + # sec_priv.proto must be first in the list + list(APPEND PROTO_FILES ../messages/orb.proto ../messages/main.proto ../messages/sec.proto ../messages/common.proto ${PRIV_INCLUDE_DIR}/sec_priv.proto) + list(APPEND SRC_FILES ${CMAKE_CURRENT_BINARY_DIR}/main.pb.c ${CMAKE_CURRENT_BINARY_DIR}/sec.pb.c ${CMAKE_CURRENT_BINARY_DIR}/common.pb.c ${CMAKE_CURRENT_BINARY_DIR}/sec_priv.pb.c) + list(APPEND NANOPB_OPTIONS "-I${PRIV_INCLUDE_DIR}") # use provided function to generate C files # it will create a custom command that is launched if ${proto_sources} are dependencies