I'm quite familiar with the Ducati framework for OMAP4. I'd like to know if there is any difference in the Ducati framework for OMAP5
. Because, in OMAP4, I had viewed the trace logs - trace0 and trace1
. But, in OMAP5, only trace0
is available. There are not much documents available on this online.

- 1,004
- 5
- 16
- 36
1 Answers
This isn't really an OMAP4 vs OMAP5 difference. The Ducati subsystem is made of 2 ARM Cortex M cores (2xM3 on OMAP4, 2xM4 on OMAP5). The initial implementation of the RTOS (on OMAP4) did not support SMP, so each M core was running its own RTOS instance, and its own image. Each core was indeed running a different image which was loaded by remoteproc.
the trace0 and trace1 refered to the running Cortex M core ID, each image was using a different ID. The MPU side could send messages to either one or the other core, explicitly.
The RTOS running on the Ducati cores (aka TI SYS/BIOS) was later improved and support for SMP was added. For Android OMAP 'releases' that transition happened in OMAP5 timeframe. So the RTOS on OMAP5 Android release was running a single image which was aware of the 2 Cortex M cores, and was able to schedule tasks on 1 core or the other. As a consequence there was a single 'trace' instance (trace0). The MPU would then 'see' the Ducati as a single subsystem, and would send all messages to this instance (instead of sending to either core0 or core1). The messages on the Ducati subsystem would then be dispatched to the right task/thread which was running on one core or the other.
I said it wasn't an OMAP4 vs OMAP5 difference, since the SMP aware SYSBIOS was also available on OMAP4 at some point (as well as in non Android linux releases).

- 156
- 1
-
Thank you so much for the detailed explanation. I have two doubts. – Gomu Jun 03 '14 at 09:56
-
1. What do you mean by **image** in both cores run separate image? 2. What are traces? I had previously assumed that they were just logs. But, you have mentioned that MPU will send messages to it and Ducati will dispatch the tasks based on it. – Gomu Jun 03 '14 at 10:02
-
when i used the word 'image' i meant the actual ELF executable loaded by MPU onto the Ducati. in non SMP mode, each Cortex M is running its own image (e.g. ELF application), and each image has a copy of the RTOS (SYSBIOS). to start the Ducati subsystem the MPU would release each Cortex M from reset, and each core would start the execution of its own ELF application. in SMP mode only 1 ELF application is loaded into memory by the MPU. I don't remember if the MPU releases from reset both Cortex M or only the first one, which in turns releases the other one, but that's almost a detail.. – ndec Jun 03 '14 at 17:10
-
About the second question, 'traces' are log/printf messages emitted by the Ducati subsystem. The traces are put in a shared memory buffer, and can be read/displayed from MPU (debugfs). The MPU can send messages to a task running on a remote processor (and vice versa). In non SMP mode it can send either to core0 or core1, so MPU needs to know on which core the task is running since task are created from the ELF application. In SMP mode core0 gets all the messages from MPU and dispatch them to the right task (which could be running on any of the core). – ndec Jun 03 '14 at 17:10
-
Thanks. So, the MPU sending messages to a task, is nothing related to traces. Am I right? – Gomu Jun 04 '14 at 05:59
-
no, it's not. 'traces' are used for debugging. the main purpose of remoteproc/rpmsg is to offer IPC service to send/receive messages. – ndec Jun 04 '14 at 09:12
-
The trace buffer is a circular buffer, right? What will happen to the new trace messages, when the buffer fills? By concept of circular buffer, it will replace the old data. That means, the initial part of the log now contains the new data? – Gomu Jun 27 '14 at 09:02
-
yes, this is correct. the trace buffer contains the most recent traces – ndec Jun 27 '14 at 12:39
-
While putting more debug messages in the Ducati, the ducati crashes. Does it have anything to do with the buffer? Sometimes the trace0 file itself goes missing. What might be the reasons for that? – Gomu Jul 03 '14 at 13:27