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环境,GD32F30xC,cmd.h的相关代码需要写成以下,才可以通过编译。亲试有效。 #11

Open
shouzilai opened this issue Nov 20, 2023 · 0 comments

Comments

@shouzilai
Copy link

#pragma section = "CMDS" /* MUST */

#define CMD_HASH 0xb433e5c6

#if defined(__CC_ARM) || defined(__CLANG_ARM) /* ARM Compiler */
#define SECTION(x) attribute((section(x)))
#define CMD_USED attribute((used))

#elif defined (ICCARM) || defined(ICCRX) /* for IAR Compiler (Will Vaild in IAR ENV)*/
#define SECTION(x) @ x
#define CMD_USED __root
#else
#error "not supported tool chain..."
#endif

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

1 participant