Skip to content

Commit

Permalink
arch: xtensa: core.h: Add define for UINT32_C
Browse files Browse the repository at this point in the history
This define is used by the new 2023 xt-clang toolchain and, while there
are a few definitions (identical to this one) in various implementations
such as newlib, none of them is in use when building SOF with Zephyr
and XtensaTools.

Add this define so that the toolchain provided headers work correctly.

Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
  • Loading branch information
Paul Olaru committed May 12, 2023
1 parent 406e660 commit edb4659
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/arch/xtensa/include/xtensa/config/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,24 @@
#ifndef XTENSA_CONFIG_CORE_H
#define XTENSA_CONFIG_CORE_H

/*
* This define is used by the new 2023 xt-clang toolchain and, while there are a few definitions
* (identical to this one) in various implementations such as newlib, none of them is in use when
* building SOF with Zephyr and XtensaTools.
*/

#if defined(__ZEPHYR__)

#ifndef __UINT32_C
#define __UINT32_C(x) x ## U
#endif

#ifndef UINT32_C
#define UINT32_C(x) __UINT32_C(x)
#endif

#endif

/* CONFIGURATION INDEPENDENT DEFINITIONS: */
#ifdef __XTENSA__
#include <xtensa/hal.h>
Expand Down

0 comments on commit edb4659

Please sign in to comment.