> On 30 May 2015, at 12:39, Peter Crosthwaite <peter.crosthwa...@xilinx.com> > wrote: > > On Fri, May 29, 2015 at 2:49 PM, Liviu Ionescu <i...@livius.net> wrote: >> however the question remains: in this nicely layered model, what command >> line options would be more appropriate to overwrite the MCU hard-wired >> ram/flash sizes? >> > > Make it a property of the SoC container and then just use -global?
I followed your advice and I ended up with the following: - I added a new type "cortexm-mcu" that I use as parent for all Cortex-M MCU objects (like "STM32F103RB") - I added the following properties to this type: cortexm-mcu.flash-sizeK=uint32 cortexm-mcu.ram-sizeK=uint32 cortexm-mcu.cpu-model=str cortexm-mcu.kernel-filename=str I can set the memory sizes with --global: --global cortexm-mcu.flash-sizeK=123 --global cortexm-mcu.ram-sizeK=45 and the result looks like: GNU ARM Eclipse 64-bits QEMU v2.3.50 (qemu-system-gnuarmeclipse). Board: 'STM32-H103' (Olimex Header Board for STM32F103RBT6 (Experimental)). Device: 'STM32F103RB' (Cortex-M3, MPU), Flash: 123 KB, RAM: 45 KB. without the --global definitions, the result looks like: Device: 'STM32F103RB' (Cortex-M3, MPU), Flash: 128 KB, RAM: 20 KB. so the configuration is effective and the result is as expected. the only minor disadvantage is that the command line gets a bit too long, but, given the flexibility to add any properties, this shouldn't be a problem. q: does this fit into the general qemu configuration mechanism? regards, Liviu