|
From: Ron G. <ro...@fl...> - 2015-12-30 16:02:17
|
On Dec 29, 2015, at 10:55 PM, Paul Fertser <fer...@gm...> wrote:
> Hey Ron,
Hi Paul :-)
> On Tue, Dec 29, 2015 at 12:24:46PM -0800, Ron Garret wrote:
>>> On Tue, Dec 29, 2015 at 11:21:01AM -0800, Ron Garret wrote:
>>>> ron@ubuntu1:~$ /usr/bin/openocd -f stm32f3x.cfg
>>>
>>> This is where it's obviously wrong. You need to source adapter config
>>> before the target config. Or if you have f3 disco, then you can use
>>> the board config as in: "openocd -f board/stm32f3discovery.cfg".
>>>
>>> You seem to be trying to use some out-of-tree config, please do not do
>>> that, use upstream configs (that come with OpenOCD) instead.
>>
>> My ~/interfaces is just a symlink to
>> openocd-0.9.0-rc1/tcl/interface. Is that not the right thing?
>
> Yes, that's not the right thing to do. You're supposed to either
> install openocd properly (via package manager or with "sudo make
> install") and then openocd would know the root of the configuration
> scripts tree and use that automatically. So no explicit patch or
> symlinks or anything else necessary.
OK… I actually have installed openocd both as a package (v 0.7.0, in /usr/bin) and from source (v 0.9.0-rc1, in /usr/local/bin).
>> shell). I’ve hired a contractor to build me a USB dongle, and I’m
>> trying to run his code (which includes the stm32f3x.cfg file that
>> I’m using)
>
> No, you shouldn't be using any external config files.
OK.
Just FYI, I actually did try doing this without the custom cfg file according to what is in the docs, e.g.:
openocd -f interface/stlink-v2.cfg -f board/stm32f0discovery.cfg
I tried various reasonable-looking combinations of interface and board files. None of them worked.
>> according to the instructions he provided me. He did his
>> development on Windows, but I’m allergic to Windows so I’m trying to
>> run his code on Ubuntu. So despite the fact that I’m using openocd,
>> I am fairly clueless about how it works. So, for example, I have no
>> idea what “f3 disco” is (Google is no help here), or what you mean
>> by “upstream configs”. Upstream of what?
>
> By f3 disco I meant "STM32F3 Discovery Board". Upstream configs are
> the scripts that present in OpenOCD source code and that are installed
> along with OpenOCD.
Ah.
> If you describe in detail what hardware you have and how it is
> connected, I'll be able to tell you what scripts to source.
I have (AFAIK because I didn’t actually purchase it) an STM32F3 Discovery Board connected via USB. But looking at the config files in the board directory it seems that there are at least five variations on this board, and I don’t know how to tell which one I have. I’ve attached the output of lsusb at the end of this message.
Thank you, I very much appreciate the help!
rg
——
Bus 002 Device 002: ID 0483:3748 STMicroelectronics ST-LINK/V2
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x0483 STMicroelectronics
idProduct 0x3748 ST-LINK/V2
bcdDevice 1.00
iManufacturer 1 STMicroelectronics
iProduct 2 STM32 STLink
iSerial 3 SÿoPxHWC
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 39
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 3
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 255 Vendor Specific Subclass
bInterfaceProtocol 255 Vendor Specific Protocol
iInterface 4 ST Link
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Device Status: 0x0000
(Bus Powered)
|