Manually defined global variable value not updating

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

Manually defined global variable value not updating

ソリューションへジャンプ
2,444件の閲覧回数
nxf64834
NXP Employee
NXP Employee

Hi Team,

One of our customer is using KV4x and taking SDK example UART Freemaster code as reference, they are adding a global variable in main file. The values of these global variable is not getting updated in 'Variable watch' while other pre-defined variables are getting updated properly.

Please refer screenshot where value column is showing '?'.

Any help is appreciated.

Thanks.. 

0 件の賞賛
返信
1 解決策
2,421件の閲覧回数
TomasK
NXP Employee
NXP Employee

Hello,

mentioned SDK example UART Freemaster's code is using TSA feature (no need to load application's elf file), see definitions in "freemaster_cfg.h":

// Target-side address translation (TSA)
#define FMSTR_USE_TSA           1   // Enable TSA functionality
#define FMSTR_USE_TSA_SAFETY    1   // Enable/Disable TSA memory protection

It means that each variable must be defined with one of TSA macros (e.g. FMSTR_TSA_RO_VAR or FMSTR_TSA_RW_VAR) defined in "freemaster_tsa.h" otherwise the "read" and "write" functionality for new variable is disabled (checked if macro FMSTR_USE_TSA_SAFETY set) - indicated as "?" in Freemaster.

Another approach is to disable TSA feature completely (macro FMSTR_USE_TSA) and load the application's elf file. Then all used variables are available for "read" and "write" and their values visible in Freemaster's variable watch window.

Mixing TSA and usage of elf file does not make sense and could be confusing, so please define the gobal variable with TSA macros or disable TSA.

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
2,422件の閲覧回数
TomasK
NXP Employee
NXP Employee

Hello,

mentioned SDK example UART Freemaster's code is using TSA feature (no need to load application's elf file), see definitions in "freemaster_cfg.h":

// Target-side address translation (TSA)
#define FMSTR_USE_TSA           1   // Enable TSA functionality
#define FMSTR_USE_TSA_SAFETY    1   // Enable/Disable TSA memory protection

It means that each variable must be defined with one of TSA macros (e.g. FMSTR_TSA_RO_VAR or FMSTR_TSA_RW_VAR) defined in "freemaster_tsa.h" otherwise the "read" and "write" functionality for new variable is disabled (checked if macro FMSTR_USE_TSA_SAFETY set) - indicated as "?" in Freemaster.

Another approach is to disable TSA feature completely (macro FMSTR_USE_TSA) and load the application's elf file. Then all used variables are available for "read" and "write" and their values visible in Freemaster's variable watch window.

Mixing TSA and usage of elf file does not make sense and could be confusing, so please define the gobal variable with TSA macros or disable TSA.

0 件の賞賛
返信