-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Well, this is hardly detailed or helpful, so many questions :sigh #13
Comments
|
Well, I appreciate the reply, thankyou :) Yes I eventually figured out that "I" had to compile to an elf file first. In my limited experience admittedly I have seen debugging in VS Code compile things as well. But then I program in JavaScript which is interpreted so ... I think the issue is that the extension cannot communicate with the STM8S Discovery board through the built in USB. I suppose if I bought a STMlink v2 and wired it up it might work as is, but to work as is I need to figure out how to get the usb and on board debugger chip to communicate with the extension. Any ideas. As a suggestion, it might be useful to less experienced ones to write some introductory material on how this extension is working so that newbies can get their head around what it is doing. It might then make a bit more sense. Just saying. :) |
Openocd will auto detect stlink device and other usb device !, Here's how it connect (these processes are automated):
STM8S Discovery board have a an embedded debugger ST-Link. So you only need connect it to your PC, and launch Debug, that's OK ! |
Uhmm. So does the extension automatically open the openocd? C:\Users\Gordon\Documents\Applications\STM8S\bin>openocd --version My output ==================== Connect ==================== [END] [END] ==================== Launch ==================== my launch.json { I'm just wondering about the paths to the interface and target, let me check the PATH? |
No checked path and made explicit
I don't know anything about openOCD, but just for a laugh I did
C:\Users\Gordon\Documents\Applications\STM8S\bin>openocd That doesn't look good! And indeed there isn't an openocd.cfg in scripts Any thoughts ;) Thanks to your active help I'm sure we can crack this and make this very helpful to other noobs as well. Gordon |
Use openocd v0.10.0, not v0.11.0 Maybe the new OpenOCD have bugs, when I developed this plugin, v0.11.0 was not existed. Normally, it looks like this: my launch.json: {
"type": "stm8-debug",
"request": "launch",
"name": "openocd",
"serverType": "stm8-sdcc",
"executable": ".\\build\\Debug\\stm8s103f3_sdcc_quickstart.elf",
"cpu": "STM8S003F3",
"openOcdConfigs": [
"interface/stlink.cfg",
"target/stm8s003.cfg"
]
} |
No joy New openocd
changed launch.json to
So there are two things that seem problematic. The first is the I turned firewall off, but no joy. The second issue is Perhaps I am compiling the source incorrectly. It's only a simple blinky, but so I could get some practice with Makefile s I split it into 2 src files main.c and delay.c and added a main.h main.c
delay.c
main.h
The compile lines in my Makefile are
(I haven't figured out how to do the Makefile properly yet, but it works for my hex file well enough). |
I think I would like to make sure the openocd is working. I created a simple openocd.cfg file
Then I did openocd from command line and got:
This seems similar to the error on VS Code
To me, it seems to be saying that it cannot communicate with the device using the SWIM interface through the built in STLink. I suspect that I need to configure openocd a bit more. Sadly there is no board definition for the STM8S-discovery which is a shame and very surprising. I have looked all over the internet. I have updated my compile using the information from the link you provided, but I think that should be the next problem to solve :) regards, Gordon |
My updated elf compile if needed. Some flags caused it to fail, not investigated yet. |
Hi, I have a STM8S005 chip and a cheap ST-LINK v2 clone. First I had troubles to build my code with the necessary debug informations. Now I'm interrested wheter there is the possibility to start openocd automatically. My launch.json looks as following: Any suggests? |
I have an STM8S discovery board.
I have no idea what I am supposed to do.
Here is my launch.json
{
"version": "0.2.0",
"configurations": [
{
"type": "stm8-debug",
"request": "launch",
"name": "Launch Program",
"serverType": "stm8-sdcc",
"executable": ".\main.elf",
"cpu": "STM8S105S6",
"openOcdConfigs": [
"interface/stlink-v2.cfg",
"target/stm8s105.cfg"
]
}
]
}
So what is serverType and what values can be used, should be used?
When does sdcc create an .elf file and where is that to be found. I know sdcc creates all sorts of files, but from the command line I have not seen an elf ? I can create ihx files easily.
What values can I put in for cpu
Here is my output:
==================== Initialize ====================
==================== Connect ====================
[SEND]: set print elements 0
[END]
[SEND]: set width 0
[END]
[SEND]: file "./main.elf"
./main.elf: No such file or directory.
[END]
[SEND]: target extended-remote localhost:3333
localhost:3333: No connection could be made because the target machine actively refused it.
[END]
==================== Launch ====================
[SEND]: load
No executable file specified.
Use the "file" or "exec-file" command.
[END]
[SEND]: continue&
The program is not being run.
[END]
And this hardly helps either except that it can't find an executable.
I really don't know why I waste so much time on partially documented, non working drivel. I am so glad it works for you and you wanted to share, but really it would have been better if you hadn't bothered unless you DOCUMENT things properly. Not everyone knows what's inside your head.
Thanks.
Gordon
big :sigh
The text was updated successfully, but these errors were encountered: