Oops, missed this loop while implementing... I had a problem with building esp chips multilib until added my changes.
This loop looks like just defines a macro without value. But the value must be set to make it work correctly. It uses builtin_define() instead builtin_define_with_int_value() I will check how it could be soved with the loop approach.