Skip to content

IAR环境,GD32F30xC,cmd.h的相关代码需要写成以下,才可以通过编译。亲试有效。 #11

Description

@shouzilai

#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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions