Hello,
I checked the code from application note and I can confirm the declspec with long bss_i does not work, which is correct according to declspec implementation, so there is incorrect declspec usage in the application note.
Please use the code below:
#pragma push
#pragma section sdata_type ".data" ".data"
long bss_i;
#pragma pop
If you have any other question, please feel free to write me back.
Regards,
Martin