Add genericSTM32F103Cx board type with 128k flash

RogerClark
Sun Jul 30, 2017 10:09 am
See https://github.com/rogerclarkmelbourne/ … 2/pull/317

I’m not entirely sure why we need a board variant which is basically the F103CB just called F103Cx because the MCU’s labelled as C8 seem to be CB’s

Note. This PR also included an unrelated change to fix a typo in the F103CB RAM size. I’ve fixed this individually in a separate commit, as IMHO it should not have been part of this change, and was a definite bug


testato
Sun Jul 30, 2017 11:17 am
The change is not only the name but the cpuflag
If you use the CB you will use the cpu_flag of the CB cpu

What is there under behind the different cpu_flag ?


victor_pv
Sun Jul 30, 2017 12:41 pm
I dont think that CPU flag does much of a difference, given that the C8 and CB are exactly the same except for the flash (same peripherals, same RAM, same addresses for everything). There are other MCUs that differe in the number of Timers, SPI ports, having I2S mode, but that’s not the case between C8 and CB, they are idential other than flash size and MCU ID bits.

On top, I think is generally accepted that the C8 MCUs with 128KB are actually renames CB MCUs (CB silicon to all effects).

Given all that, I think it would be confusing to add another board to be basically the same as the CB board. People will wonder if selecting that option does something different than selecting the CB option (it does not).

Perhaps is a better option to rename the CB board option to add meaning that it can be used in C8 MCUs with 128KB of flash.

I tested in the past that several RC MCUs I got have the flash and RAM of RE mcus, so STM did the same with more MCUs than just the 128KB ones. I do not think it would be of any benefit to add a new variant just for that, since I can use the RE variant to use all that flash and RAM.

My 2 cents.


Pito
Sun Jul 30, 2017 12:50 pm
Does the ST-Link upload method support a loading of >64kB code into such devices (devices with more flash as advertised)?

victor_pv
Sun Jul 30, 2017 1:27 pm
[Pito – Sun Jul 30, 2017 12:50 pm] –
Does the ST-Link upload method support a loading of >64kB code into such devices (devices with more flash as advertised)?

Yes, in the ones that actually have that amount of flash, you can access it with STlink without any error. Stlink will show the 64KB size though, because the MCU ID is the correct one for a C8, but if you try to access flash beyond 64KB, for reading/writing, it works fine.
Most C8 have 128KB, but there is a few forum posts from people that got one with 64KB of flash. I do not know if there is any way to tell from the MCU markings, like week, year…


testato
Sun Jul 30, 2017 2:28 pm
the serial bootloader in it’s welcome message clearly tell if you have 128KiB of flash or not
Device ID : 0x0410 (Medium-density)
- RAM : 20 KiB (512b reserved by bootloader)
- Flash : 128 KiB (sector size: 4x1024)
- Option RAM : 16 b
- System RAM : 2 KiB

victor_pv
Sun Jul 30, 2017 2:41 pm
[testato – Sun Jul 30, 2017 2:28 pm] –
the serial bootloader in it’s welcome message clearly tell if you have 128KiB of flash or not
Device ID : 0x0410 (Medium-density)
- RAM : 20 KiB (512b reserved by bootloader)
- Flash : 128 KiB (sector size: 4x1024)
- Option RAM : 16 b
- System RAM : 2 KiB

Rick Kimball
Sun Jul 30, 2017 3:55 pm
[testato – Sun Jul 30, 2017 2:28 pm] –
the serial bootloader in it’s welcome message clearly tell if you have 128KiB of flash or not
Device ID : 0x0410 (Medium-density)
- RAM : 20 KiB (512b reserved by bootloader)
- Flash : 128 KiB (sector size: 4x1024)
- Option RAM : 16 b
- System RAM : 2 KiB

RogerClark
Sun Jul 30, 2017 9:33 pm
I’m not sure the STLink upload setting will allow you to upload 128k to a 64k device, as we use ST’s own Exe.

I did try using Texane STLink on Windows, like we have to on Mac and Linux , but Texane seems to have problems with some STLink hardware, so for greater compibility I went back to STs own tools.


mrburnette
Mon Jul 31, 2017 2:38 am
Respectfully to all:

I think too much f’n time is being wasted on menu this ‘n that. If something is wrong and confusing, then it should be corrected at some point-in-time; but just stick an addendum on github in the WiKi until Roger gets around to it. But IMO, 128 vs 64 is just splitting hairs and we stick that info in the WiKi and go on about our lives.

Ray


victor_pv
Mon Jul 31, 2017 1:25 pm
[RogerClark – Sun Jul 30, 2017 9:33 pm] –
I’m not sure the STLink upload setting will allow you to upload 128k to a 64k device, as we use ST’s own Exe.

I did try using Texane STLink on Windows, like we have to on Mac and Linux , but Texane seems to have problems with some STLink hardware, so for greater compibility I went back to STs own tools.

The stlink GUI will allow you to upload to a device with 128KB even if it reports as 64KB. It will try to write to any address you tell it too. If there is not flash there, it will error out, if there is flash, it will write to it, no matter what the CPU ID is and what the reported size is.
I’m not sure about command line, but I would expect a similar behavior.
If I can remember later, I’ll just test it out with a board.


Leave a Reply

Your email address will not be published. Required fields are marked *