Skip to content

Commit

Permalink
app_memdomain: ARC: adjust asembler directives for MWDT toolchain
Browse files Browse the repository at this point in the history
ARC MWDT assembler has slightly different directives names:
.pushsect instead of .pushsection
.popsect instead of .popsection

Signed-off-by: Eugeniy Paltsev <[email protected]>
  • Loading branch information
Eugeniy Paltsev authored and MaureenHelm committed Sep 5, 2020
1 parent cc897a5 commit 6b8f92b
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions include/app_memory/app_memdomain.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,24 @@ struct z_app_region {
#define Z_PROGBITS_SYM "@"
#endif

#if defined(CONFIG_ARC) && defined(__CCAC__)
/* ARC MWDT assembler has slightly different pushsection/popsection directives
* names.
*/
#define Z_PUSHSECTION_DIRECTIV ".pushsect"
#define Z_POPSECTION_DIRECTIVE ".popsect"
#else
#define Z_PUSHSECTION_DIRECTIV ".pushsection"
#define Z_POPSECTION_DIRECTIVE ".popsection"
#endif

#define Z_APPMEM_PLACEHOLDER(name) \
__asm__ ( \
".pushsection " STRINGIFY(K_APP_DMEM_SECTION(name)) \
Z_PUSHSECTION_DIRECTIV " " STRINGIFY(K_APP_DMEM_SECTION(name)) \
",\"aw\"," Z_PROGBITS_SYM "progbits\n\t" \
".global " STRINGIFY(name) "_placeholder\n\t" \
STRINGIFY(name) "_placeholder:\n\t" \
".popsection\n\t")
Z_POPSECTION_DIRECTIVE "\n\t")

/**
* @brief Define an application memory partition with linker support
Expand Down

0 comments on commit 6b8f92b

Please sign in to comment.