-
Notifications
You must be signed in to change notification settings - Fork 486
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
pyocd pack install fails for STM32G0 #813
Comments
I can confirm this.
This is strange because opening https://sadevicepacksprodus.blob.core.windows.net/pdsc/Keil.STM32G0xx_DFP.pdsc shows up content correctly in a browser.
|
Likely the root cause is this issue; Issue is somewhere deep down in RustLS apparently. |
Hi @JanneKiiskila is there any way to manually downliad and later pass the .pdsc file?
Thanks |
@fgr1986 You can download DFPs directly from the Keil CMSIS-Pack list and use the |
Hello, I use a nucleo_l452re board. I try to follow the above instruction but does not work. I will show what I typed and my results. Please point out what I missed. I confirm with pyocd that it knows about the board.
stm32l452re is not a built-in target. I downloaded DFP for STM32L4 from the Keil link. I confirmed the file is fine with
I use
I tried a few other potential command line combinations, but still fail.
Please show an sample command line that works. The phrase "use the |
Further googling shows me issue 643. I try to follow the instructions over there. I still run into problem. First, I obtain target_override and probe's unique ID.
Next, I create this config file /workdir/mypyocd.yaml
Invoke
I am not able to get the positive result as in issue 643. I think pyocd has read my yaml, since my command line did not specify any target but Traceback showed |
When I use a disco_l475_iot1 board, pyocd has built-in support for that target and I have seen pyocd working with that board. I make another /workdir/mypyocd.yaml for my disco_l475_iot1 board.
I don't need to specify I invoked pyocd with this yaml. It ran fine.
So, built-in target works. Using yaml configuration file works. target_override works. However, I haven't seen |
By the way, I know how to bring up stml452re using openocd. I know NUCLEO-L452RE board can work. I just need some assistance to get pyocd to use the pack I downloaded and work with NUCLEO-L452RE. I feel I am really close. I don't know what is the missing piece of the puzzle to explore next.
|
@joectchan Did you try something like this? |
Thanks for the info. That works 100% with pyocd on x86 host, but there is still issue on raspberry pi. First, the success on x86.
From STM32CubeIDE project for my NUCLEO-L452RE board, I know the part on the board should use
BTW, Next, I change my config yaml and confirm it also works. (This is where x86 works 100% but not on raspberry pi)
Run again using the config yaml and it works.
|
The problem I see happens on my in-house development board. It has an stm32l452reix at 3.3V and stm32l452ceux at 1.8V. I can use openocd and STM32CubeIDE to debug them, i.e. I know the hardware works. I connect this board to pyocd on a raspberry pi running ubuntu. This is my config yaml.
When I tell pyocd to use my yaml, it thinks I am using generic target cortex_m.
When I tell pyocd to use stm32l452reix as target at command line, it works.
I copy my yaml to x86 host. Connect my board to x86 host. Then, pyocd on x86 can read my yaml and work fine.
I edit my yaml file to use stm32l452ceux as target. Move my probe to that uC. Using the same command line on x86 host, pyocd knows my target is stm32l452ceux.
So, there is something wrong parsing yaml when running on raspberry pi, but the same yaml can work on x86 host. |
In the config yaml you show above, the
I don't know why it would work on your host machine. Can you confirm whether the indentation is different on the host? |
Ah, I know. On the RasPi, unless you have mounted the STLink USB mass storage volume, pyocd won't be able to auto-detect the board/MCU type. This is because the board ID is stored in an HTML file on the STLink volume. I see the same thing when running pyocd on my RasPi with my STM32L475 connected. On the PC, the STLink USB volume is automatically mounted and thus the board ID can be detected. |
@flit Thanks. It was indentation. I manual edit the yaml file as I tested multiple boards and hosts. I screwed up the indentation on the raspberry side. I also realize the Thanks for explaining the mechanism of auto-detecting the board. No wonder that does not work on raspberry nor my in-house dev board. Good to know I did not do anything wrong to stop it from working. Now, pyocd understands my corrected yaml on the raspberry. I get the same good behavior as on my x86. This accomplishes my goal of working around #813. I can manually give my yaml config to pyocd to connect to my uCs. My next step is to figure our how to get Anyway, I wonder how to give my pyocd.yaml to
|
Glad you're making progress! That's surprising that west doesn't show pyocd. Probably best to create an issue on the west project. (Please cc me if you don't mind so I have a link.) They should basically allow pyocd with any device/board as long as there's a way to set the target type. For the config file, pyocd will automatically use a It would also be nice if west had a way to pass arbitrary arguments to the runner. (It may already, I don't know.) |
Following up: I did not contact west project because I figured I could manually do everything I wanted to do with pyocd. I can flash MCUBoot and signed image in slot 0 partition with
sudo dfu-util --alt 1 --download nucleo_l452re_build-blinky/zephyr/zephyr.signed.bin
|
The pack download issues for the STM32 packs have been worked around on the server. Closing this issue. |
When running pack install command for STM32G0 soc, command fails:
Might be due to following previous error:
The text was updated successfully, but these errors were encountered: