Forum Discussion
how can i tell the IDE to carry code to TCM
i write a program with assembly instruction,i want this program can be excuted in tightly coupled memory,but when i debug ,this code is not in the TCM,my TCM name is “onchipmemory",my program is follow:
start: nop call test_code br start .section .onchipmemory test_code: addi sp,sp,-4 stw ra,0(sp) movi r2,0x99 movi r3,0xaa mul r2,r2,r3 ldw ra,o(sp) addi sp,sp,4 ret24 Replies
- Altera_Forum
Honored Contributor
:mad: No one can answer this question?
- Altera_Forum
Honored Contributor
Did you try
instead? Or have a look at the linker script, to find out what name it gave to your section..section onchipmemory - Altera_Forum
Honored Contributor
thank you,i am glad to try it again
- Altera_Forum
Honored Contributor
i tried in different way,but still can't seen the objectcode carried to the TCM,if anyone know how to do this with assembly instruction please tell me,thank you very much!
- Altera_Forum
Honored Contributor
I have delayed this issue two weeks, please help me, thank you!:mad:
- Altera_Forum
Honored Contributor
what does your linker script look like? In what section is your code put by the linker?
- Altera_Forum
Honored Contributor
i can't see and edit the linker file,the file is created by the IDE automatically,can you tell me how to see and edit the linker file? thank you!
- Altera_Forum
Honored Contributor
If you are using the IDE, it is in your system library > Debug > system_description > generated.x
- Altera_Forum
Honored Contributor
TO_BE_DONE
- Altera_Forum
Honored Contributor
From what I can read in the linker script, you don't have any section called onchip_memory. You have instruction_onchipmemory (address 0x08000000) and onchip_memory2_0 (address 0x04000000).
One of those should be your TCM memory. Use its name as section name, without the . in front, and see if it works.