Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 21 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ Each ARM firmware library is organized in the following structure:
   ├── cmsis
   │   └── gd
   │   └── gd32xxx
   └── standard_peripheral
   ├── include
   └── source
   ├── standard_peripheral
   │ ├── include
   │ └── source
└── support (optional)
└── GigaDevice.GD32xxx_DFP.1.0.0.pack (Only for packs not in [Keil MDK5 Software Packs](https://www.keil.com/dd2/pack/))
Comment on lines +28 to +29
Copy link
Member

Choose a reason for hiding this comment

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

Please remove binaries from this module (send a new PR dropping this). This is not acceptable, you can provide details on how to download suck packs (not to mention that GD is responsible to host them, and can be installed automatically via cmsis-pack-manager).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm trying to make a west extension commands to solve pack problems.(#31 )

I'd like to know is it possible to save the file link in the repository like this.

pyocd-packages:
- pack: gd32e103 # pack in mdk website
- pack: gd32a503 # pack not in mdk website
url: https://www.gd32mcu.com/download/down/document_id/405/path_type/1
hash: 23c8840812ef9d86fbb87bca7d9c452c71bd9291

This way we can use commands like west gigadevice install to install all packages or download them from the gigadevice website

Copy link
Member

Choose a reason for hiding this comment

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

IMO GD should be responsible of updating packages in CMSIS repo, so that the standard tool cmsis-pack-manager can be used. In fact, they seem to have most of them (A503 is new, maybe it's not there yet, time to ping vendor?).

Copy link
Member

Choose a reason for hiding this comment

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

@gmarull ,

Why you are saying that the pack file is a binary file? As far I can see it is just a zip with source code and register definitions. You can just unzip and read all the content.

Below is the full content of the file:

.
├── Device
│   ├── Firmware
│   │   └── Peripherals
│   │       ├── inc
│   │       │   ├── gd32a50x_adc.h
│   │       │   ├── gd32a50x_bkp.h
│   │       │   ├── gd32a50x_can.h
│   │       │   ├── gd32a50x_cmp.h
│   │       │   ├── gd32a50x_crc.h
│   │       │   ├── gd32a50x_dac.h
│   │       │   ├── gd32a50x_dbg.h
│   │       │   ├── gd32a50x_dma.h
│   │       │   ├── gd32a50x_exti.h
│   │       │   ├── gd32a50x_fmc.h
│   │       │   ├── gd32a50x_fwdgt.h
│   │       │   ├── gd32a50x_gpio.h
│   │       │   ├── gd32a50x_i2c.h
│   │       │   ├── gd32a50x_mfcom.h
│   │       │   ├── gd32a50x_misc.h
│   │       │   ├── gd32a50x_pmu.h
│   │       │   ├── gd32a50x_rcu.h
│   │       │   ├── gd32a50x_rtc.h
│   │       │   ├── gd32a50x_spi.h
│   │       │   ├── gd32a50x_syscfg.h
│   │       │   ├── gd32a50x_timer.h
│   │       │   ├── gd32a50x_trigsel.h
│   │       │   ├── gd32a50x_usart.h
│   │       │   └── gd32a50x_wwdgt.h
│   │       └── src
│   │           ├── gd32a50x_adc.c
│   │           ├── gd32a50x_bkp.c
│   │           ├── gd32a50x_can.c
│   │           ├── gd32a50x_cmp.c
│   │           ├── gd32a50x_crc.c
│   │           ├── gd32a50x_dac.c
│   │           ├── gd32a50x_dbg.c
│   │           ├── gd32a50x_dma.c
│   │           ├── gd32a50x_exti.c
│   │           ├── gd32a50x_fmc.c
│   │           ├── gd32a50x_fwdgt.c
│   │           ├── gd32a50x_gpio.c
│   │           ├── gd32a50x_i2c.c
│   │           ├── gd32a50x_mfcom.c
│   │           ├── gd32a50x_misc.c
│   │           ├── gd32a50x_pmu.c
│   │           ├── gd32a50x_rcu.c
│   │           ├── gd32a50x_rtc.c
│   │           ├── gd32a50x_spi.c
│   │           ├── gd32a50x_syscfg.c
│   │           ├── gd32a50x_timer.c
│   │           ├── gd32a50x_trigsel.c
│   │           ├── gd32a50x_usart.c
│   │           └── gd32a50x_wwdgt.c
│   ├── Include
│   │   ├── gd32a50x.h
│   │   └── system_gd32a50x.h
│   ├── Source
│   │   ├── ARM
│   │   │   └── startup_gd32a50x.s
│   │   └── system_gd32a50x.c
│   ├── Template
│   │   └── gd32a50x_libopt.h
│   └── Utilities
│       ├── gd32a503v_eval.c
│       └── gd32a503v_eval.h
├── Flash
│   ├── GD32A50x_128KB.FLM
│   ├── GD32A50x_256KB.FLM
│   └── GD32A50x_384KB.FLM
├── GigaDevice.GD32A50x_DFP.pdsc
└── SVD
    ├── GD32A503.SFR
    └── GD32A503.svd

I think the intention was keep easy to users until pack be available into cmsis-pack-manager and after that content will be dropped from here. The major concern was that pack is only available in the Chinese website version and it is not easy to find it if link is broke.

Copy link
Member

Choose a reason for hiding this comment

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

The content is not binary, but a zip file is a binary from a git perspective. Binaries are well known to blow git history (see zephyr with board pictures), and remember Zephyr modules carry all their Git history.

```

### RISC-V
Expand Down Expand Up @@ -125,3 +127,19 @@ conflict resolution. See below list with the proposed solution:

- i2c have different implement than current gd32 i2c driver. no need to patch
upper i2c speed requirement.

- gd32a50x

- `SystemCoreClockUpdate` function contain an `pllmf` calculate error.
Fix by change `0xFU` to `RCU_CFG0_PLLMF`:
``` diff
/* PLL multiplication factor */
pllmf = GET_BITS(RCU_CFG0, 18, 21);
pllmf += ((RCU_CFG0 & RCU_CFG0_PLLMF_4) ? 15U : 0U);
- pllmf += ((0xFU == (RCU_CFG0 & RCU_CFG0_PLLMF)) ? 1U : 2U);
+ pllmf += ((RCU_CFG0_PLLMF == (RCU_CFG0 & RCU_CFG0_PLLMF)) ? 1U : 2U);
```
- For debug this board, `pyocd` need a pack file from Gigadevice,
But Gigadevice don't upload pack file to [keil packs repo](https://www.keil.com/dd2/pack/).
Fix: Storage pack as `gd32a50x/support/GigaDevice.GD32A50x_DFP.1.0.0.pack`
(Download from https://gd32mcu.com/cn/download/7?kw=GD32A5 -> GD32A50x AddOn)
4 changes: 3 additions & 1 deletion common_include/gd32_adc.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

#if defined(CONFIG_SOC_SERIES_GD32E10X)
#if defined(CONFIG_SOC_SERIES_GD32A50X)
#include <gd32a50x_adc.h>
#elif defined(CONFIG_SOC_SERIES_GD32E10X)
#include <gd32e10x_adc.h>
#elif defined(CONFIG_SOC_SERIES_GD32E50X)
#include <gd32e50x_adc.h>
Expand Down
4 changes: 3 additions & 1 deletion common_include/gd32_bkp.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

#if defined(CONFIG_SOC_SERIES_GD32E10X)
#if defined(CONFIG_SOC_SERIES_GD32A50X)
#include <gd32a50x_bkp.h>
#elif defined(CONFIG_SOC_SERIES_GD32E10X)
#include <gd32e10x_bkp.h>
#elif defined(CONFIG_SOC_SERIES_GD32E50X)
#include <gd32e50x_bkp.h>
Expand Down
4 changes: 3 additions & 1 deletion common_include/gd32_can.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

#if defined(CONFIG_SOC_SERIES_GD32E50X)
#if defined(CONFIG_SOC_SERIES_GD32A50X)
#include <gd32a50x_can.h>
#elif defined(CONFIG_SOC_SERIES_GD32E50X)
#include <gd32e50x_can.h>
#elif defined(CONFIG_SOC_SERIES_GD32F403)
#include <gd32f403_can.h>
Expand Down
4 changes: 3 additions & 1 deletion common_include/gd32_cmp.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

#if defined(CONFIG_SOC_SERIES_GD32E50X)
#if defined(CONFIG_SOC_SERIES_GD32A50X)
#include <gd32a50x_cmp.h>
#elif defined(CONFIG_SOC_SERIES_GD32E50X)
#include <gd32e50x_cmp.h>
#elif defined(CONFIG_SOC_SERIES_GD32F3X0)
#include <gd32f3x0_cmp.h>
Expand Down
4 changes: 3 additions & 1 deletion common_include/gd32_crc.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

#if defined(CONFIG_SOC_SERIES_GD32E10X)
#if defined(CONFIG_SOC_SERIES_GD32A50X)
#include <gd32a50x_crc.h>
#elif defined(CONFIG_SOC_SERIES_GD32E10X)
#include <gd32e10x_crc.h>
#elif defined(CONFIG_SOC_SERIES_GD32E50X)
#include <gd32e50x_crc.h>
Expand Down
4 changes: 3 additions & 1 deletion common_include/gd32_dac.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

#if defined(CONFIG_SOC_SERIES_GD32E10X)
#if defined(CONFIG_SOC_SERIES_GD32A50X)
#include <gd32a50x_dac.h>
#elif defined(CONFIG_SOC_SERIES_GD32E10X)
#include <gd32e10x_dac.h>
#elif defined(CONFIG_SOC_SERIES_GD32E50X)
#include <gd32e50x_dac.h>
Expand Down
4 changes: 3 additions & 1 deletion common_include/gd32_dbg.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

#if defined(CONFIG_SOC_SERIES_GD32E10X)
#if defined(CONFIG_SOC_SERIES_GD32A50X)
#include <gd32a50x_dbg.h>
#elif defined(CONFIG_SOC_SERIES_GD32E10X)
#include <gd32e10x_dbg.h>
#elif defined(CONFIG_SOC_SERIES_GD32E50X)
#include <gd32e50x_dbg.h>
Expand Down
4 changes: 3 additions & 1 deletion common_include/gd32_dma.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

#if defined(CONFIG_SOC_SERIES_GD32E10X)
#if defined(CONFIG_SOC_SERIES_GD32A50X)
#include <gd32a50x_dma.h>
#elif defined(CONFIG_SOC_SERIES_GD32E10X)
#include <gd32e10x_dma.h>
#elif defined(CONFIG_SOC_SERIES_GD32E50X)
#include <gd32e50x_dma.h>
Expand Down
4 changes: 3 additions & 1 deletion common_include/gd32_exti.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

#if defined(CONFIG_SOC_SERIES_GD32E10X)
#if defined(CONFIG_SOC_SERIES_GD32A50X)
#include <gd32a50x_exti.h>
#elif defined(CONFIG_SOC_SERIES_GD32E10X)
#include <gd32e10x_exti.h>
#elif defined(CONFIG_SOC_SERIES_GD32E50X)
#include <gd32e50x_exti.h>
Expand Down
4 changes: 3 additions & 1 deletion common_include/gd32_fmc.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

#if defined(CONFIG_SOC_SERIES_GD32E10X)
#if defined(CONFIG_SOC_SERIES_GD32A50X)
#include <gd32a50x_fmc.h>
#elif defined(CONFIG_SOC_SERIES_GD32E10X)
#include <gd32e10x_fmc.h>
#elif defined(CONFIG_SOC_SERIES_GD32E50X)
#include <gd32e50x_fmc.h>
Expand Down
4 changes: 3 additions & 1 deletion common_include/gd32_fwdgt.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

#if defined(CONFIG_SOC_SERIES_GD32E10X)
#if defined(CONFIG_SOC_SERIES_GD32A50X)
#include <gd32a50x_fwdgt.h>
#elif defined(CONFIG_SOC_SERIES_GD32E10X)
#include <gd32e10x_fwdgt.h>
#elif defined(CONFIG_SOC_SERIES_GD32E50X)
#include <gd32e50x_fwdgt.h>
Expand Down
4 changes: 3 additions & 1 deletion common_include/gd32_gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

#if defined(CONFIG_SOC_SERIES_GD32E10X)
#if defined(CONFIG_SOC_SERIES_GD32A50X)
#include <gd32a50x_gpio.h>
#elif defined(CONFIG_SOC_SERIES_GD32E10X)
#include <gd32e10x_gpio.h>
#elif defined(CONFIG_SOC_SERIES_GD32E50X)
#include <gd32e50x_gpio.h>
Expand Down
4 changes: 3 additions & 1 deletion common_include/gd32_i2c.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

#if defined(CONFIG_SOC_SERIES_GD32E10X)
#if defined(CONFIG_SOC_SERIES_GD32A50X)
#include <gd32a50x_i2c.h>
#elif defined(CONFIG_SOC_SERIES_GD32E10X)
#include <gd32e10x_i2c.h>
#elif defined(CONFIG_SOC_SERIES_GD32E50X)
#include <gd32e50x_i2c.h>
Expand Down
9 changes: 9 additions & 0 deletions common_include/gd32_mfcom.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*
* NOTE: Autogenerated file using gd32headers.py
*
* SPDX-License-Identifier: Apache-2.0
*/

#if defined(CONFIG_SOC_SERIES_GD32A50X)
#include <gd32a50x_mfcom.h>
#endif
4 changes: 3 additions & 1 deletion common_include/gd32_misc.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

#if defined(CONFIG_SOC_SERIES_GD32E10X)
#if defined(CONFIG_SOC_SERIES_GD32A50X)
#include <gd32a50x_misc.h>
#elif defined(CONFIG_SOC_SERIES_GD32E10X)
#include <gd32e10x_misc.h>
#elif defined(CONFIG_SOC_SERIES_GD32E50X)
#include <gd32e50x_misc.h>
Expand Down
4 changes: 3 additions & 1 deletion common_include/gd32_pmu.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

#if defined(CONFIG_SOC_SERIES_GD32E10X)
#if defined(CONFIG_SOC_SERIES_GD32A50X)
#include <gd32a50x_pmu.h>
#elif defined(CONFIG_SOC_SERIES_GD32E10X)
#include <gd32e10x_pmu.h>
#elif defined(CONFIG_SOC_SERIES_GD32E50X)
#include <gd32e50x_pmu.h>
Expand Down
4 changes: 3 additions & 1 deletion common_include/gd32_rcu.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

#if defined(CONFIG_SOC_SERIES_GD32E10X)
#if defined(CONFIG_SOC_SERIES_GD32A50X)
#include <gd32a50x_rcu.h>
#elif defined(CONFIG_SOC_SERIES_GD32E10X)
#include <gd32e10x_rcu.h>
#elif defined(CONFIG_SOC_SERIES_GD32E50X)
#include <gd32e50x_rcu.h>
Expand Down
4 changes: 3 additions & 1 deletion common_include/gd32_rtc.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

#if defined(CONFIG_SOC_SERIES_GD32E10X)
#if defined(CONFIG_SOC_SERIES_GD32A50X)
#include <gd32a50x_rtc.h>
#elif defined(CONFIG_SOC_SERIES_GD32E10X)
#include <gd32e10x_rtc.h>
#elif defined(CONFIG_SOC_SERIES_GD32E50X)
#include <gd32e50x_rtc.h>
Expand Down
4 changes: 3 additions & 1 deletion common_include/gd32_spi.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

#if defined(CONFIG_SOC_SERIES_GD32E10X)
#if defined(CONFIG_SOC_SERIES_GD32A50X)
#include <gd32a50x_spi.h>
#elif defined(CONFIG_SOC_SERIES_GD32E10X)
#include <gd32e10x_spi.h>
#elif defined(CONFIG_SOC_SERIES_GD32E50X)
#include <gd32e50x_spi.h>
Expand Down
4 changes: 3 additions & 1 deletion common_include/gd32_syscfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

#if defined(CONFIG_SOC_SERIES_GD32F3X0)
#if defined(CONFIG_SOC_SERIES_GD32A50X)
#include <gd32a50x_syscfg.h>
#elif defined(CONFIG_SOC_SERIES_GD32F3X0)
#include <gd32f3x0_syscfg.h>
#elif defined(CONFIG_SOC_SERIES_GD32F4XX)
#include <gd32f4xx_syscfg.h>
Expand Down
4 changes: 3 additions & 1 deletion common_include/gd32_timer.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

#if defined(CONFIG_SOC_SERIES_GD32E10X)
#if defined(CONFIG_SOC_SERIES_GD32A50X)
#include <gd32a50x_timer.h>
#elif defined(CONFIG_SOC_SERIES_GD32E10X)
#include <gd32e10x_timer.h>
#elif defined(CONFIG_SOC_SERIES_GD32E50X)
#include <gd32e50x_timer.h>
Expand Down
9 changes: 9 additions & 0 deletions common_include/gd32_trigsel.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*
* NOTE: Autogenerated file using gd32headers.py
*
* SPDX-License-Identifier: Apache-2.0
*/

#if defined(CONFIG_SOC_SERIES_GD32A50X)
#include <gd32a50x_trigsel.h>
#endif
4 changes: 3 additions & 1 deletion common_include/gd32_usart.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

#if defined(CONFIG_SOC_SERIES_GD32E10X)
#if defined(CONFIG_SOC_SERIES_GD32A50X)
#include <gd32a50x_usart.h>
#elif defined(CONFIG_SOC_SERIES_GD32E10X)
#include <gd32e10x_usart.h>
#elif defined(CONFIG_SOC_SERIES_GD32E50X)
#include <gd32e50x_usart.h>
Expand Down
4 changes: 3 additions & 1 deletion common_include/gd32_wwdgt.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

#if defined(CONFIG_SOC_SERIES_GD32E10X)
#if defined(CONFIG_SOC_SERIES_GD32A50X)
#include <gd32a50x_wwdgt.h>
#elif defined(CONFIG_SOC_SERIES_GD32E10X)
#include <gd32e10x_wwdgt.h>
#elif defined(CONFIG_SOC_SERIES_GD32E50X)
#include <gd32e50x_wwdgt.h>
Expand Down
Loading