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

Support for chinese STM32F103C8T6 clones #238

Closed
asmfreak opened this issue Jul 9, 2019 · 2 comments · Fixed by #240
Closed

Support for chinese STM32F103C8T6 clones #238

asmfreak opened this issue Jul 9, 2019 · 2 comments · Fixed by #240

Comments

@asmfreak
Copy link
Contributor

asmfreak commented Jul 9, 2019

Hi!
We were unlucky to buy a bunch of BluePills with chinese clone of STM32 called CKS32F103C8T6. As far as I understand, it is a perfect replacement, but openocd fails to upload a firmware in it. If I understand correctly, it is not perfectly compatible - openocd recieves the same CPUTAPID as STM32F3x series MCUs. If I put

set CPUTAPID 0x2ba01477

just before include of mcu's config (so it cannot be fixed by using a custom script), it uploads just fine and works.
It requires futher testing.
I want to propose a change to add an option to bluepill bdf's to support it.

@asmfreak
Copy link
Contributor Author

asmfreak commented Jul 9, 2019

I don't have a ready-made pr for this, so I want an advice for a best way to implement this. Should it be a new target?

@salkinium
Copy link
Member

I think this is out-of-scope for modm. There is a risk of "customization creep" where a lot of lbuild options are added to modm. Instead our vision was to take the generated modm output and modify it and then commit those changes.

Piping the OpenOCD config options through lbuild were mostly a hack without a good concept. The blue pill config inside the repository has the programmer hard-coded (#234), which is obviously an issue, requiring yet another lbuild option (#235).
It would be better if you could overwrite the default openocd config file entirely and replace it with your own. I have to think about how that would work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

2 participants