-
Notifications
You must be signed in to change notification settings - Fork 1k
Confused by bluepill flash sizes #1003
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
Comments
It means a board with a C8 but with a flash size of 128k. Some of the BP with C8 can have more than 64k.
No as the chip says C8.
I don't know, I never saw a BP with CB label. That's why we kept C8 as name. Quickly googling "STM32F103CB boards" and there is no "Blue Pill" referenced while googling "C8" you found it.
Same here, I didn't see any copy-paste error. This is only duplicate entry with maximum_size diff. |
@matthijskooijman |
I think I understand the point now, but I still wonder if we could relabel the options somehow to make it easier for new users to understand.
But we're building as if it is an F103CB:
If anyone would actually make a blue pill with an F103CB on it, this board definition would be exactly right already. Hence my suggestion to label this as F103CB and include some indication that it can be used on some F103C8's with extra flash as well.
I believe these lines are incorrect:
This should be x8, which is the chip compiled for. E.g. compare with the same blue pill one which does have x8: GenF1.menu.pnum.BLUEPILL_F103C8.build.product_line=STM32F103x8 Then:
I believe this should be BLACKPILL_F103C8B (which is the board you selected), or maybe BLACKPILL_F103CB, which is what the related bluepill board does:
|
About relabel, why not, this would be probably more clear.
No this is correct, there is no STM32F103x8 Arduino_Core_STM32/cores/arduino/stm32/stm32_def_build.h Lines 53 to 56 in 0f24f28
About board name then as I said there is no board with the CB. And this definition is used in the variant to select the right LED_BUILTIN:
Anyway If I well understand you would like somethings like this: diff --git a/CI/build/conf/cores_config.json b/CI/build/conf/cores_config.json
index cf2e8158..94cf677d 100644
--- a/CI/build/conf/cores_config.json
+++ b/CI/build/conf/cores_config.json
@@ -56,10 +56,10 @@
"ARMED_V1",
"BLUE_F407VE_Mini",
"BLACKPILL_F103C8",
- "BLACKPILL_F103C8B",
+ "BLACKPILL_F103CB",
"BLUEPILL_F103C6",
"BLUEPILL_F103C8",
- "BLUEPILL_F103C8B",
+ "BLUEPILL_F103CB",
"BLACKPILL_F303CC",
"BLACKPILL_F401CC",
"CoreBoard_F401RC",
@@ -155,10 +155,10 @@
"AFROFLIGHT_F103CB_12M",
"ARMED_V1",
"BLACKPILL_F103C8",
- "BLACKPILL_F103C8B",
+ "BLACKPILL_F103CB",
"BLUEPILL_F103C6",
"BLUEPILL_F103C8",
- "BLUEPILL_F103C8B",
+ "BLUEPILL_F103CB",
"BLACKPILL_F303CC",
"BLACKPILL_F401CC",
"BLUE_F407VE_Mini",
diff --git a/boards.txt b/boards.txt
index f649354f..8d5acc95 100644
--- a/boards.txt
+++ b/boards.txt
@@ -825,12 +825,12 @@ GenF1.menu.pnum.BLUEPILL_F103C8.build.board=BLUEPILL_F103C8
GenF1.menu.pnum.BLUEPILL_F103C8.build.product_line=STM32F103xB
GenF1.menu.pnum.BLUEPILL_F103C8.build.variant=PILL_F103XX
-GenF1.menu.pnum.BLUEPILL_F103C8B=BluePill F103C8 (128k)
-GenF1.menu.pnum.BLUEPILL_F103C8B.upload.maximum_size=131072
-GenF1.menu.pnum.BLUEPILL_F103C8B.upload.maximum_data_size=20480
-GenF1.menu.pnum.BLUEPILL_F103C8B.build.board=BLUEPILL_F103C8
-GenF1.menu.pnum.BLUEPILL_F103C8B.build.product_line=STM32F103xB
-GenF1.menu.pnum.BLUEPILL_F103C8B.build.variant=PILL_F103XX
+GenF1.menu.pnum.BLUEPILL_F103CB=BluePill F103CB (or C8 with 128k)
+GenF1.menu.pnum.BLUEPILL_F103CB.upload.maximum_size=131072
+GenF1.menu.pnum.BLUEPILL_F103CB.upload.maximum_data_size=20480
+GenF1.menu.pnum.BLUEPILL_F103CB.build.board=BLUEPILL_F103CB
+GenF1.menu.pnum.BLUEPILL_F103CB.build.product_line=STM32F103xB
+GenF1.menu.pnum.BLUEPILL_F103CB.build.variant=PILL_F103XX
# BLACKPILL_F103C8 board
GenF1.menu.pnum.BLACKPILL_F103C8=BlackPill F103C8
@@ -840,12 +840,12 @@ GenF1.menu.pnum.BLACKPILL_F103C8.build.board=BLACKPILL_F103C8
GenF1.menu.pnum.BLACKPILL_F103C8.build.product_line=STM32F103xB
GenF1.menu.pnum.BLACKPILL_F103C8.build.variant=PILL_F103XX
-GenF1.menu.pnum.BLACKPILL_F103C8B=BlackPill F103C8 (128k)
-GenF1.menu.pnum.BLACKPILL_F103C8B.upload.maximum_size=131072
-GenF1.menu.pnum.BLACKPILL_F103C8B.upload.maximum_data_size=20480
-GenF1.menu.pnum.BLACKPILL_F103C8B.build.board=BLACKPILL_F103C8
-GenF1.menu.pnum.BLACKPILL_F103C8B.build.product_line=STM32F103xB
-GenF1.menu.pnum.BLACKPILL_F103C8B.build.variant=PILL_F103XX
+GenF1.menu.pnum.BLACKPILL_F103CB=BlackPill F103CB (or C8 with 128k)
+GenF1.menu.pnum.BLACKPILL_F103CB.upload.maximum_size=131072
+GenF1.menu.pnum.BLACKPILL_F103CB.upload.maximum_data_size=20480
+GenF1.menu.pnum.BLACKPILL_F103CB.build.board=BLACKPILL_F103CB
+GenF1.menu.pnum.BLACKPILL_F103CB.build.product_line=STM32F103xB
+GenF1.menu.pnum.BLACKPILL_F103CB.build.variant=PILL_F103XX
# Generic STM32F103Rx boards (Blue button)
GenF1.menu.pnum.Generic_F103R8T6=Generic F103R8T6 (Blue Button)
diff --git a/variants/PILL_F103XX/variant.h b/variants/PILL_F103XX/variant.h
index 2b452f73..30db79bd 100644
--- a/variants/PILL_F103XX/variant.h
+++ b/variants/PILL_F103XX/variant.h
@@ -85,7 +85,7 @@ extern "C" {
#define NUM_ANALOG_FIRST 20
// On-board LED pin number
-#ifdef ARDUINO_BLUEPILL_F103C8
+#if defined(ARDUINO_BLUEPILL_F103C8) || defined(ARDUINO_BLUEPILL_F103CB)
#define LED_BUILTIN PC13
#else
#define LED_BUILTIN PB12
|
Oh, that's unexpected. Ok, so no typo there. Also, it seems that the line I quoted in my first post ( Your proposed diff looks pretty much exactly what I meant, yes :-) I am still wondering if the LED definition is (currently) correct, though. The comments say PC13 for Blue Pill and PB12 for black pill, but:
|
Yes. FYI, the C6 was introduced for this reason: #420 (comment) |
This will avoid any confusion. Fix stm32duino#1003 Signed-off-by: Frederic Pillon <[email protected]>
This will avoid any confusion. Fix stm32duino#1003 Signed-off-by: Frederic Pillon <[email protected]>
This will avoid any confusion. Fix stm32duino#1003 Signed-off-by: Frederic Pillon <[email protected]>
This will avoid any confusion. Fix #1003 Signed-off-by: Frederic Pillon <[email protected]>
I was looking at various blue pill variants and was a bit confused. Boards.txt says this:
I have a bluepill with a chip that says F103C8, but in the boards list there is "BluePill F103C8" and "BluePill F103C8 (128k)". I know that the 8 in the model number indicates the flash size, so what does the "(128k)" mean? Should that be F103CB instead? That is what the board and product_line properties indicate.
Later I found some references online that some C8 chips are actually just relabeled CB chips and actually have 128k of flash (they are probably all made 128k and then divided into good and bad ones). So I guess the 128k is intended to refer to C8's with 128k flash (though they are really just CB's, I guess?)
Would it be more clear to use explicitly label this option as CB (and maybe indicate the C8 option too), e.g.:
The same thing holds for the Black Pill (though note that there seems to be some copy-paste error in the board and product_line values with are inconsistent, they should probably both be C8 for the 64k version and CB for the 128k version?
The text was updated successfully, but these errors were encountered: