Page 1 of 1
Memory Map of TC27x Example MONOSTACK_task_demo
Posted: Mon Jul 15, 2013 2:04 pm
by ArminStingl
Hello,
I have created an Application based on the TriCore TC27x example MONOSTACK_task_demo, but the download to the target device fails, as parts of the application is linked to memory which is reserved in the device. If I read the TC27x documentation correctly, the Scratch Pad RAM (PSPR0) is located at 0x7010:0000 and Local Data RAM is located at 0x7000:0000.
However, the linker file states:
/*Scratch-Pad RAM (PSPR)*/
__PMI_PSPR_BEGIN = 0xC0000000;
__PMI_PSPR_SIZE = 24K;
/*Local Data RAM (DSPR)*/
__DMI_DSPR_BEGIN = 0xD0000000;
__DMI_DSPR_SIZE = 112K;
Can anyone explain that?
And can anyone explain, how I can modify the linker file?
Thanks in advance,
Armin
Re: Memory Map of TC27x Example MONOSTACK_task_demo
Posted: Tue Jul 16, 2013 9:32 am
by e.guidieri
Hi Armin,
I admit that that is a little bit tricky but It should not be the cause of your problem.
There I'm relying on
Tricore Local Addressing as specified in chapter 8 of Tricore AURIX Architecturte document (TC_Architecture_vol1_TC161_TCS_TC16P_TC16E.pdf) and a little bit more extensively in
TC27x User Manual (tc27x_um_V1.3.1.pdf) at paragraph
6.7.2 Local and Global Addressing.
I did that to have only a Linker script valid for any core.
So in order to analize your problem you should supply some more informations:
- Which is your TriCore derivative number ? (We have only a TC275TE, and all the tests we made have been done with that MCU).
- What tool are you using to program/run your MCU ?
- In case you are using Lauterbach, are you using Erika automatic generated script to program/run application ?
- If you are not using ours scripts it is possible that you are tring to flash an application supposed to run in RAM. The default project configuration works in this way (it is useful in tests to not consume programming cycles). If flashing the application is what you really want to do you have to comment/remove this line: "EE_OPT = "EE_EXECUTE_FROM_RAM";[\b]" in your .oil file.
I hope that this help you to figure out something,
In any case you can write here for any further doubts or problems.
By
Errico Guidieri
Re: Memory Map of TC27x Example MONOSTACK_task_demo
Posted: Tue Jul 16, 2013 9:39 am
by e.guidieri
By the way if you what play with the linker script. I suggest you to copy the generate from the Output/Debug directory as starting point, and tell the toolchain that you want to use your linker script adding by the following line in the .oil file:
CPU_DATA = TRICORE {
...
LINKERSCRIPT = "custom_core0.ld";
};
You can use absolute and relative paths to locate the files, relative paths are from the .oil file folder.
Bye
Re: Memory Map of TC27x Example MONOSTACK_task_demo
Posted: Wed Jul 17, 2013 9:04 am
by ArminStingl
Hi Errico,
thanks a lot for the hints.
The example is now running fine from FLASH and also from PSPR.
In the PSPR case I need to set the PC to the startup code in PSPR at address 0xC0000020, instead of the default 0xA0000020.
Also thanks about the hint for the custom linker script option in the OIL file.
Regards,
Armin