You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -29,16 +55,29 @@ These commands load the symbol files and specify the memory address location, up
29
55
30
56
The `EL` (Exception Level) and number at the end of each command, for example, `EL3:0`, ensure the symbols are loaded into the correct virtual address space and at the correct memory offset. ATF uses absolute addresses for its symbols so we use an offset of 0.
31
57
32
-
After connecting to the running model, check that it has stopped. Set a breakpoint on the next instruction of
33
-
the TF-A and press **run**. In this debug panel, you can find common debugging functions like stepping and skipping.
58
+
When you connect the debugger, the primary CPU will be "spinning" on a ``b .`` instruction from the one you manually added to the ``bl1_entrypoint`` function.
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/refinfra-debug/debugging-bl33-uefi-5.md
+32-13Lines changed: 32 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,33 +10,52 @@ layout: learningpathall
10
10
11
11
Adding symbol files for UEFI requires you to boot the FVP once without debugging, so that you can retrieve the symbol file locations and memory addresses.
12
12
13
-
After booting the FVP, notice that in the Non-secure AP console output, the UEFI load system helpfully shows where each driver is relocated to. The UEFI load system pre-formats the output into `add-symbol-file` directives that can be copy-and-pasted.
13
+
After booting the FVP, notice that in the Non-secure AP console output, the UEFI load system helpfully shows where each driver is relocated to.
14
+
15
+
**Do the same actions in the same order you will when you are debugging as this affects the locations of the modules. For example, open UEFI interface -> Enter UEFI Shell -> Load EFI driver in the same order each time.**
As we focus on the ``uart-0-nsec`` console, we can use ``grep`` to find all the symbol files.
21
-
```bash
22
-
grep add-symbol-file refinfra-*-uart-0-nsec-*
23
-
```
22
+
Following the previous chapter, we should still be in TF-A. In the Commands window, execute the following command to break at the start of UEFI: ``break EL2N:0xE0000000``. Execute until we are in EL2N address space. This is because the script depends on the current address space when loading in symbols.
23
+
24
+
In Arm DS, go to the scripts tab and hit "Import a script or directory" then "Import a DS or Jython script"
We can then copy these lines and append them to the list of symbol files, as before.
32
+
``-f (<UEFI entry point>, 0x20000)`` The UEFI entry point was found earlier (0xE0000000). 0x20000 is the size which can be found in the UEFI build log.
28
33
29
-
UEFI runs in EL2, so modify the end of each line to be ``EL2:<address>``.
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/refinfra-debug/debugging-scp-lcp-rse-2.md
+24-2Lines changed: 24 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,12 @@
1
1
---
2
-
title: Debugging SCP
2
+
title: Debugging SCP/LCP/RSE
3
3
weight: 3
4
4
5
5
### FIXED, DO NOT MODIFY
6
6
layout: learningpathall
7
7
---
8
8
9
-
## Debugging SCP
9
+
## Setting up a connection
10
10
{{% notice %}}
11
11
SCP firmware debug uses the `-Og` argument. This optimizes some variables that make debugging difficult. To replace `-Og` with `-O0`, do the following:
12
12
@@ -46,16 +46,38 @@ In the **Edit configuration and launch** panel, in the **Connection** tab, selec
46
46
47
47
For the `SCP` code, select **ARM_Cortex-M7_1**.
48
48
49
+
{{% notice Selecting the correct core %}}
50
+
For different platforms (e.g., RD-N2, RD-V3, etc.), you will see a list of numbered M7 and M55 cores. Typically, even-numbered M7 cores correspond to the MCP, while odd-numbered cores are assigned to the SCP. Additionally:
51
+
52
+
-`ARM_Cortex-M55_0` to `ARM_Cortex-M55_(N-1)` represent LCP cores.
53
+
-`ARM_Cortex-M55_N` represents the RSE.
54
+
55
+
To verify core assignments, you can set up alerts (e.g., print statements or store variables), connect to a debugger, and test the configuration.
Select **Apply** then **Debug**. The debugger now connects to the model.
58
79
80
+
## Setting breakpoints
59
81
Once connected, you can set breakpoints in the source code. This can be done by searching for the function in the **Functions** tab, double-clicking next to the line number, or in the **Command** view.
60
82
61
83
Set a breakpoint at ``cmn700_discovery()``. Continue execution and the code stops at the breakpoint you specify.
0 commit comments