Skip to content

Conversation

@gmarull
Copy link
Member

@gmarull gmarull commented Nov 1, 2021

This PR adds initial support for the GD32F450I-EVAL board. It also includes some refactoring to the hal_gigadevice module and SoC/dts organization to accommodate addition of new series. Each commit contains more information/details on the changes performed.

Note: I'll open a separate PR for the pinctrl driver, for now, the board has a custom init function.

@github-actions
Copy link

github-actions bot commented Nov 1, 2021

The following west manifest projects have been modified in this Pull Request:

Name Old Revision New Revision Diff
hal_gigadevice zephyrproject-rtos/hal_gigadevice@ce323de zephyrproject-rtos/hal_gigadevice@85f10a6 (main) zephyrproject-rtos/[email protected]

Note: This message is automatically posted and updated by the Manifest GitHub Action.

Copy link
Member

@nandojve nandojve left a comment

Choose a reason for hiding this comment

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

Hi @gmarull ,

Just a few comments.

Copy link
Member

@nandojve nandojve left a comment

Choose a reason for hiding this comment

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

LGTM !

Copy link
Contributor

@cameled cameled left a comment

Choose a reason for hiding this comment

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

LGTM.

Despite the "F4" prefix, GD32F403 is an SoC with significant differences
compared to other F4 MCUs:

- It has a completely different HAL
- It has significant hardware differences, for example, the pinctrl
  mechanism uses AFIO (all others use AF)

The grouping principles applied to other similar vendors such as ST
can't be applied for GD32 due to these reasons, so the approach taken
here is to define series based on the used HAL. A different HAL likely
means that there are significant hardware differences between, e.g. F403
and F405. The vendor likely chose a confusing naming scheme, but we need
to deal with it.

Signed-off-by: Gerard Marull-Paretas <[email protected]>
There is no need to specify SoC suffixes, so simplify the selection.

Signed-off-by: Gerard Marull-Paretas <[email protected]>
- Remove unnecessary include guard
- Fix comments

Signed-off-by: Gerard Marull-Paretas <[email protected]>
Adjust CMake according to latest SoC changes.

Signed-off-by: Gerard Marull-Paretas <[email protected]>
Create a folder for each of the series.

Signed-off-by: Gerard Marull-Paretas <[email protected]>
Update hal_gigadevice, required to make F4XX HAL available.

Signed-off-by: Gerard Marull-Paretas <[email protected]>
GD32F4XX requires access to SoC definitions (e.g. GD32F450) when
including library header files, so expose them at Zephyr level.

Signed-off-by: Gerard Marull-Paretas <[email protected]>
Add missing drivers included in F4XX HAL:

- DCI
- IPA
- IREF
- SYSCFG
- TLI
- TRNG

Signed-off-by: Gerard Marull-Paretas <[email protected]>
Add initial support for GD32F4XX (405, 407 and 450).

Signed-off-by: Gerard Marull-Paretas <[email protected]>
Add support for the IK variant (256K SRAM, 3072K ROM).

Signed-off-by: Gerard Marull-Paretas <[email protected]>
@github-actions github-actions bot removed the DNM This PR should not be merged (Do Not Merge) label Nov 14, 2021
Add support for the F4XX series.

Signed-off-by: Gerard Marull-Paretas <[email protected]>
Add initial support for the GD32F450I-EVAL board.

Signed-off-by: Gerard Marull-Paretas <[email protected]>
Copy link
Member

@carlescufi carlescufi left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@martinjaeger martinjaeger left a comment

Choose a reason for hiding this comment

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

PR looks good. Haven't worked with this particular MCU series, though, and I didn't double-check with the reference manual.

@carlescufi carlescufi merged commit db030c2 into zephyrproject-rtos:main Nov 18, 2021
@gmarull gmarull deleted the gd32f450 branch November 18, 2021 16:54
@str4t0m str4t0m added the platform: GD32 GigaDevice label Aug 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants