Official GD32 demo boards

Boards based on the GigaDevices GD32F103 microcontroller
User avatar
RogerClark
Posts: 6671
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Official GD32 demo boards

Post by RogerClark » Thu Mar 09, 2017 11:31 pm

Reading the bottom of the blog post, they seem to say they are not confident of the GD32 being 100% compatible with the STM32.
So I suspect they decided not to use them.

They say the price is 20% less than the equivalent STM32 but IMHO, its not enough of a difference for most companies to take the risk, unless they have very good testing procedures and can guarantee that their product would work 100% the same with a GD32 instead of STM32.

I was considering using a GD32 on a nRF52832 development board, to run the Black Magic probe as the interface / programmer for the nRF52832, but I think its too much of a risk for the difference in cost. As STM32F103C8's are around $1.50 on AliExpress, in 100 off quantities. So that would give a saving of 30 cents if GD32's were 20% cheaper

Adding to that, that most STM32F103C8 (64k) devices have 128k, but the equivalent GD32 definitely only has 64k. It doesnt make sense to use the GD32 for small runs of "development" boards, as you can probably take for granted that the STM32F103C8 will be 128k and users (hobbiests) can make use of the extra flash if they want

victor_pv
Posts: 1599
Joined: Mon Apr 27, 2015 12:12 pm

Re: Official GD32 demo boards

Post by victor_pv » Fri Mar 10, 2017 4:06 pm

RogerClark wrote:
...they have a clever architecture where they mirror the flash into RAM a boot, so the GD32 actually has Program RAM in which it runs the code.
How did you find that out? and given that, is it possible to modify that memory at runtime?

User avatar
Pito
Posts: 1497
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: Official GD32 demo boards

Post by Pito » Fri Mar 10, 2017 5:47 pm

@victor - this has been discussed here.. The GD chips include 2 chips:

1. a flash-less stm32 clone with two RAMs - 20kB + 64kB (C8)
2. an 8pin serial 64kB flash

Upon the boot it loads from the serial flash into the 64kB RAM.
Then it executes out of RAM. Therefore it is faster. Zero ws.
There are pictures of the chips available.
PS:
https://zeptobars.com/en/read/GD32F103C ... ga-Devices
Pukao Hats Cleaning Services Ltd.

victor_pv
Posts: 1599
Joined: Mon Apr 27, 2015 12:12 pm

Re: Official GD32 demo boards

Post by victor_pv » Fri Mar 10, 2017 7:35 pm

Pito wrote:@victor - this has been discussed here.. The GD chips include 2 chips:

1. a flash-less stm32 clone with two RAMs - 20kB + 64kB (C8)
2. an 8pin serial 64kB flash

Upon the boot it loads from the serial flash into the 64kB RAM.
Then it executes out of RAM. Therefore it is faster. Zero ws.
There are pictures of the chips available.
PS:
https://zeptobars.com/en/read/GD32F103C ... ga-Devices
Thanks for the link.
So I guess the smaller one, that has 64KB of flash, may have an extra 64KB of RAM not being used. Has anyone tried to access it?

User avatar
Pito
Posts: 1497
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: Official GD32 demo boards

Post by Pito » Fri Mar 10, 2017 7:39 pm

I discussed with jaromir off-line - how to access the program RAM..
Talented hackers wanted :)
Imagine you can access the program RAM on the fly..
Pukao Hats Cleaning Services Ltd.

victor_pv
Posts: 1599
Joined: Mon Apr 27, 2015 12:12 pm

Re: Official GD32 demo boards

Post by victor_pv » Fri Mar 10, 2017 8:09 pm

Pito wrote:I discussed with jaromir off-line - how to access the program RAM..
Talented hackers wanted :)
Imagine you can access the program RAM on the fly..
Would be nice to have 84KB of RAM. I found another thread where you mentioned it, did you ever try like Andy suggested reading from every address to see if you find an extra memory segment where it's copied?

User avatar
Pito
Posts: 1497
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: Official GD32 demo boards

Post by Pito » Fri Mar 10, 2017 9:32 pm

I do not possess that GD technology.. Jaromir likes that chips, he even made a small board with it.
My idea was to find/enable/read the hidden ROM space, as there must be a hidden ROM with a chunk of code (or a hw sequencer??) which organizes the reading/writing from/to the external serial flash. Most probably it is done via a standard SPIx. Maybe via a DMA channel.
So the attacking a none listed SPIx may give us some results.. The company producing the GD is specialized for production of those SPI flash memories, thus it most probably uses a standard SPI flash they produce.
I've seen somewhere a guy complained the GD chip "stops" to work for quite a long time when most probably reads/writes SPI flash.
Last edited by Pito on Fri Mar 10, 2017 9:47 pm, edited 1 time in total.
Pukao Hats Cleaning Services Ltd.

User avatar
RogerClark
Posts: 6671
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Official GD32 demo boards

Post by RogerClark » Fri Mar 10, 2017 9:46 pm

If someone wants to write some test code, I can run it in my hardware.


Just to share my bad experience buying from TaoBao..

I accidentally ended up with 19 x gd32f103c8 boards, because of a mix up in buying from TaoBao though an online agent.
They ended up costing a fortune ( probably $10 each because half the order go put in a really heavy cardboard box and sent by some expensive postage system, and they just billed the whole lot to by credit card)
and I only received 19 of them, when I should have received 20 . I only wanted $10, and they should have been $1.50 each, but there were masses of hidden charges.



I gave a few away ( I gave / sent 2 to Rick Kimball about a year ago),
some broke as the usb connector is weak, and I broke one while trying to transplant the gd32 mcu onto a maple mini etc etc

So I probably have about 5 working boards left.

Victor, you could ask Rick if he will send you one of his. As you are both in the USA, so postage should be minimal.

User avatar
Pito
Posts: 1497
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: Official GD32 demo boards

Post by Pito » Fri Mar 10, 2017 9:53 pm

The simplest attack could be to read a "spi flash" via a "standard spi flash protocol" at SPIx.
Why reading it you may start to see some data. And then to dig deeper around that SPIx.
The read address of the program RAM is known - it is the range of flash in standard STM32.
Q: Could we write to "flash" out of the executed code? Then the writing to the program RAM must be done such it writes to the external flash in parallel..
Or something like that :?
Pukao Hats Cleaning Services Ltd.

User avatar
RogerClark
Posts: 6671
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Official GD32 demo boards

Post by RogerClark » Fri Mar 10, 2017 10:14 pm

Pito wrote:The simplest attack could be to read a "spi flash" via a "standard spi flash protocol" at SPIx.
Why reading it you may start to see some data. And then to dig deeper around that SPIx.
The read address of the program RAM is known - it is the range of flash in standard STM32.
Q: Could we write to "flash" out of the executed code? Then the writing to the program RAM must be done such it writes to the external flash in parallel..
Or something like that :?

I presume you mean that there must be a additional / internal SPI device e.g. SPI3 which is connected to the flash. I don't think it can be SPI1 or SPI2 in case someone used the GPIO pins for these at boot time e.g. to attach a button, as that would prevent the chip reading its program into flash.

Re: RAM address

Do you mean it is above the normal 20k block of the F103C8 ?

But that it is read only ?

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest