Skip to content

Conversation

@yorickdewid
Copy link

@yorickdewid yorickdewid commented Nov 18, 2021

Summary of changes

  • Add the STM32H753ZI target
  • Add support for the NUCLEO H753ZI development board.

Impact of changes

Migration actions required

Documentation

None. The documentation is not yet updated.


Pull request type

[x] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[x] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

Need some assistance with tests. I've run the build.py tool but it returns a failed build. However an existing target returns a failed build as well.

python3 ./tools/build.py -m NUCLEO_H753ZI -t GCC_ARM

/usr/lib/python3/dist-packages/requests/__init__.py:89: RequestsDependencyWarning: urllib3 (1.26.7) or chardet (3.0.4) doesn't match a supported version!
  warnings.warn("urllib3 ({}) or chardet ({}) doesn't match a supported "
Scan: drivers
Scan: platform
library 'bare-metal' requires 'rtos-api', 'blockdevice' which is not present

Completed in: (0.60)s

Build failures:
  * GCC_ARM::NUCLEO_H753ZI

Reviewers


@ciarmcom
Copy link
Member

@yorickdewid, thank you for your changes.
@ARMmbed/team-st-mcd @ARMmbed/mbed-os-maintainers please review.

@jeromecoutant
Copy link
Collaborator

Hi

Very good work for me

[] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[x] Feature update (New feature / Functionality change / New API)

Choose patch update

Need some assistance with tests. I've run the build.py tool but it returns a failed build. However an existing target returns a failed build as well.
python3 ./tools/build.py -m NUCLEO_H753ZI -t GCC_ARM

Yes, this is not the correct method :-)
Use mbed cli

$ mbed test -m NUCLEO_H753ZI -t ARM -v
$ mbed test -m NUCLEO_H753ZI -t GCC_ARM -v

jeromecoutant added a commit to jeromecoutant/mbed that referenced this pull request Nov 19, 2021
Copy link
Collaborator

@jeromecoutant jeromecoutant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would change few patches to align with STM32H743,
see jeromecoutant@a957878
Thx

@jeromecoutant
Copy link
Collaborator

In order to be complete, as you set EMAC in the targets.json file, you should add the board configuration in:
https://github.com/ARMmbed/mbed-os/tree/master/connectivity/drivers/emac/TARGET_STM/TARGET_STM32H7

@yorickdewid
Copy link
Author

I'll add the board to the EMAC drivers. The difference between the h743 and the h753 is crypto support. Is this somthing I need to expose to Mbed OS?

Btw, a lot of ST docs/wiki pages are outdated, but I guess that's not a surprise.

@jeromecoutant
Copy link
Collaborator

The difference between the h743 and the h753 is crypto support. Is this somthing I need to expose to Mbed OS?

To add crypto support, you need:

Btw, a lot of ST docs/wiki pages are outdated, but I guess that's not a surprise.

https://github.com/ARMmbed/mbed-os/blob/master/targets/TARGET_STM/README.md
is supposed to be up to date

@yorickdewid
Copy link
Author

The pinout for the ethernet H743 and H753 is supposed to be the same, so added a ref to the same EMAC source.

Question; is there a test command for new Mbed CLI 2?

@jeromecoutant
Copy link
Collaborator

The pinout for the ethernet H743 and H753 is supposed to be the same, so added a ref to the same EMAC source.

Correct

Question; is there a test command for new Mbed CLI 2?

For me, tests are still with CLI1

@yorickdewid
Copy link
Author

Both the 43 and the 53 testcases fail at Compile [ 43.0%]: ws_bootstrap.c

[Error] ws_bootstrap.c@2148,95: expected ')' before 'PRIu64'
[Warning] ws_bootstrap.c@2148,33: format '%s' expects a matching 'char *' argument [-Wformat=]
[Warning] ws_bootstrap.c@2148,33: format '%hu' expects a matching 'int' argument [-Wformat=]
[Warning] ws_bootstrap.c@2148,33: spurious trailing '%' in format [-Wformat=]
[Warning] ws_bootstrap.c@2147,29: unused variable 'ret' [-Wunused-variable]
[Error] ws_bootstrap.c@2181,102: expected ')' before 'PRIu64'
[Warning] ws_bootstrap.c@2181,41: format '%s' expects a matching 'char *' argument [-Wformat=]
[Warning] ws_bootstrap.c@2181,41: format '%ld' expects a matching 'long int' argument [-Wformat=]
[Warning] ws_bootstrap.c@2181,41: format '%lu' expects a matching 'long unsigned int' argument [-Wformat=]
[Warning] ws_bootstrap.c@2181,41: spurious trailing '%' in format [-Wformat=]
[Warning] ws_bootstrap.c@2180,37: unused variable 'ret' [-Wunused-variable]

