Manually defined global variable value not updating

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Manually defined global variable value not updating

Jump to solution
2,439 Views
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 Kudos
Reply
1 Solution
2,416 Views
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.

View solution in original post

0 Kudos
Reply
1 Reply
2,417 Views
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 Kudos
Reply