- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
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 retLink kopiert
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
:mad: No one can answer this question?
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Did you try.section onchipmemory
instead? Or have a look at the linker script, to find out what name it gave to your section.
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
thank you,i am glad to try it again
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
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!
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
I have delayed this issue two weeks, please help me, thank you!:mad:
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
what does your linker script look like? In what section is your code put by the linker?
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
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!
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
If you are using the IDE, it is in your system library > Debug > system_description > generated.x
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
TO_BE_DONE
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
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.- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
the instruction_onchipmemory (address 0x08000000) is sure my TCM, the IDE also crectly compilated my instructions and asign the code address at the TCM zone, but when i debug the IDE din't exicute the download action to the TCM,it only download the program to de extern sram. if i use the instruction_onchipmemory as the section name without dot front of it ,the IDE would asign a increct address to the TCM section.
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
the IDE can crectly compilated and download the program to the SRAM and TCM if the program is writen by C, or the section of TCM code is writen by c but called by the assembly main function, but when i develope my program with pure assembly instruction the IDE can't exicute the download action to the TCM,i don't know why and how to solve the problem.
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
That's odd... As long as the object file generated from your assembly source code is included in the project and linked with the rest there shouldn't be any difference between an assembly function and a C function...
I expect that you used a dual port memory with one port connected to the TCM interface and the other on the data master? Do they have both the same address? Did you try to switch the two ports? IIRC I had some trouble when the TCM interface was connected to the s2 port on the on-chip memory. Connecting it to s1 worked better. Something to do with how the BSP tools parse the ptf file, I guess.- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
I recreated a hardware project to test the TCM,i wrote the program with pure assembly instruction and encount a new problem:when the IDE complete dowloading the code to SRAM and TCM ,I found that the instruction code is not be download to the TCM successfully,the data in the TCM zone is not be changed at all! is it the problem of IDE? is it the problem of my hardware project? is it the problem of my simple assembly instruction program? if anyone know what the problem is ,please tell me,thanks!
in my hardware project my TCM's name is instruction_onchipmemory,the folowing is my testing assembly instruction program: .global main .type main, @function main: addi sp, sp,-12 stw ra, 8(sp) stw fp, 4(sp) mov fp, sp loop: call tcm_test br loop //the folowing instruction will be executed in tightly coupled memory // the tightly coupled memory's name is instruction_onchipmemory .section .instruction_onchipmemory tcm_test: addi sp, sp,-4 stw ra, 0(sp) movi r2,0x123 movi r3,0x345 mul r2,r2,r3 mov r4,r2 ldw ra,0(sp) addi sp,sp,4 ret- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Could you show us your SOPC system with all the connections?
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
How to connections sent to you? I sent you the picture on the connect, or files? By e-mail sent to you or in the forum reply?
thanks- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
You can take a screenshot of SOPC Builder and attach it to your reply on the forum
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
The SOPC system looks good, and as far as I can tell the call assembly instruction uses a 28-bit address, so it should be able to jump to the TCM. I can find any reason for your problem...
It could be something with the way the compiler/linker processes assembly files. What if you try to put a C function in the TCM, but use an asm() block inside?
- RSS-Feed abonnieren
- Thema als neu kennzeichnen
- Thema als gelesen kennzeichnen
- Diesen Thema für aktuellen Benutzer floaten
- Lesezeichen
- Abonnieren
- Drucker-Anzeigeseite