Re: Disabling Multithreading
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.
From: Cufi, Carles [mailto:Carles.Cufi@...]
Sent: Thursday, January 3, 2019 4:46 PM
To: Gundi, Rajavardhan <rajavardhan.gundi@...>
Subject: RE: [Zephyr-devel] Disabling Multithreading
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:
This might not be trivial for SPI though, depending on how the driver is written.
Guess this mail got buried while you were away. Please help me out here.
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.