Skip to content

Add support for GD32F307VG #8725

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

Merged
merged 45 commits into from
Dec 12, 2018
Merged

Add support for GD32F307VG #8725

merged 45 commits into from
Dec 12, 2018

Conversation

ChazJin
Copy link
Contributor

@ChazJin ChazJin commented Nov 13, 2018

Description

This pull request adds support for GD32F307VG MCU and GD EMAC driver. All the tests were verified on GD32-F307VG board ("detect_code": ["1701"]).

#8713 is the old version and I have closed it. In contrast to the older version, we added the licence of the files, modified some file names, and added the GD EMAC driver files.

Pull request type

[ ] Fix
[ ] Refactor
[x] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

@0xc0170 0xc0170 changed the title Re add support for GD32F307VG Add support for GD32F307VG Nov 13, 2018
@0xc0170 0xc0170 requested review from ashok-rao and a team November 13, 2018 10:07
@ChazJin
Copy link
Contributor Author

ChazJin commented Nov 14, 2018

The test results are as follows(WIN10, run "mbed test -t GCC_ARM/ARM/IAR -m GD32_F307VG" directly):
GD32_F307VG_ARM.txt
GD32_F307VG_GCC.txt
GD32_F307VG_IAR.txt

@adbridge
Copy link
Contributor

@ChazJin Could you please rebase this ?

Add GD32F307VG MCU information to target.json
@ChazJin
Copy link
Contributor Author

ChazJin commented Nov 15, 2018

@ChazJin Could you please rebase this ?

