Lab3 problems with printf

Lab3 problems with printf

par Jakob Wilhelm Svedling,
Nombre de réponses : 3

Hi,

We have a lot of trouble using printf on our processors in lab 3. After 2 hours of debugging with Alexandre Chau during the lab session today we were still not able to print a simple hello world from our processors. Now (after using  a jtag_uart on both processors) we are finally able to print on cpu_0 but still not on cpu_1. Do you have any clue why this could be? The two processors are completely identical with the same linker script (Alexandre suggested this might be a problem).

Annexe Screenshot from 2021-05-03 13-42-04.png
En réponse à Jakob Wilhelm Svedling

Re: Lab3 problems with printf

par Loïc Ted Ferrot,

Hey!

It looks like it possible that both processors write their own data at the same place in memory, overwriting the memory of the other, right? Maybe try to create two new linker memory regions in the sdram, dedicated specifically to one processor each, and map the linker sections to it, so that the mutual memory overwrite is excluded. It is what we did and it works.

Also it may not apply to you but we had a sneaky stack overflow, so if you are using uC/OS2 check the stack size of the task where the printf is called

Hope it helps!