[fake-stm32-blue-pill-board] STM32F103C8T6 Bootloader/Sketch problems

Generic boards that are not Maple or Maple mini clones, and don't contain the additional USB reset hardware
User avatar
BennehBoy
Posts: 886
Joined: Thu Jan 05, 2017 8:21 pm
Location: Yorkshire
Contact:

Re: [fake-stm32-blue-pill-board] STM32F103C8T6 Bootloader/Sketch problems

Post by BennehBoy » Sun Jan 20, 2019 10:55 am

fredbox wrote:
Sun Jan 20, 2019 12:01 am
Once I enable CDC and use Serial.begin compilation fails with an out of ram error (need another 1K). If I compile for a standard blue pill with 64 or 128K, compilation is successful.
AH OK gotcha, yes, the current github base version of CDC has ~ 6K of buffers allocated, there's a PR in that shrinks this down to ~256 bytes, see PR#399 -> https://github.com/stm32duino/Arduino_C ... 2/pull/399

It's awaiting a rebase, which I guess Frederic will get around to this week.
-------------------------------------
https://github.com/BennehBoy

fpiSTM
Posts: 722
Joined: Fri Sep 16, 2016 12:33 pm
Location: Le Mans, France
Contact:

Re: [fake-stm32-blue-pill-board] STM32F103C8T6 Bootloader/Sketch problems

Post by fpiSTM » Sun Jan 20, 2019 3:17 pm

Right. I will try to do it this week but I will not be available a part of this week for personal reason. My father-in-law is dead and I have to take care of my children this week.

User avatar
BennehBoy
Posts: 886
Joined: Thu Jan 05, 2017 8:21 pm
Location: Yorkshire
Contact:

Re: [fake-stm32-blue-pill-board] STM32F103C8T6 Bootloader/Sketch problems

Post by BennehBoy » Sun Jan 20, 2019 4:27 pm

Sorry to hear that Frederic :(
-------------------------------------
https://github.com/BennehBoy

fredbox
Posts: 211
Joined: Tue Jul 07, 2015 4:44 pm

Re: [fake-stm32-blue-pill-board] STM32F103C8T6 Bootloader/Sketch problems

Post by fredbox » Thu Jan 24, 2019 12:20 am

BennehBoy wrote:
Sat Jan 19, 2019 5:47 pm
Which things?
I've had a few days to experiment with the "official" core. on my fake and genuine blue pill boards. I guess the main thing I miss is an easy to use hardware timer. I compiled the blink example using a timer from another thread and it works, but is a bit more complicated to set up. Also timer related, I use systick_attach_interrupt() in Roger's core for blinking leds and scanning inputs such as rotary encoders and switches. I'm sure it will get easier as I read the documentation and get more familiar with the core. It took a while to get comfortable using the Roger/Leaflab core.

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

Re: [fake-stm32-blue-pill-board] STM32F103C8T6 Bootloader/Sketch problems

Post by RogerClark » Thu Jan 24, 2019 2:10 am

Did you manage to read the chip ID to identify which STM32Fxxx it is ?

fredbox
Posts: 211
Joined: Tue Jul 07, 2015 4:44 pm

Re: [fake-stm32-blue-pill-board] STM32F103C8T6 Bootloader/Sketch problems

Post by fredbox » Thu Jan 24, 2019 3:00 am

st-info, ST Demonstrator GUI, and STLink-Utility all identify it as chip id 0x412, 32K flash, 10K ram.
The part number from the STM datasheet for a part with these specifications is STM32F103C6T6. I copied the linker script and added four lines to boards.txt for the fpiSTM core with for a part with these specifications and it appears on the menu as a blue pill with 32K. I can compile and upload simple programs and they execute successfully. Serial works on the UART pins, but USB serial takes too much memory for now.

User avatar
mrburnette
Posts: 3001
Joined: Mon Apr 27, 2015 12:50 pm
Location: Greater Atlanta
Contact:

Re: [fake-stm32-blue-pill-board] STM32F103C8T6 Bootloader/Sketch problems

Post by mrburnette » Thu Jan 24, 2019 3:26 am

fredbox wrote:
Thu Jan 24, 2019 3:00 am
...
Serial works on the UART pins, but USB serial takes too much memory for now.
USB serial is vastly overrated :o

While using a Maple Mini clone with USB serial is "nice" for debugging statements on the ArduinoIDE serial console, it rarely is needed after development where a Blue Pill or this new resource crippled-Bluepill will suffice.

With the increased Internet stories about the under $2 Blue Pill, the demand was sure to create a market for Asian suppliers of fake merchandise. I strongly suggest all who are in receipt of fake marketed Blue Pills to demand a full refund... only then will distributors vet their suppliers to ensure quality parts. But, if the seller refunds your money and allows you to keep the faux board, it still has project value.


Ray

User avatar
BennehBoy
Posts: 886
Joined: Thu Jan 05, 2017 8:21 pm
Location: Yorkshire
Contact:

Re: [fake-stm32-blue-pill-board] STM32F103C8T6 Bootloader/Sketch problems

Post by BennehBoy » Thu Jan 24, 2019 7:18 am

It may be overrated but it's very handy for bootloading. (although with 32kb flash I concede the point on this chip... still 2kb hid BL)
-------------------------------------
https://github.com/BennehBoy

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

Re: [fake-stm32-blue-pill-board] STM32F103C8T6 Bootloader/Sketch problems

Post by RogerClark » Thu Jan 24, 2019 8:45 am

I've also used Serial USB in some of my projects, hence the current screw up when I removed the requirement for devices to set DTR, as a lot of software (in my case it was Stellarium) does not set DTR

User avatar
mrburnette
Posts: 3001
Joined: Mon Apr 27, 2015 12:50 pm
Location: Greater Atlanta
Contact:

Re: [fake-stm32-blue-pill-board] STM32F103C8T6 Bootloader/Sketch problems

Post by mrburnette » Thu Jan 24, 2019 3:32 pm

RogerClark wrote:
Thu Jan 24, 2019 8:45 am
I've also used Serial USB in some of my projects, hence the current screw up when I removed the requirement for devices to set DTR, as a lot of software (in my case it was Stellarium) does not set DTR
BennehBoy wrote:
Thu Jan 24, 2019 7:18 am
It may be overrated but it's very handy for bootloading. (although with 32kb flash I concede the point on this chip... still 2kb hid BL)
A few years back, I purchased a large number of those Chinese CH340'ish adapters. I find this to be a preferable solution and removing USB-serial from the Pill board leaves the uC without the need to deal with CDC serial concerns - just makes a software design a wee bit simpler with interfacing requirements can be moved to dedicated hardware. I just checked AliExpress, the CH340 is only $0.59 quantity one, free shipped.

Ray

Post Reply