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

Include xtensa-types.h header file to support the ACP_7_0 platform's build. #9413

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions src/arch/xtensa/include/xtensa/config/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,22 +37,28 @@
#define XTENSA_CONFIG_CORE_H

/*
* This define is used by the new 2023 xt-clang toolchain and, while there are a few definitions
* This define is used by Assembly files of platform ACP_7_0's toolchain.
* Else condition has 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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to update that comment

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we rephrase? IMHO this update just makes it more confusing than it already was, suggest something like:

"xt-clang platform headers use this (ISO C) macro to define constants, which appends a "U" suffix to force the type of the literal constant. But those headers end up getting included in assembly files which don't support that syntax. Fake the API for assembly builds here in the SOF toolchain layer."

Copy link
Collaborator

@marc-hb marc-hb Sep 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, it's not just Zephyr now. And it never was ACP7-specific.

*/

#if defined(__ZEPHYR__)
#if defined (_ASMLANGUAGE) || defined (__ASSEMBLER__)

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

#else

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

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

#endif
#endif /*_ASMLANGUAGE or __ASSEMBLER__*/

/* CONFIGURATION INDEPENDENT DEFINITIONS: */
#ifdef __XTENSA__
Expand Down
2 changes: 1 addition & 1 deletion src/arch/xtensa/xtos/exc-sethandler.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

#include <xtensa/config/core.h>
#include "xtos-internal.h"
#include <xtensa/config/core.h>


#if XCHAL_HAVE_EXCEPTIONS
Expand Down
Loading