Adding Data to Specific Memory Area

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

Adding Data to Specific Memory Area

ソリューションへジャンプ
1,777件の閲覧回数
dsilva
Contributor III

Hello.

I need to add some values in a specific area of s32k144 memory. I'm using s32ds 2.2.

I added a new area definition to the linker as follows:

"m_appheader(RX) : ORIGIN = 0x00006800, LENGTH = 0x00000400"

In the main.c file I added the following line:

__atribute__ ((section(".appheader"))) const FLASH_APPHEADER_INFO APP_HEADER ={ ...DATA...};

The compilation runs without errors, the appheader appears in the map file, but when opening the hex or bin the data was not added. The entire appheader region is set to 0xFF.

Is there any configuration needed in the compilation so that this data is not removed?

ラベル(1)
タグ(1)
0 件の賞賛
返信
1 解決策
1,764件の閲覧回数
dsilva
Contributor III

I founded the problem.

I was just adding the appheader in the MEMORY field, the addition in the SECTION field was missing.

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
1,765件の閲覧回数
dsilva
Contributor III

I founded the problem.

I was just adding the appheader in the MEMORY field, the addition in the SECTION field was missing.

0 件の賞賛
返信
1,770件の閲覧回数
Joey_van_Hummel
Contributor IV

I assume it has to do with your APP_HEADER being constant and thus the access to the .appheader region is being optimized away.

0 件の賞賛
返信
1,768件の閲覧回数
dsilva
Contributor III

Hello,

 

I removed the "const" and it didn't work.

 

I also added an ''IF" to that const and it didn't work too.

0 件の賞賛
返信