Nuclei-Software / nuclei-sdk

Nuclei RISC-V Software Development Kit
https://doc.nucleisys.com/nuclei_sdk
Apache License 2.0
117 stars 50 forks source link

Headers use features from other headers without including them. #33

Closed DagAgren closed 2 years ago

DagAgren commented 2 years ago

For instance, core_feature_eclic.h uses the rv_csr_t type which is defined in core_feature_base.h, but it does not #include it. This means that the header does not work if it is included on its own, and even if you include both headers, the order in which you do so matters.

Headers should #include whatever other headers they need.

fanghuaqi commented 2 years ago

Hi @DagAgren ,thanks for your reporting. We are not expecting the user to directly include the core_feature_xxx.h header file,instead, we expected to include <Device>.h to take that header file included, if this feature is requried, we will consider to improve it in future release

fanghuaqi commented 2 years ago

changes have been made in commit f73165a61e20a25d80785caad3b594d5d1c48517.

Just fixed when you include core_feature_xxx.h directly, the compiler will not complain. But you still should use .h, such as "demosoc.h", or nuclei_sdk_hal.h in nuclei_sdk.