Skip to content
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

Error: This board doesn't support arduino framework! GD32F103 #50

Open
Domonap opened this issue Oct 13, 2021 · 16 comments
Open

Error: This board doesn't support arduino framework! GD32F103 #50

Domonap opened this issue Oct 13, 2021 · 16 comments
Assignees
Labels
board Issue regarding a specific board enhancement New feature or request

Comments

@Domonap
Copy link

Domonap commented Oct 13, 2021

I was wondering if there is going to be support for GD32F103.
For now, I use the Android version from this repo: platform-ststm32, and is working but is not optimal.
Would be great to use ArduinoCore-GD32 for the GD32F103

@maxgerhardt
Copy link
Member

maxgerhardt commented Oct 13, 2021

We are indeed planning on supporting all GD32 ARM chips soon. Work is currently underway to complete the gd32_genpinmap script which will allow the auto-generation of all Arduino variant folders (with pindefinitions etc.). Right now we have support for single GD32F30x, GD32F1x0 and GD32F3x0 chips, but not GD32F10x yet.

@Domonap
Copy link
Author

Domonap commented Oct 13, 2021

You are doing a great job. Life is got so much easier when moving to PlatformIO with GD32.

@maxgerhardt maxgerhardt self-assigned this Oct 15, 2021
@maxgerhardt maxgerhardt added board Issue regarding a specific board enhancement New feature or request labels Oct 15, 2021
@macbef
Copy link

macbef commented Jul 14, 2022

Any news about the integration of the GD32F103 and arduino lately?
If there is anything I could do to help please let me know.

@maxgerhardt
Copy link
Member

maxgerhardt commented Jul 14, 2022

The main task is that we have an automatic pinmap generator I've linked above -- we don't want to manually write and maintain 106 pin maps for the GD32F10x series, that would be insane. Expanding the pinmap generator requires adding the necessary PDF parser functions from the datasheet and adapting to its architectural differences. The chip series currently supported use alternate functions ("AF'ers"), but the GD32F10x use special bits that activate a remapping of pins for a certain peripherals ("Remappers"). I wanted to do support this since forever but I haven't found the time yet, I'll try and prioritize it higher.

@macbef
Copy link

macbef commented Jul 14, 2022

That would be great! Thanks for all the time you are dedicating to this project.

@jackliuwenli
Copy link

Hi,I also hope to support as soon as possible F10x,expecting...

@Mantos31
Copy link

Hi, great work!
sorry to disturb but at the moment it is impossible to program in Arduino on GD32F103RB? i recently bought an olimexino-GD32. i thought i would be able to transfer my program that i made on an oli-stm32 but i cannot find anything ><

@maxgerhardt
Copy link
Member

i thought i would be able to transfer my program that i made on an oli-stm32 but i cannot find anything ><

Did you try flashing the binary program produced fro the Olimexino-STM32 directly on the Olimex-GD32? They are binary compatible I think. How did you program the board previously, over USB / Maple bootloader or directly via the SWD interface?

@Mantos31
Copy link

thank you for your quick answer. i used directly the USB and Maple Rev3 for the olimex-stm32.

I use the libmaple. But from what I understand the GD32a card has been abandoned.

git link: https://github.com/megadrifter/Arduino_STM32

@maxgerhardt
Copy link
Member

Okay, so if the Maple USB bootloader is on the GD32 board correctly does it accept being flashed via the Arduino IDE with libmaple? (Treating it as if it were a STM32 board). Can it upload but the resulting program won't run?

@Mantos31
Copy link

Mantos31 commented Nov 25, 2022

I have this error :
''
maple_loader v0.1
Resetting to bootloader via DTR pulse
Reset via USB Serial Failed! Did you select the right serial port?
Assuming the board is in perpetual bootloader mode and continuing to attempt dfu programming...
Searching for DFU device [1EAF:0003]...

dfu-util - (C) 2007-2008 by OpenMoko Inc.
Couldn't find the DFU device: [1EAF:0003]
This program is Free Software and has ABSOLUTELY NO WARRANTY
''

I wanted to do a test on this card with an example of your GD32 library with a st-link and since I have the impression that it does not detect the card via the usb B port..

@maxgerhardt
Copy link
Member

maxgerhardt commented Nov 25, 2022

Hm, after you flash the bootloader on the board, does it show up a Maple DFU bootloader in the device manager with the 1EAF:0003 USB VID:PID?

Did you burn the bootloader on the board yourself? Which file from https://github.com/rogerclarkmelbourne/STM32duino-bootloader/tree/master/bootloader_only_binaries?

Do you have an ST-Link available?

@Mantos31
Copy link

No I don't have a bootloader.
No I did not burn the bootloader myself. And yes I have an ST-link V2

@Candas1
Copy link

Candas1 commented May 16, 2023

Hi, why is stm32 platform not good enough?
Except the speed, STM32f103 and GD32F103 should work the same.

@dmlambo
Copy link

dmlambo commented Aug 27, 2023

The CPU architecture is the same, but the peripherals are different. In theory they're mostly the same. In practice they're different enough to require separate platform code. You can flash an STM32F103 image on a GD32F103, and it'll run, but it's also likely to write into a wrong address and crash, or just not do anything at all. I've done it.

I've been taking a look at the pin map generator script (what a heroic effort!) to make pins for the f10x series, but the datasheet is incomplete. There are no alternative function mapping numbers, since they don't use GPIO PORT AF mappings, instead they have random remap registers you have to dig around to find. There might be a way to map them from the User Manual, but I feel like at that point it'd be easier to map them by hand.

Edit:
Spoke too soon! Actually every GPIO alternative function is shared with every other peripheral. Crazy. Anyway the other problem is the platform doesn't have macros readily available for this type of AF remapping, so that's another hole I have to go down.

All this work because I bought a clone board for $5 cheaper. Lol!

@Candas1
Copy link

Candas1 commented Aug 28, 2023

I came across this document that lists some differences.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
board Issue regarding a specific board enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

7 participants