On 21 August 2018 at 11:03, Steffen Görtz <m...@steffen-goertz.de> wrote: > Hi Peter, > > object_property_set_bool(soc, true, "realized", &error_abort);>> >>> - armv7m_load_kernel(ARM_CPU(first_cpu), machine->kernel_filename, >>> - NRF51_SOC(soc)->flash_size); >>> + armv7m_load_kernel(ARM_CPU(first_cpu), machine->kernel_filename, 0x00); >> >> Hmm. Using 0x00 here doesn't seem ideal. > > i agree. The actual sizes for RAM/ROM are calculated in the SOC at the moment. > I do not really know what impact max_sz has here. I could set the it to the > maximum code size defined in the memory map of the NRF51 series. Another way > would be > to lift the calculation of the ROM size from the SOC to the Board. What would > you propose?
I think we need to specify a value somehow, otherwise we won't be able to load raw images (which I think are the only ones where we enforce the limit value). You could just use the largest possible size, I suppose. >>> +#define PAGE_SIZE 1024 >> >> Page size isn't really an obvious concept for M profile. > > Flash pages are referred to here, not MMU pages. This constant is moved and > renamed to NRF51_PAGE_SIZE in the upcoming revision. Would you suggest > another name or can with stick with this? I guess NRF51_FLASH_PAGE_SIZE would be a little clearer ? thanks -- PMM