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

fix macros for compiling in MDK5 with armcc #86

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

matthewzhenggong
Copy link

Inspired by https://github.com/oceanstack/MAVLink_MDK_STM32, adjust some macro defines for armcc compiler in Kail uVision5 embed-system develpment environment.

@@ -15,6 +15,10 @@ namespace mavlink {
// Macro to define packed structures
#ifdef __GNUC__
#define MAVPACKED( __Declaration__ ) __Declaration__ __attribute__((packed))
#elif defined __arm__
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you find a tighter constraint on the check here?

Does __UVISION_VERSION work?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

default
Yes. I tried, and it works.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we use the macro __ARMCC_VERSION instead, which is the predefined macro for ARM KEIL compiler, while __UVISION_VERSION is related with MDK IDE environment.

@peterbarker
Copy link
Contributor

peterbarker commented Jun 20, 2017 via email

@Linjieqiang
Copy link

Tested it just now. Works well.

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

Successfully merging this pull request may close these issues.

3 participants