Re: Minimal Zephyr build

Erwan Gouriou

On 30 March 2017 at 17:25, Maureen Helm <maureen.helm@...> wrote:

> -----Original Message-----
> From: [mailto:zephyr-devel-
> bounces@...g] On Behalf Of David Brown
> Sent: Wednesday, March 29, 2017 4:17 PM
> To:
> Subject: [Zephyr-devel] Minimal Zephyr build
> At the past mini summit (Austin), a few of us had discussions about making
> builds using Zephyr that are more minimal.  My specific use case is about the
> boot loader, which has very few requirements:
>   - It needs a flash driver.
>   - It may need a UART.
>   - It may need access to crypto hardware (not currently).
> Currently, there is quite a bit of code brought in by this that isn't really needed
> (for example, there is only a single thread).  (A mynewt build of mcuboot ends
> up about 10K smaller than a Zephyr build).

If you're using a Freedom board, there is a rather large MCUX clock driver that gets pulled in when you use UART, I2C, or SPI. I'd like to fix this, but haven't gotten to it yet. It's at least 1K, possibly more.

Same on stm32: UART driver uses HAL for driver initialization.
I made an update of stm32cube today and Low Level API is now supported on stm32f4/f3/l4 based boards.
We can save around 1K moving from HAL to LL. 
I'll try to do it soon

> Vincenzo Frascino did a little work to conditionalize some of this, but I was
> wondering what people think might be the best approach.
> The approach taken by Mynewt (where mcuboot comes from), is to separate
> the kernel from the HAL.  They are able to build mcuboot with just the HAL.
> Are there other uses for a more minimal version of Zephyr.  I realize we got rid
> of the nano kernel, but perhaps being able to work without the scheduler, or
> timers, etc might be more generally useful.
> Thanks,
> David
> _______________________________________________
> Zephyr-devel mailing list
> devel&
> 1808d476e8fee2%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0&sdata=6ZefBdg
> uKrIyuN%2BSXMGZwF4ntH9nvBLk4%2BM%2F408Azro%3D&reserved=0
Zephyr-devel mailing list

Join to automatically receive all group messages.