Skip to content
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

Add support for openocd on stm32g0 and stm32g4 targets #24055

Closed
erwango opened this issue Apr 3, 2020 · 3 comments · Fixed by #24120
Closed

Add support for openocd on stm32g0 and stm32g4 targets #24055

erwango opened this issue Apr 3, 2020 · 3 comments · Fixed by #24120
Assignees
Labels
area: Flashing Enhancement Changes/Updates/Additions to existing features platform: STM32 ST Micro STM32

Comments

@erwango
Copy link
Member

erwango commented Apr 3, 2020

Is your enhancement proposal related to a problem? Please describe.
stm32g0 and stm32g4 soc support has recently been added on openocd.
openocd support can now be enabled on these targets when flashing debugging

Describe the solution you'd like
Identify openocd SHA1 that enable G4/G0 support.
Enable openocd support on zephyr G4 and G0 supported platforms.
Update board docs
Check everything is fine flash/debug
Request needed change on https://github.com/zephyrproject-rtos/openocd
Close related issues (zephyrproject-rtos/openocd#11)

Additional context
Will avoid need to update pyocd local version to support G4 packages.

@erwango erwango added Enhancement Changes/Updates/Additions to existing features area: Flashing platform: STM32 ST Micro STM32 labels Apr 3, 2020
@FRASTM
Copy link
Collaborator

FRASTM commented Apr 3, 2020

Actually, I can see the PR zephyrproject-rtos/openocd#11
for G4 but no G0 support

@erwango
Copy link
Member Author

erwango commented Apr 3, 2020

@FRASTM
This is on openocd main repo: http://openocd.zylin.com/#/c/4807/
zephyrproject-rtos/openocd is a fork that needs to be updated

@FRASTM
Copy link
Collaborator

FRASTM commented Apr 7, 2020

To install and use your local openocd:

  1. install tools needed to compile OpenOCD
    sudo apt-get install git autoconf libtool make pkg-config libusb-1.0-0 libusb-1.0-0-dev

  2. Download the latest source code for OpenOCD with
    git clone http://openocd.zylin.com/openocd

  3. Change into the code directory and run the bootstrapper with:
    cd openocd-code
    ./bootstrap

  4. Run make and sudo make install

  5. You are now ready to Flash your board with
    west flash --openocd /usr/local/bin/openocd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Flashing Enhancement Changes/Updates/Additions to existing features platform: STM32 ST Micro STM32
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants