soc: imx7d: fix CPP application building error
For CPP application, such as samples/cpp/cpp_synchronization/, it will
report the following building errors:
...
zephyrproject/modules/hal/nxp/imx/devices/MCIMX7D/./MCIMX7D_M4.h:5101:51:
error: 'reinterpret_cast<CCM_Type*>(808976384)' is not a constant
expression
...
The error is caused by commit: 72312feead
" arch: arm: cortex_m: Use cmsis api instead of inline asm in arch_irq_*"
This patch will cause kernel.h includes cmsis_core.h which includes soc.h,
so that soc.h will be used by c++ code.
This patch make soc.h can be c++ compatible.
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
This commit is contained in:
parent
5b83b7a472
commit
85db836f8e
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2017, NXP
|
* Copyright 2017,2024 NXP
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
@ -9,12 +9,18 @@
|
||||||
|
|
||||||
#ifndef _ASMLANGUAGE
|
#ifndef _ASMLANGUAGE
|
||||||
|
|
||||||
|
#include <MCIMX7D_M4.h>
|
||||||
|
|
||||||
|
#ifndef __cplusplus
|
||||||
|
|
||||||
#include "rdc.h"
|
#include "rdc.h"
|
||||||
#include "rdc_defs_imx7d.h"
|
#include "rdc_defs_imx7d.h"
|
||||||
#include "ccm_imx7d.h"
|
#include "ccm_imx7d.h"
|
||||||
#include "clock_freq.h"
|
#include "clock_freq.h"
|
||||||
#include "soc_clk_freq.h"
|
#include "soc_clk_freq.h"
|
||||||
|
|
||||||
|
#endif /* !__cplusplus */
|
||||||
|
|
||||||
#endif /* !_ASMLANGUAGE */
|
#endif /* !_ASMLANGUAGE */
|
||||||
|
|
||||||
#endif /* _SOC__H_ */
|
#endif /* _SOC__H_ */
|
||||||
|
|
Loading…
Reference in a new issue