-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[feature] STM32H7xx support #671
Comments
It is not supported currently. The chipid reads zero because probably the wrong registery is read which returns zero. If you would like you could try to add it. |
Alright is it only the thing in chipid.c which needs to be found out? Or do I have to modify other parts as well? |
I assume we will need to add in a flashloader for h7 https://github.com/texane/stlink/tree/master/flashloaders |
We need to find the correct place to readout the chipid, from that point we select the flash loader. There is a small part in assembly which is run in RAM and a part which is run on the PC. It is a deep dive but probably worth the effort. In the meantime you could also use openocd with gdb which has probably already support for H7 chip variants. |
I probably wont have the time to contribute to this, as I was able to get my needs met through openocd. My needs being a command line way to build a binary, flash it to a target STM32H7 using ST-Link and have executable run so I can automatically perform regression testing. My steps include: The run launcher it generated for me is this (Ive striped away the comments because the code format here didnt like them): Using AC6 Eclipse, I saw the command line execution it was using. I have taken it and put it here for your use: I probably could have done more research into creating my own openocd config and used openocd on its' own but I figured this worked and didn't want to reinvent the wheel if I didn't need to. |
Hi @johanderson I understand. OpenOCD has much more contributors and also works almost the same as the |
@xor-gate I have a H7 board and made some initial discoveries,
However, when compiling and running
|
Probably the core is not halted or invalid chipid register is read thats why it read |
@xor-gate mkay, any tips on where to start looking, something todo with |
The chipid is read from the DBGMCU_IDC register with DEV_ID[11:0] bits (datasheet RM0433 page 3069) as you mentioned earlier.
It seems it doesn't read the correct register for the DEV_ID here: https://github.com/texane/stlink/blob/a2a707e4f75fd8aafce3fa6095dc34206c5bb801/src/common.c#L586-L597. See also this comment https://github.com/texane/stlink/blob/19691485359afef1a256964afcbb8dcf4b733209/include/stlink/chipid.h#L10 This means we need to read reg |
Hi, this returns zero, however reading the other address (0x5C001000) returns the chip id:
|
@iabdalkader could you try this branch https://github.com/texane/stlink/tree/stm32h7xx-improvements. It took me some time to figure out how to programmaticly verify to which core the programmer is talking to and which stm32 variant. Should work now. See https://github.com/texane/stlink/blob/stm32h7xx-improvements/src/common.c#L592-L602. |
@xor-gate Hi, I get a warning (treated as error) about uninitialized ret in stlink_core_id. Initializing ret to 0 or -1 will fix. After adding the chip id and params above, it works:
However breakpoints are not working. This is what I ran from the gdb side:
|
Any updates on this? |
You are probably better of using OpenOCD as long it is not working yet. |
How's a progress? What is stopping to add STM32H7 support? Can I help with anything? |
My stm32H743 Nucleo board not working this stink
|
@SL-RU no progress, if people need this to work properly someone must standup to fix it. |
Hello. There is any progress? |
@SL-RU great! |
Hi. Anyone still interesting in this topic? Have cloned the stm32h7xx-improvements branch and managed to build it. As iabdalkader commented on Mar 7, 2018, there is an issue at line 590 in common.c, where int ret should be initialized to (-1). Easy fix though. But I still get the unknown chip id error when running st-util even though the core-id is correct... Seems like the chipid.c/h updates was not part of the branch Added this block to chipid.c as given by olofwalker commented on Feb 26, 2018 And to chipid.h
|
@zainkamoi please provide a pull request if you want, which is the way to go. Thanks! |
@zainkamoi it wasn't the real problem... Real problem is that you need to write flash uploader in asm and deeply modify everything for stm32h7 because registers and core is absolutely different from F7 and ect... It is a lot of work and requires studying datasheets and other documentation! For now I'm just using gdb server from TrueStudio |
Any updates on this? |
@SL-RU Hi, I did already a datasheet study and perhaps you could use these files as templates for your modifications: https://github.com/EmBitz/EBlink/blob/master/scripts/stmicro/stm32h7x.script I'm working now for almost 10 months on a H7 project with these scripts and have no problems so far. |
Hey,
If I check the ST-Link with my STM32H753i-EVAL board the following message occurs:
> st-flash write arm_app.bin 0x8000000 st-flash 1.4.0-14-gfbd55d9 2018-02-20T13:39:55 INFO common.c: Loading device parameters.... 2018-02-20T13:39:55 WARN common.c: Invalid flash type, please check device declaration ...
Indeed the chip id is not recognized:
> st-info --chipid 0x0000
I guess the problem here is that in
chipid.c
contains no H7s at all.Is there any plan to support these devices with stlink too?
The text was updated successfully, but these errors were encountered: