Using macros for configuration while hiding source code?

116 Views Asked by At

Currently i am preparing a firmware application that will be used in a product for customers. However, the customer should be able to configure some of the parameters/settings before deploying the product. Unfortunately, the product, hence the firmware, is based off Espressif's ESP-IDF library and they define configurable parameters using macros like

CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_SCAN_DUPL_TYPE_DATA_DEVICE=y
CONFIG_BT_CTRL_BLE_MESH_SCAN_DUPL_EN=y
CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_MANUAL=y
CONFIG_BT_BTU_TASK_STACK_SIZE=4512
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y

And this means that everytime the customer needs to reconfigure, they have to recompile with modifications to the macro and that would mean they can see the source code.

Is there any tools for C/C++ or any methods that can allow the end user to configure and yet be unable to see the source code? Thanks.

0

There are 0 best solutions below