Skip to content

incbin doesn't work in arm compiler 5 (armcc) #59

Open
@GorgonMeducer

Description

@GorgonMeducer

When I test the incbin in arm compiler 5 with the following code:

#define INCBIN_PREFIX
#define INCBIN_STYLE INCBIN_STYLE_SNAKE
#include "incbin.h"


INCBIN(HOTEL_MP3_ROM, "hotel.mp3");

I get following error message:

error:  #412: an "asm" declaration is not allowed here
  INCBIN(HOTEL_MP3_ROM, "hotel.mp3");

The arm compiler 5 version is V5.06 update 7 (build 960).

Please help.

By the way, the official method to detect arm compiler 5 and arm compiler 6 is as following:

// for arm compiler 5
#undef __IS_COMPILER_ARM_COMPILER_5__
#if ((__ARMCC_VERSION >= 5000000) && (__ARMCC_VERSION < 6000000))
#   define __IS_COMPILER_ARM_COMPILER_5__       1
#endif


//for arm compiler 6

#undef __IS_COMPILER_ARM_COMPILER_6__
#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
#   define __IS_COMPILER_ARM_COMPILER_6__       1
#endif

I hope this helps.

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