@jeromecoutant
Copy link
Collaborator

Use GCC v10 I think

ARMmbed/mbed-cli#997

@yorickdewid
Copy link
Author

Using the latest GCC compiler I still get numerus compile errors and failed tests (for both boards). Some tests complain about the compiler version ([Warning] @,: Compiler version mismatch: Have 10.3.1; expected version >= 9.0.0 and < 10.0.0)

I am willing to contribute but the whole build and test process feels messy.

@jeromecoutant
Copy link
Collaborator

[Warning] @,: Compiler version mismatch: Have 10.3.1; expected version >= 9.0.0 and < 10.0.0

This one is OK :-) #15175

@jeromecoutant
Copy link
Collaborator

Hello @yorickdewid
Do you have any issue on that ?
Maybe I can help ?

@yorickdewid
Copy link
Author

Didn't get the test cases running. I am sure the board config works because is basically the same as the H743Zi2

Copy link
Collaborator

@jeromecoutant jeromecoutant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comments from jeromecoutant@a957878

* Automatically generated from STM32CubeMX/db/mcu/STM32H753ZITx.xml
*/

/* MBED TARGET LIST: NUCLEO_H753ZI2 */
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: NUCLEO_H753ZI

Comment on lines +585 to +609
;*******************************************************************************
; User Stack and Heap initialization
;*******************************************************************************
IF :DEF:__MICROLIB
EXPORT __initial_sp
EXPORT __heap_base
EXPORT __heap_limit
ELSE
IMPORT __use_two_region_memory
EXPORT __user_initial_stackheap
__user_initial_stackheap

LDR R0, = Heap_Mem
LDR R1, =(Stack_Mem + Stack_Size)
LDR R2, = (Heap_Mem + Heap_Size)
LDR R3, = Stack_Mem
BX LR

ALIGN

ENDIF
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should remove this part

Comment on lines +33 to +46
Stack_Size EQU 0x00000400

AREA STACK, NOINIT, READWRITE, ALIGN=3
Stack_Mem SPACE Stack_Size
__initial_sp


; <h> Heap Configuration
; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
; </h>

Heap_Size EQU 0x00000200

AREA HEAP, NOINIT, READWRITE, ALIGN=3
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part is not as in H743

/* Call static constructors */
bl __libc_init_array
/* Call the application's entry point.*/
bl main
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See H743, _start should be called, not main

@DAG00DAG33
Copy link

Hello @yorickdewid and @jeromecoutant. Currently, I'm working on a project using the Nucleo h753 using MBed (We didn't realize MBed wasn't supporting this development board precisely when we chose it) So far we have been using the Nucleo h7d43 as the target because they are extremely similar.
Do you think it would be a good idea to try to use the changes you have done? And what would be the way to do so?

We are running into a big problem rn. the CAN bus is not working at all. When sending data through the CAN bus it reaches the board but it is not reading anything. And when trying to send anything the TX pin doesn't try to send anything, it is always high. We think the problem might be because of a Pin Map difference between the chips or something of that kind, but as far as I understand both boars are similar on everything. Going to the mbed target files, specifically on the PeripheralPins.c, line 391 I think the Pin Map of the CAN buses are the same.

@yorickdewid
Copy link
Author

The proposed PR only changes some configuration files and settings to the H753. Just note that they are not just similar, they are the same with the 53 having a couple of cryptographic extensions. Could can port the code between het 43 and the 53 as long as you do not touch cryptographic functions (which aren't implemented anyway).

CAN is tricky to get working, and a lot needs to happen just right. We never got that far with MbedOS. We switched to stm32-rs and got the CAN-FD working no issues. I can't advise you on the CAN interface, the problem is too broad. If you have no other options, then DM me.

@DAG00DAG33
Copy link

Glad to hear that the H753 should be completely compatible with the H743. That is what I thought, but it is good to hear it from someone who knows more about the topic.

I didn't know about STM32-rs, I will give it a look.

I was thinking about something similar, but instead of switching to stm32-rs switch to the stm32 HAL provided by st.

@jeromecoutant
Copy link
Collaborator

FYI: #15232

@mergify
Copy link

mergify bot commented Feb 16, 2022

This PR cannot be merged due to conflicts. Please rebase to resolve them.

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 8, 2022

@yorickdewid What shall we do with this draft?

@yorickdewid
Copy link
Author

I haven't used MBedOS since November so I don't know if this PR still makes sense. You can close it if you want.

@supercrazysam
Copy link

when is NUCLEO H753ZI gonna be merged to mbed-os????

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants