Hi Magnus,
Magnus Lundin wrote:
> So there is two taps configured and no target.
> So we must configure a target, cortex_m3, attached to the omap3.cpu tap
>
> That should be:
>
> set _TARGETNAME [format "%s.cpu" $_CHIPNAME]
> target create $_TARGETNAME cortex_m3 -endian $_ENDIAN -chain-position
> $_TARGETNAME
>
> or simply
> target create omap3.cpu cortex_m3 -endian little -chain-position omap3.cpu
>
> We must use cortex_m3 as a target type because this is the only target
> that uses to the swjdp interface. Hopefully it is also similar to the A8
> so we can get some meaningful info using this setting.
Great! Many thanks for helping me with the obvious ;)
-- cut --
> scan_chain
TapName | Enabled | IdCode Expected IrLen
IrCap IrMask Instr
---|--------------------|---------|------------|------------|------|------|------|---------
0 | omap3.cpu | n | 0x00000000 | 0x0b6d602f | 0x04 |
0x01 | 0x00 | 0x0f
1 | omap3.jrc | Y | 0x0b7ae02f | 0x0b7ae02f | 0x06 |
0x01 | 0x0f | 0x3f
> jtag tapenable omap3.cpu
Enabling Cortex-A8 @ OMAP3
Cortex-A8 @ OMAP3 enabled
1
> scan_chain
TapName | Enabled | IdCode Expected IrLen
IrCap IrMask Instr
---|--------------------|---------|------------|------------|------|------|------|---------
0 | omap3.cpu | Y | 0x00000000 | 0x0b6d602f | 0x04 |
0x01 | 0x00 | 0x0f
1 | omap3.jrc | Y | 0x0b7ae02f | 0x0b7ae02f | 0x06 |
0x01 | 0x0f | 0x3f
> target create omap3.cpu cortex_m3 -endian little -chain-position
omap3.cpu
> cortex_m3 apsel 0
ap 0 selected, identification register 0x14770001
> cortex_m3 dap 0
ap debugbase 0xffffffff
ap identification register 0x14770001
> cortex_m3 apsel 1
ap 1 selected, identification register 0x04770002
> cortex_m3 dap 1
ap debugbase 0x80000000
ap identification register 0x04770002
> cortex_m3 apsel 2
ap 2 selected, identification register 0x14760010
> cortex_m3 dap 2
ap debugbase 0x00000000
ap identification register 0x14760010
> cortex_m3 apsel 3
ap 3 selected, identification register 0x00000000
> cortex_m3 dap 3
ap debugbase 0x00000000
ap identification register 0x00000000
> cortex_m3 apsel 4
ap 4 selected, identification register 0x00000000
> cortex_m3 dap 4
ap debugbase 0x00000000
ap identification register 0x00000000
> cortex_m3 apsel 5
ap 5 selected, identification register 0x00000000
> cortex_m3 dap 5
ap debugbase 0x00000000
ap identification register 0x00000000
> ...
-- cut --
Now I have to re-read the TRMs what this does tell me. I read them one
week ago and have forgotten already :(
Many thanks and best regards
Dirk
Btw.: Reading the mailing list traffic, I stayed at rev 1462 with your
dap/apsel patch for the moment.
> Dirk Behme wrote:
>> Magnus Lundin wrote:
>>> Hi
>>>
>>> I think yuo can use something like:
>>>
>>> targets omap3.cpu
>> Doesn't work:
>>
>> -- cut --
>>> targets omap3.cpu
>> Target: omap3.cpu unknown, try one of:
>>
>> CmdName Type Endian AbsChainPos Name State
>> -- ---------- ---------- ---------- ----------- ------------- ----------
>>
>> -- cut --
>>
>> Anybody else with an idea how to configure commands like e.g.
>> 'cortex_m3 dap 0' to work on one of the several TAPs in a muli-TAP
>> device? I.e. how to specify the TAP they should deal with?
>>
>>> cortex_m3 dap 0
>> Any idea about
>>
>> -- cut --
>>> cortex_m3 dap 0
>> invalid command name "cortex_m3_dap"
>> called at file "command.c", line 456
>> called at file "embedded:startup.tcl", line 89
>> called at file "embedded:startup.tcl", line 93
>> -- cut --
>>
>> ?
>>
>> In a first step this doesn't look multi-TAP related? Some wrong
>> configuration?
>>
>> Best regards
>>
>> Dirk
>>
>>> I have never used any target with multiple taps so this is just
>>> guessing from my side.
>>>
>>> Regards,
>>> Magnus
>>>
>>>
>>> Dirk Behme wrote:
>>>> Magnus Lundin wrote:
>>>>> Hi
>>>>>
>>>>> The following patch is a first step towards support for sevaral AP
>>>>> in one dap.
>>>>>
>>>>> - Adds a apsel variable, corresponding to the corresponding field
>>>>> in the DP SELECT register, to the swjdap structure.
>>>>> - adds a function swjdp_apselect(swjdp_common_t *swjdp,u8 apsel) to
>>>>> set this variable.
>>>>> - adds two cortex_m3 interactive commands
>>>>> cortex_m3 dap #n Shows the contents of ROM/Debug base
>>>>> register and AP ID Register
>>>>> cortex_m3 apsel #n Configures to use AP #n in subsequent
>>>>> memory accesses.
>>>>>
>>>>> This should be a possible starting point to explore other debug
>>>>> configurations that the Cortex_M3
>>>>>
>>>>> Tested on STM32 with no problems found. I dont have any A8 hardware.
>>>> I tried to use the commands above with OMAP3 Cortex A8. Two questions:
>>>>
>>>> - OMAP3 has (at least) two TAPs
>>>>
>>>>> scan_chain
>>>> TapName | Enabled | IdCode Expected IrLen
>>>> IrCap IrMask Instr
>>>> ---|--------------------|---------|------------|------------|------|------|------|---------
>>>>
>>>>
>>>> 0 | omap3.cpu | Y | 0x00000000 | 0x0b6d602f | 0x04 |
>>>> 0x01 | 0x00 | 0x0f
>>>> 1 | omap3.jrc | Y | 0x0b7ae02f | 0x0b7ae02f | 0x06 |
>>>> 0x01 | 0x0f | 0x3f
>>>>
>>>> while 'omap3.cpu' is "Cortex A8" where I think above cortex_m3
>>>> commands should work with. How do I tell these commands which TAP to
>>>> deal with? I.e. how to select which TAP the DAP and AP commands to
>>>> work with?
>>>>
>>>> - OpenOCD revision 1462 with the patch from this mail:
>>>>
>>>> -- cut --
>>>>> cortex_m3 dap 0
>>>> invalid command name "cortex_m3_dap"
>>>> called at file "command.c", line 456
>>>> called at file "embedded:startup.tcl", line 89
>>>> called at file "embedded:startup.tcl", line 93
>>>>> cortex_m3 dap 1
>>>> invalid command name "cortex_m3_dap"
>>>> called at file "command.c", line 456
>>>> called at file "embedded:startup.tcl", line 89
>>>> called at file "embedded:startup.tcl", line 93
>>>>> cortex_m3 apsel 0
>>>> invalid command name "cortex_m3_apsel"
>>>> called at file "command.c", line 456
>>>> called at file "embedded:startup.tcl", line 89
>>>> called at file "embedded:startup.tcl", line 93
>>>>> cortex_m3 apsel 1
>>>> invalid command name "cortex_m3_apsel"
>>>> called at file "command.c", line 456
>>>> called at file "embedded:startup.tcl", line 89
>>>> called at file "embedded:startup.tcl", line 93
>>>> -- cut --
>>>>
>>>> Any hint?
>>>>
>>>> Many thanks and best regards
>>>>
>>>> Dirk
>>> _______________________________________________
>>> Openocd-development mailing list
>>> [email protected]
>>> https://lists.berlios.de/mailman/listinfo/openocd-development
>>>
>
> _______________________________________________
> Openocd-development mailing list
> [email protected]
> https://lists.berlios.de/mailman/listinfo/openocd-development
>
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development