Re: Disabling Multithreading
Raj Gundi
Thanks Carles. This is what I had in my mind too. This is already done for the generic spi flash driver (drivers/flash/spi_nor.c). I’ll hope that’s all that’s required. Thanks again.
Regards, Raj
From: Cufi, Carles [mailto:Carles.Cufi@...]
Hi Raj,
The issue with CONFIG_MULTITHREADING is that it was never properly supported. It was added for MCUboot and considered for removal a couple of times, but that never happened because the size difference is still significant enough for many people. The only option at this point is for you to submit a patch for the drivers you need that disables use of any primitives that require multithreading (semaphores, mutexes, etc) behind a macro, like it’s done here: https://github.com/zephyrproject-rtos/zephyr/blob/master/drivers/flash/soc_flash_nrf.c#L68
This might not be trivial for SPI though, depending on how the driver is written.
Carles
From:
devel@... <devel@...>
On Behalf Of Raj Gundi
Hi Carles,
Guess this mail got buried while you were away. Please help me out here.
Regards, Raj
From:
devel@... [mailto:devel@...]
On Behalf Of Raj Gundi
Hi Carles,
I am trying to build Zephyr to fit in a memory constrained device of 64kB. My device doesn’t require multithreading and hence I disabled multithreading to save on the memory. However, this is throwing me exceptions since I have UART and SPI Flash drivers enabled. It appears the semaphore accesses in those drivers are not “single-thread” aware. Is there anything that can be done to work-around this? Does just “nop”ing it out suffice? Please let me know.
Regards, Raj
|
|