フィルターのクリア

data type replacement causes redefinition

6 ビュー (過去 30 日間)
Michael
Michael 2011 年 10 月 18 日
Hi,
I am generating code that is targeting a NIOS processor. The generated code is being integrated into an eclipse project. Altera data types are being generated from a bsp generation.
For example: for an unsigned 32 bit integer
In the Code Generation -> Data Type Replacement for Simulink Name: uint32 / Code Generation Name:uint32_T I am replacing with alt_u32
in alt_types.h (from the bsp generation) typedef unsigned long alt_u32;
in rtwtypes.h typedef int32_T alt_32;
The compiler complains about a redefinition of alt_u32. If I comment out this section of rtwtypes.h then the whole project builds OK.
Any help is appreciated in solving this without the manual interventions.
Thanks, Michael.
  1 件のコメント
Fangjun Jiang
Fangjun Jiang 2011 年 10 月 18 日
What if you don't supply the alt_types.h?

サインインしてコメントする。

回答 (1 件)

Michael
Michael 2011 年 10 月 18 日
Not supplying alt_types.h causes other problems.
It was solved by settings in the alt_u32 Simulink.Alias object alt_32.DataScope = 'Imported' alt_32.HeaderFile = 'alt_types.h'

カテゴリ

Help Center および File ExchangeDeployment, Integration, and Supported Hardware についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by