關於ADS TASKING linker file 指定設置 DFLASH 位置 loading fail 問題

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
DevinHuang
Level 3
Level 3
Distributor - Weikeng(GC)
100 sign-ins 10 replies posted 5 replies posted

如果TASKING linker file設定。

 

#pragma section farrom "user_test_rodata"

uint32 user_array[BUFF_SIZE]={......};

#pragma section farrom restore main.c

 

將常數 const value [BUFF_SIZE] 設定8192範圍,在compiler 就會出現Loading failed,可是DFLASH SIZE有1M,因該不至於會錯誤,所以想請問實際可用的SIZE為多少呢? 或者ADS IDE 本身存在BUG呢?

DevinHuang_0-1702610689724.png

 

0 Likes
5 Replies
Kunqiao_L
Moderator
Moderator
Moderator
First comment on blog First like given 25 likes received

Hi DevinHuang,

I remembered you set to different value it works right? Please describe it more about the scenario.  

關於AURIX TC297 指定設置 DFLASH 位置 

ADS IDE is not a commercial software, so it might be some bugs. For this SIZE issue, Maybe Tasking expert could have some better idea.  BTW, please use corresponding language to raise question or answering , since you choose EN forums, otherwise select CN.

@User13836  Do you have any suggestion for the BUFF_SIZE cause the compiler loading failed situation above?

Thanks!

 

0 Likes
DevinHuang
Level 3
Level 3
Distributor - Weikeng(GC)
100 sign-ins 10 replies posted 5 replies posted

const user_array [BUFF_SIZE] 設定32 byte,這樣是可以正常運作。如果使用BUFF_SIZE 為8K byte 就會出現問題。

參考設定如下:

in code:
#define BUFF_SIZE 8192

#pragma section farrom "user_test_rodata"
uint8 const user_array[BUFF_SIZE]={......};
#pragma section farrom restore

in linker file:
 group (ordered, run_addr=mem:dfls0)
{
select ".rodata.user_test_rodata";
} 

memory defines are already there if no, add also:
memory dfls0
{
mau = 8;
size = 1M;
type = reserved nvram;
map (dest=bus:sri, dest_offset=0xaf000000, size=1M );
}

 

0 Likes
Kunqiao_L
Moderator
Moderator
Moderator
First comment on blog First like given 25 likes received

Hi DevinHuang,

Is it only happens on 8192? How about other closer value?

0 Likes
DevinHuang
Level 3
Level 3
Distributor - Weikeng(GC)
100 sign-ins 10 replies posted 5 replies posted

Hi  ,

目前測試 #define BUFF_SIZE (8000 - 32),以下範圍是沒有問題,超過範圍值就會有問題

 

0 Likes
User13836
Level 6
Level 6
50 likes received 50 solutions authored 100 sign-ins

Many thanks for reporting this issue. I can reproduce the behavior. The debugger fails to program a const array into dflash memory during the download stage of the application if the size of the array is larger than 8160 bytes.

I logged an issue to notify the TASKING development department about this problem since the issue does affect the TASKING TriCore toolset too.

I'm not aware of a mitigation nesides splitting up larger arrays into smaller ones.

Nest regards,

Ulrich Kloidt
TASKING tools support

 

 

0 Likes