From: Alexandre IOOSS <erdnaxe@crans.org>
To: Lucas Villa Real <lucas@osdyne.com>, qemu-arm@nongnu.org
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH] STM32F100: support different density lines
Date: Mon, 26 Jun 2023 08:23:58 +0200 [thread overview]
Message-ID: <6fa294a1-1f1f-7f30-add0-bb49f7d04a65@crans.org> (raw)
In-Reply-To: <20230619221819.6882-1-lucas@osdyne.com>
[-- Attachment #1.1: Type: text/plain, Size: 3041 bytes --]
On 6/20/23 00:18, Lucas Villa Real wrote:
> This patch adds support for the emulation of different density lines
> (low, medium, and high). A new class property stm32f100-soc.density=
> has been introduced to allow users to state the desired configuration.
> That property is recognized by a new machine, stm32f1-generic. The SOC
> is configured according to the following:
>
> density=low 32 KB FLASH, 2 SPIs
> density=medium 128 KB FLASH, 2 SPIs
> density=high 512 KB FLASH, 3 SPIs
>
> With this code change we should be able to introduce richer features
> to STM32F100, such as support for FSMC (so that a machine with more
> RAM capacity can be properly emulated). FSMC is supported on high
> density line devices only.
Thanks a lot for the patches!
STM32 families look very similar to each other, it makes great sense to
take a generic approach rather than bloating QEMU with many machines.
You patch proposes to create a "stm32f1-generic" machine. I believe we
should rather name this machine "stm32f100-generic":
- STM32F101 has a XL-density line, STM32F100 does not have a
XL-density line.
- STM32F100 high density line does not have the same maximum SRAM
size, timers, USART numbers, clock frequencies and CEC peripherals as
the STM32F101 high density line.
Regarding the stm32vldiscovery machine, I am not against deprecating it
if we warn users to use stm32f100-generic with density=medium. This
makes sense as the development board does not add anything more than
just some buttons and LED.
Maybe "stm32vldiscovery" could become an alias for stm32f100-generic
machine ?
@Alistair: Do you have an opinion on aliasing the old machine? Is this
something common in QEMU?
In the long run, we should maybe rename "stm32f100-soc.c" to
"stm32f1-soc.c" and add another class property to choose the sub-family.
This would highly reduce potential code duplication.
STM32F1 machines could take this structure:
- stm32f100-generic machine
- stm32f1-soc.family=f100 stm32f1-soc.density=low
- stm32f1-soc.family=f100 stm32f1-soc.density=medium
(alias stm32vldiscovery)
- stm32f1-soc.family=f100 stm32f1-soc.density=high
- stm32f101-generic machine
- stm32f1-soc.family=f101 stm32f1-soc.density=low
- stm32f1-soc.family=f101 stm32f1-soc.density=medium
- stm32f1-soc.family=f101 stm32f1-soc.density=high
- stm32f1-soc.family=f101 stm32f1-soc.density=xl
- stm32f102-generic machine
- stm32f1-soc.family=f102 stm32f1-soc.density=low
- stm32f1-soc.family=f102 stm32f1-soc.density=medium
- stm32f103-generic machine
- stm32f1-soc.family=f103 stm32f1-soc.density=low
- stm32f1-soc.family=f103 stm32f1-soc.density=medium
(alias stm32-nucleo-f103rb)
- stm32f1-soc.family=f103 stm32f1-soc.density=high
- stm32f1-soc.family=f103 stm32f1-soc.density=xl
@Alistair: Would such modification make also sense regarding stm32f2 and
stm32f4 families?
Thanks,
--
Alexandre
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]
next prev parent reply other threads:[~2023-06-26 6:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-19 22:18 [PATCH] STM32F100: support different density lines Lucas Villa Real
2023-06-20 19:43 ` [PATCH] STM32F100: add support for external memory via FSMC Lucas Villa Real
2023-06-23 1:37 ` Alistair Francis
2023-06-25 3:37 ` Lucas C. Villa Real
2023-06-20 19:43 ` Lucas Villa Real
2023-06-23 1:29 ` [PATCH] STM32F100: support different density lines Alistair Francis
2023-06-25 3:42 ` Lucas C. Villa Real
2023-07-03 4:02 ` Alistair Francis
2023-06-26 6:23 ` Alexandre IOOSS [this message]
2023-07-03 4:06 ` Alistair Francis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6fa294a1-1f1f-7f30-add0-bb49f7d04a65@crans.org \
--to=erdnaxe@crans.org \
--cc=lucas@osdyne.com \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).