On 16 August 2018 at 15:19, Steffen Görtz <m...@steffen-goertz.de> wrote: > >>> + >>> + arm_m_profile_load_kernel(ARM_CPU(first_cpu), machine->kernel_filename, >>> + NRF51_SOC(soc)->flash_size); >>> +} >>> + >>> +static void microbit_machine_init(MachineClass *mc) >>> +{ >>> + mc->desc = "BBC micro:bit"; >>> + mc->init = microbit_init; >>> + mc->max_cpus = 1; >>> +} >>> +DEFINE_MACHINE("microbit", microbit_machine_init); >> >> Your subclass of TYPE_MACHINE has extra state, so it can't >> use DEFINE_MACHINE (which creates a subclass whose instance_size >> is the same as the parent TYPE_MACHINE). You need to do this >> longhand: >> > > Hi Peter, > > this is covered in <20180811090836.4024-1-cont...@steffen-goertz.de>
So it is. This patch is wrong though, so the fix needs to be made by folding the relevant changes into this patch, not as a separate commit later. PS: you don't really need a header file for the machine's struct, because nothing except the machine's .c file will ever need to include it. thanks -- PMM