compiling error: S32K344 After D_CACHE_ENABLE is enabled

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

compiling error: S32K344 After D_CACHE_ENABLE is enabled

ソリューションへジャンプ
1,808件の閲覧回数
harryoceana
Contributor II

RTD 3.0.0 P07

S32DS 3.5

S32K344 After D_CACHE_ENABLE is enabled, the following error occurs when compiling. The cc.h file has many undefined macros

捕获.PNG

 

捕获.PNG

0 件の賞賛
返信
1 解決策
1,750件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

Hi@harryoceana

D-cache is not supported in this routine, if you want to enable D-cache, this is suggestion from SW team.
You can add some following macros:

/* Data Cache masks */
#define DCACHE_CCR_EN_MASK             ((uint32)1U << 16U)
#define DCACHE_CSSELR_EN(x)            ((uint32)((x) & (~1U)))
#define DCACHE_DCCXSW_SET_MASK         ((uint32)0x3FE0U)
#define DCACHE_DCCXSW_SET_SHIFT        ((uint32)5U)
#define DCACHE_DCCXSW_WAY_MASK         ((uint32)0xC0000000U)
#define DCACHE_DCCXSW_WAY_SHIFT        ((uint32)30U)
/* Instruction Cache masks */
#define ICACHE_CCR_EN_MASK             ((uint32)1U << 17U)
#define ICACHE_CSSELR_EN(x)            ((uint32)((x) | 1U))
/* Cache set, way and line size */
#define CACHE_CCSIDR_SET_MASK          ((uint32)0xFFFE000U)
#define CACHE_CCSIDR_SET_SHIFT         ((uint32)13U)
#define CACHE_CCSIDR_SET_SIZE(x)       ((uint32)((((uint32)(x) & CACHE_CCSIDR_SET_MASK) >> CACHE_CCSIDR_SET_SHIFT) + 1U))
#define CACHE_CCSIDR_WAY_MASK          ((uint32)0x1FF8U)
#define CACHE_CCSIDR_WAY_SHIFT         ((uint32)3U)
#define CACHE_CCSIDR_WAY_SIZE(x)       ((uint32)((((uint32)(x) & CACHE_CCSIDR_WAY_MASK) >> CACHE_CCSIDR_WAY_SHIFT) + 1U))
#define CACHE_CCSIDR_LINE_SIZE_MASK    ((uint32)0x7U)
#define CACHE_CCSIDR_LINE_SHIFT        ((uint32)0U)
#define CACHE_CCSIDR_LINE_SIZE(x)      ((uint32)((((((uint32)(x) & CACHE_CCSIDR_LINE_SIZE_MASK) >> CACHE_CCSIDR_LINE_SHIFT) + 1U) * 4U) * 4U))

 

Test:

Senlent_0-1721297108982.png

 

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
1,751件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

Hi@harryoceana

D-cache is not supported in this routine, if you want to enable D-cache, this is suggestion from SW team.
You can add some following macros:

/* Data Cache masks */
#define DCACHE_CCR_EN_MASK             ((uint32)1U << 16U)
#define DCACHE_CSSELR_EN(x)            ((uint32)((x) & (~1U)))
#define DCACHE_DCCXSW_SET_MASK         ((uint32)0x3FE0U)
#define DCACHE_DCCXSW_SET_SHIFT        ((uint32)5U)
#define DCACHE_DCCXSW_WAY_MASK         ((uint32)0xC0000000U)
#define DCACHE_DCCXSW_WAY_SHIFT        ((uint32)30U)
/* Instruction Cache masks */
#define ICACHE_CCR_EN_MASK             ((uint32)1U << 17U)
#define ICACHE_CSSELR_EN(x)            ((uint32)((x) | 1U))
/* Cache set, way and line size */
#define CACHE_CCSIDR_SET_MASK          ((uint32)0xFFFE000U)
#define CACHE_CCSIDR_SET_SHIFT         ((uint32)13U)
#define CACHE_CCSIDR_SET_SIZE(x)       ((uint32)((((uint32)(x) & CACHE_CCSIDR_SET_MASK) >> CACHE_CCSIDR_SET_SHIFT) + 1U))
#define CACHE_CCSIDR_WAY_MASK          ((uint32)0x1FF8U)
#define CACHE_CCSIDR_WAY_SHIFT         ((uint32)3U)
#define CACHE_CCSIDR_WAY_SIZE(x)       ((uint32)((((uint32)(x) & CACHE_CCSIDR_WAY_MASK) >> CACHE_CCSIDR_WAY_SHIFT) + 1U))
#define CACHE_CCSIDR_LINE_SIZE_MASK    ((uint32)0x7U)
#define CACHE_CCSIDR_LINE_SHIFT        ((uint32)0U)
#define CACHE_CCSIDR_LINE_SIZE(x)      ((uint32)((((((uint32)(x) & CACHE_CCSIDR_LINE_SIZE_MASK) >> CACHE_CCSIDR_LINE_SHIFT) + 1U) * 4U) * 4U))

 

Test:

Senlent_0-1721297108982.png

 

0 件の賞賛
返信
1,768件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

Hi@harryoceana

Could  you please describe clearly where the demo you are using comes from, what its name is, and what modifications you have made to it, so that we can reproduce the problem.

0 件の賞賛
返信
1,753件の閲覧回数
harryoceana
Contributor II

This is LWIP example, Only the D_CACHE_ENABLE definition was added .

1.PNG

 

2.PNG

 

0 件の賞賛
返信