- Timestamp:
-
04/16/18 00:06:19 (6 years ago)
- Author:
-
Chris Johns
- Comment:
-
--
Legend:
- Unmodified
- Added
- Removed
- Modified
-
v1
|
v2
|
|
1 | 1 | [[TOC(Debugging/OpenOCD/BeagleBoneBlack, depth=3)]] |
2 | 2 | |
3 | | = OpenOCD Support for BeagleBone Black = |
| 3 | = OpenOCD Support for !BeagleBone Black = |
4 | 4 | |
5 | 5 | OpenOCD supports the [http://beagleboard.org/black BeagleBone Black] board that use the [https://www.ti.com/product/am3358 TI AM3358] SOC. The support is in the OpenOCD source and you can you can create a suitable environment. At the time of writing this page I am using the latest GIT version of OpenOCD. |
6 | 6 | |
7 | | The BeagleBone Black board as shipped has pad on the underside for JTAG. You need to solder a header on to the board so a suitable JTAG cable can be connected. It does require a small level of soldering skill but do not be put off by this. |
| 7 | The !BeagleBone Black board as shipped has pad on the underside for JTAG. You need to solder a header on to the board so a suitable JTAG cable can be connected. It does require a small level of soldering skill but do not be put off by this. |
8 | 8 | |
9 | | == Flyswatter2 for the BeagleBone Black == |
| 9 | The main OpenOCD page details [wiki:Debugging/OpenOCD how to build OpenOCD from GIT]. |
| 10 | |
| 11 | == Flyswatter2 for the !BeagleBone Black == |
10 | 12 | |
11 | 13 | Tincan Tools provides a [http://www.tincantools.com/JTAG/BeagleBone-Black-JTAG-Adapter-Kit.html BeagleBone Black JTAG Adapter Kit] and detailed instructions on their wiki describing [https://www.tincantools.com/wiki/Flyswatter2_BeagleBone_Black_How_To how to install the JTAG Adapter Kit]. The kit and the Flyswatter2 pod provide an accessible way to get JTAG debugging. |
12 | 14 | |
13 | | = BeagleBone Initialization = |
| 15 | = !BeagleBone Initialization = |
14 | 16 | |
15 | 17 | An RTEMS application runs in the DDR memory and in production the uBoot bootloader initializes the AM3358 SOC device and the connected hardware before loading the executable from local storage or over the network into the DDR memory and passing control to RTEMS entry point. JTAG needs to emulate the bootloader process and there are a number of ways this can be done. |
… |
… |
|
28 | 30 | = OpenOCD Configuration = |
29 | 31 | |
30 | | Tincan tools provides a TCL configuration file to use with OpenOCD. Download [https://www.tincantools.com/wiki/Flyswatter2_BeagleBone_Black_How_To#The_BeagleBone_Black_Config_File BeagleBone Black Config File] from Tincan Tool's wiki and save. Create a configuration file with an editor containing: |
| 32 | Tincan tools provides a TCL configuration file to use with OpenOCD. Download [https://www.tincantools.com/wiki/Flyswatter2_BeagleBone_Black_How_To#The_BeagleBone_Black_Config_File !BeagleBone Black Config File] from Tincan Tool's wiki and save. Create a configuration file with an editor containing: |
31 | 33 | |
32 | 34 | {{{ |
… |
… |
|
59 | 61 | == Initializing with uBoot == |
60 | 62 | |
61 | | The following details how to initialize the SOC using uBoot. For this you need to get uBoot from git and to build it for the BeagleBone Black. The initialization is done by GDB calling OpenOCD's monitor interface. This approach lets you provide a personal specific initialization which is useful if you are sharing hardware on a network with a team. |
| 63 | The following details how to initialize the SOC using uBoot. For this you need to get uBoot from git and to build it for the !BeagleBone Black. The initialization is done by GDB calling OpenOCD's monitor interface. This approach lets you provide a personal specific initialization which is useful if you are sharing hardware on a network with a team. |
62 | 64 | |
63 | 65 | In your home directory create or edit your `.gdbinit` file adding: |
… |
… |
|
107 | 109 | 2. Run the SOC's ROM code to disable the watchdog and perform any other low level initialization |
108 | 110 | 3. Load uBoot's MLO first stage loader, which is called SPL in uBoot source and build |
109 | | 4. Set a break to the instruction after the function `FIND FUNCTION`. |
| 111 | 4. Set a break to the instruction after the function `TODO find function name`. |
110 | 112 | 5. Run uBoot's MLO until the breakpoint |
111 | 113 | 6. Remove the breakpoint |