Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iar build failure due to enum MEMFAULT_PACKED #87

Open
zejiang0jason opened this issue Jan 24, 2025 · 2 comments
Open

iar build failure due to enum MEMFAULT_PACKED #87

zejiang0jason opened this issue Jan 24, 2025 · 2 comments
Assignees

Comments

@zejiang0jason
Copy link

Hello,

I got such compile error with iar
iar: 9.60.3
memfault-sdk: 1.8.0

error:

Error[Pe110]: expected either a definition or a tag name memfault-firmware-sdk\components\include\memfault\core\reboot_reason_types.h 29
Error[Pe040]: expected an identifier memfault-firmware-sdk\components\include\memfault\core\reboot_reason_types.h 29
Error[Pe065]: expected a ";" memfault-firmware-sdk\components\include\memfault\core\reboot_reason_types.h 29

It is because of the MEMFAULT_PACKED used in:

typedef enum MEMFAULT_PACKED MfltResetReason {

I am not sure whether it is similar to: IntergatedCircuits/USBDevice#14. But when I changed to typedef MEMFAULT_PACKED enum MfltResetReason, IAR build pass.

Could you please help? Thank you very mch.

zejiang0jason added a commit to zejiang0jason/memfault-firmware-sdk that referenced this issue Jan 24, 2025
Use `__packed enum` instead of `enum __packed` for IAR

Fixes: memfault#87

Signed-off-by: Jason Yu <[email protected]>
@noahp noahp self-assigned this Jan 27, 2025
@noahp
Copy link
Contributor

noahp commented Jan 27, 2025

Hi @zejiang0jason , thanks for reporting! We are in progress fixing this issue now, we will include the fix in our next SDK release (scheduled for this week). Please let me know if you need a release sooner, and we will expedite it!

@zejiang0jason
Copy link
Author

Hi @noahp , thanks for feedback, when will the fix be included? this week? Yes, our SW release depends on this fix. If possible, please expedite it, thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants