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

Issues understanding the st link install for Mac #499

Closed
moha1899 opened this issue Oct 15, 2016 · 5 comments
Closed

Issues understanding the st link install for Mac #499

moha1899 opened this issue Oct 15, 2016 · 5 comments

Comments

@moha1899
Copy link

I guess I'm just really new to this kind of stuff and I'm just having a hard time understanding exactly how to install the st link for a MacBook that's On Yosemite 10.10.5. I was wondering if you could possibly send me a more detailed step by step on how to install and what files need to be changed and stuff. I'd really appreciate it. I look forward to hearing back from you.

@xor-gate
Copy link
Member

xor-gate commented Oct 15, 2016

I totaly understand, as a user you should use Homebrew package manager (installing opensource on your mac). When you want the latest software you need to compile yourself which is wat is described in this README.md of the project.

I think you should go this route:

  • Install iterm2 terminal (better than console)
  • Install homebrew package manager (like aptitude on ubuntu/debian, or chocolaty on windows)
  • Install compiler toolchain and programming tools for ARM
    • brew install stlink
    • brew install openocd (alternative for texane/stlink)
    • brew install Caskroom/cask/gcc-arm-embedded

You are right, this is not mentioned in the readme for first-time users. I have labeled this issue It should land into the documentation.

When you want to use OpenOCD in combination with GDB you need this configuration (load with openocd -f <config>). Edit the target as appropriate:

source [find interface/stlink-v2.cfg]
transport select hla_swd
source [find target/stm32f4.cfg]
reset_config srst_only

@xor-gate
Copy link
Member

I could recommend this book https://leanpub.com/mastering-stm32

@moha1899
Copy link
Author

moha1899 commented Oct 15, 2016

I definitely will it. I installed the opencd but now I'm kind of stuck running it. Are those the exact steps I need to run it? Thank you so much for clearing things up.

@xor-gate
Copy link
Member

You need to write the configuration into a file e.g myopenocd.cfg and then run from the commandline: openocd -f myopenocd.cfg. You should see something like:

Jerrys-MBP-405:lesson-4 jerry$ openocd -f openocd.cfg
Open On-Chip Debugger 0.9.0 (2016-09-30-17:45)
Licensed under GNU GPL v2
For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html
adapter speed: 300 kHz
adapter_nsrst_delay: 100
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
none separate
adapter speed: 4000 kHz
trst_and_srst trst_pulls_srst srst_nogate trst_push_pull srst_open_drain connect_assert_srst
Info : clock speed 4000 kHz
Info : STLINK v2 JTAG v27 API v2 SWIM v0 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 2.920499
Info : stm32l1.cpu: hardware has 6 breakpoints, 4 watchpoints

@xor-gate
Copy link
Member

How is the progress going?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants