Hi all,

 

Probably you didn’t know that there is such a rule in TF-M coding standard:

 

 

Personally, I’d prefer macros to enum, for error codes.

 

I’d like to propose to remove this rule from TF-M coding standard.

But it doesn’t mean that enum shall not be used anymore.

I’m wondering if macros for error code in TF-M can be approved as well. 😊

 

May I know your opinions please?

If it is a convention or a good practice to use enum for error codes in security/trusted software, please help point me to the reference. I don’t find one via google. Thanks a lot!

 

Best regards,

Hu Ziji