Is there a way to force the compiler to allocate all memory to L1 by default rather than individually allocating each variable via #pragma section?
If there is possibilty for program to fit into L1 Memory, the best way to try this and test this is by the following.
In the file -> system/startup_ldf/app.ldf, Unassigning the seg_dmda, seg_dmda_nw, and seg_dmda_bw from all the L2 memory assignments this means that no data will be placed in L2 at all when left to its default memory assignment.
Additional care required when doing this and recommended to a backup copy of this file.
However, Link time error might be observed in case the program does not fit entirely in L1 (this is because of not having mappings to l2 for data). If this happens, resorting to manually prioritizing the data using the #pragma section is required.