How link var to specifical address using TASKING compiler?

367 views Asked by At

I want to link a var to specific address, so I tried as follwing

Step1. using #pragma to define a section

#pragma section farbss "user_test_bss"
volatile int run_cnt1;
#pragma section farbss restore

#pragma section fardata "user_test_data"
volatile int run_cnt2 = 0x1234;
#pragma section fardata restore

Step2. define 'user_test_bss' in TASKING LSL file, like this

section_layout :vtc:linear
{
     group
     {
           group (ordered, attributes=rw, run_addr=0x70001000)
           {
                 select ".bss.user_test_bss";
           }
           group (ordered, attributes=rw, run_addr=0x70004000)
           {
                 select ".data.user_test_data";
           }
     }
}

step3 compile test code and check .map file.

run_cnt1            | 0x90000004 | mpe:vtc:abs18  
run_cnt2            | 0x90000000 |              

In .map file, the address of run_cnt1 do not in user_test_bss section. I don't know what error occur in above step

I tried using key work "attribute" to link var in a specific address, but do not success

0

There are 0 answers