Hello @adbridge, I have rebased it and keep my own repository(https://github.com/ChazJin/mbed-os) consistent with the remote repository(https://github.com/ARMmbed/mbed-os). Would you please let me know is it the right way of doing it?

My previous tests were based on 5.10.1, and I will upload the test results based on the latest 5.10.3 library later.

@adbridge
Copy link
Contributor

@ChazJin we seem to be getting a number of failures:

Bad Assembler file name found: ./targets/TARGET_GigaDevice/TARGET_GD32F30X/TATGET_GD32F307VG/device/TOOLCHAIN_GCC_ARM/startup_gd32f30x_cl.s
Bad Assembler file name found: ./targets/TARGET_GigaDevice/TARGET_GD32F30X/TATGET_GD32F307VG/device/TOOLCHAIN_ARM_MICRO/startup_gd32f30x_cl.s
Bad Assembler file name found: ./targets/TARGET_GigaDevice/TARGET_GD32F30X/TATGET_GD32F307VG/device/TOOLCHAIN_ARM_STD/startup_gd32f30x_cl.s
Bad Assembler file name found: ./targets/TARGET_GigaDevice/TARGET_GD32F30X/TATGET_GD32F307VG/device/TOOLCHAIN_IAR/startup_gd32f30x_cl.s
           AssertionError: Target GD32_F307VG contains invalid device_name GD32F307VG
E           assert 'GD32F307VG' in {'A31G111': {'algorithm': {'A31G11x/Flashloader/A31G11x_series_CFG.FLM': {'default': '1', 'ramsize': None, 'ramstart':...': 'A31G12x/Core/include/A31G12x_series.h'}, 'core': 'Cortex-M0', 'debug': 'A31G12x/SVD/A31G12x_series.svd', ...}, ...}
E            +  where 'GD32F307VG' = Target(name=u'GD32_F307VG', json_data={u'GD32_Target': OrderedDict([(u'inherit...rget', 2)], resolution_order_names=[u'GD32_F307VG', u'GD32_Target', u'Target']).device_name
E            +  and   {'A31G111': {'algorithm': {'A31G11x/Flashloader/A31G11x_series_CFG.FLM': {'default': '1', 'ramsize': None, 'ramstart':...': 'A31G12x/Core/include/A31G12x_series.h'}, 'core': 'Cortex-M0', 'debug': 'A31G12x/SVD/A31G12x_series.svd', ...}, ...} = <tools.arm_pack_manager.Cache instance at 0x7f88c9a3f6c8>.index

@ashok-rao can you help?

@ashok-rao
Copy link
Contributor

Where is this "GD32_F307VG" (with the underscore) coming from? from the logs above, I see: "where 'GD32F307VG' = Target(name=u'GD32_F307VG',"

Also, there seems to be a typo TARGET_GD32F30X/TA T GET_GD32F307VG .. not entirely sure if fixing these would help?

@ChazJin
Copy link
Contributor Author

ChazJin commented Nov 15, 2018

@ChazJin we seem to be getting a number of failures:

Bad Assembler file name found: ./targets/TARGET_GigaDevice/TARGET_GD32F30X/TATGET_GD32F307VG/device/TOOLCHAIN_GCC_ARM/startup_gd32f30x_cl.s
Bad Assembler file name found: ./targets/TARGET_GigaDevice/TARGET_GD32F30X/TATGET_GD32F307VG/device/TOOLCHAIN_ARM_MICRO/startup_gd32f30x_cl.s
Bad Assembler file name found: ./targets/TARGET_GigaDevice/TARGET_GD32F30X/TATGET_GD32F307VG/device/TOOLCHAIN_ARM_STD/startup_gd32f30x_cl.s
Bad Assembler file name found: ./targets/TARGET_GigaDevice/TARGET_GD32F30X/TATGET_GD32F307VG/device/TOOLCHAIN_IAR/startup_gd32f30x_cl.s
           AssertionError: Target GD32_F307VG contains invalid device_name GD32F307VG
E           assert 'GD32F307VG' in {'A31G111': {'algorithm': {'A31G11x/Flashloader/A31G11x_series_CFG.FLM': {'default': '1', 'ramsize': None, 'ramstart':...': 'A31G12x/Core/include/A31G12x_series.h'}, 'core': 'Cortex-M0', 'debug': 'A31G12x/SVD/A31G12x_series.svd', ...}, ...}
E            +  where 'GD32F307VG' = Target(name=u'GD32_F307VG', json_data={u'GD32_Target': OrderedDict([(u'inherit...rget', 2)], resolution_order_names=[u'GD32_F307VG', u'GD32_Target', u'Target']).device_name
E            +  and   {'A31G111': {'algorithm': {'A31G11x/Flashloader/A31G11x_series_CFG.FLM': {'default': '1', 'ramsize': None, 'ramstart':...': 'A31G12x/Core/include/A31G12x_series.h'}, 'core': 'Cortex-M0', 'debug': 'A31G12x/SVD/A31G12x_series.svd', ...}, ...} = <tools.arm_pack_manager.Cache instance at 0x7f88c9a3f6c8>.index

@ashok-rao can you help?

@adbridge Is this related to our current MCU being temporarily not in CMSIS PACK? And our engineers have modified the keil5 pack of GigaDevice MCU, which will be uploaded to the server and will take effect soon. FLM and SVD files of GigaDevice MCU will definitely be found next week at the latest.

@theotherjimmy
Copy link
Contributor

@ChazJin The first error is that your assembly files end with .s. We require (for maximum compatibility) that they end with .S (it's a capitol instead of a small).

The second error is that your MCU is not in CMSIS Pack yet. You can remove device_name from your target in targets.json to get this in faster, and later submit a PR that adds back that value with the data from the released CMSIS Pack.

@0xc0170
Copy link
Contributor

0xc0170 commented Dec 6, 2018

CI restarted

@mbed-ci
Copy link

mbed-ci commented Dec 6, 2018

Test run: FAILED

Summary: 3 of 7 test jobs failed
Build number : 11
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_build-GCC_ARM
  • jenkins-ci/mbed-os-ci_build-ARM
  • jenkins-ci/mbed-os-ci_build-IAR

@ChazJin
Copy link
Contributor Author

ChazJin commented Dec 6, 2018

Test run: FAILED

Summary: 3 of 7 test jobs failed
Build number : 11
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_build-GCC_ARM
  • jenkins-ci/mbed-os-ci_build-ARM
  • jenkins-ci/mbed-os-ci_build-IAR

I'm sorry to say that we can't open these links above and the Details of jenkins-ci/build-ARM/GCC_ARM/IAR, so we can't see the specific errors. Could you please help us? @0xc0170 Thank a lot!

@cmonr
Copy link
Contributor

cmonr commented Dec 6, 2018

@ChazJin Do you have access to this page? http://mbed-os-ci.s3-website-eu-west-1.amazonaws.com/?prefix=jenkins-ci/artifacts/8725/11/

It requires javascript (not sure why...), if that helps.

Delete GD32F450ZI and GD323103VB which are not implemented yet and add them later.
@ChazJin
Copy link
Contributor Author

ChazJin commented Dec 7, 2018

@cmonr Thank you for your advise and I have found the reason for the errors. The "GD32F450ZI" and "GD32E103VB" are the projects we're working on, but they're not finished yet. After I removed the information about these two targets from target.json, I think the result will be OK. The links are as follows.
http://mbed-os-ci.s3-website-eu-west-1.amazonaws.com/?prefix=jenkins-ci/artifacts/8725/11/build-ARM/PASS/GD32_F307VG/
http://mbed-os-ci.s3-website-eu-west-1.amazonaws.com/?prefix=jenkins-ci/artifacts/8725/11/build-ARM/FAIL/GD32_E103VB/
http://mbed-os-ci.s3-website-eu-west-1.amazonaws.com/?prefix=jenkins-ci/artifacts/8725/11/build-ARM/FAIL/GD32_F450ZI/

@0xc0170 Please help us to run CI test again, and I really appreciate it.

@ChazJin ChazJin closed this Dec 7, 2018
@ChazJin ChazJin reopened this Dec 7, 2018
@cmonr
Copy link
Contributor

cmonr commented Dec 11, 2018

Prioritizing RC3 PRs. Will start when able.

@cmonr
Copy link
Contributor

cmonr commented Dec 12, 2018

CI started

@mbed-ci
Copy link

mbed-ci commented Dec 12, 2018

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 12
Build artifacts

@cmonr
Copy link
Contributor

cmonr commented Dec 28, 2018

@ChazJin We're working on releasing 5.11.1, and are testing the RC now: #9208

However, this PR gave us quite a bit of trouble. When working on future PRs, please make sure that commits from patch resolutions are not in the commit history. Lines like this 5a15f81#diff-e9bd16efde5b7f92c0dcd845c5cf3619L352 caused us to manually apply this PR to the release.

@ChazJin
Copy link
Contributor Author

ChazJin commented Dec 28, 2018

We are VERY SORRY to have caused you so much trouble. This is our first PR and we will surely pay attention to it in the future PRs. Once again we would like to apologize for it. @cmonr

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.

8 participants