You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mynewt.apache.org by Jitesh Shah <ji...@liveathos.com> on 2017/02/22 06:40:49 UTC

Bypass the HAL

Hey guys,
Is it possible to bypass the mynewt HAL for SPI/UART/other-peripherals and
directly call the APIs from nrf52sdk/stm32f4 directories? Is there a safe
way to compile the HAL out? and lastly, what features am I losing if I
don't use the HAL? (nffs? newtmgr?)

I am working with mynewt_1_0_0_b2_tag.

Thanks,
Jitesh

-- 
This email including attachments contains Mad Apparel, Inc. DBA Athos 
privileged, confidential, and proprietary information solely for the use 
for the addressed recipients. If you are not the intended recipient, please 
be aware that any review, disclosure, copying, distribution, or use of the 
contents of this message is strictly prohibited. If you have received this 
in error, please delete it immediately and notify the sender. All rights 
reserved by Mad Apparel, Inc. 2012. The information contained herein is the 
exclusive property of Mad Apparel, Inc. and should not be used, 
distributed, reproduced, or disclosed in whole or in part without prior 
written permission of Mad Apparel, Inc.

Re: Bypass the HAL

Posted by Jitesh Shah <ji...@liveathos.com>.
Great!

Thanks Marko, that all the info I needed.

On Wed, Feb 22, 2017 at 9:15 AM, marko kiiskila <ma...@runtime.io> wrote:

> Hi Jitesh,
>
> yes, you can use the SDKs directly. It is hard to completely to get rid of
> HAL
> completely, as it’s pretty much always considered for linking. If I’m not
> mistaken, hal watchdog is always enabled by OS. I suspect you’ll need
> to do code mods to turn that off.
>
> Also, you can also use HAL for some peripherals, and use SDK for others.
>
> Any package which accesses flash uses HAL for it. Any package which
> accesses UART ends up going for HAL. I’m guessing that about 80% of
> the packages want to use HAL, or on another package which wants to use
> HAL.
>
> > On Feb 21, 2017, at 10:40 PM, Jitesh Shah <ji...@liveathos.com> wrote:
> >
> > Hey guys,
> > Is it possible to bypass the mynewt HAL for SPI/UART/other-peripherals
> and
> > directly call the APIs from nrf52sdk/stm32f4 directories? Is there a safe
> > way to compile the HAL out? and lastly, what features am I losing if I
> > don't use the HAL? (nffs? newtmgr?)
> >
> > I am working with mynewt_1_0_0_b2_tag.
> >
> > Thanks,
> > Jitesh
> >
> > --
> > This email including attachments contains Mad Apparel, Inc. DBA Athos
> > privileged, confidential, and proprietary information solely for the use
> > for the addressed recipients. If you are not the intended recipient,
> please
> > be aware that any review, disclosure, copying, distribution, or use of
> the
> > contents of this message is strictly prohibited. If you have received
> this
> > in error, please delete it immediately and notify the sender. All rights
> > reserved by Mad Apparel, Inc. 2012. The information contained herein is
> the
> > exclusive property of Mad Apparel, Inc. and should not be used,
> > distributed, reproduced, or disclosed in whole or in part without prior
> > written permission of Mad Apparel, Inc.
>
>

-- 
This email including attachments contains Mad Apparel, Inc. DBA Athos 
privileged, confidential, and proprietary information solely for the use 
for the addressed recipients. If you are not the intended recipient, please 
be aware that any review, disclosure, copying, distribution, or use of the 
contents of this message is strictly prohibited. If you have received this 
in error, please delete it immediately and notify the sender. All rights 
reserved by Mad Apparel, Inc. 2012. The information contained herein is the 
exclusive property of Mad Apparel, Inc. and should not be used, 
distributed, reproduced, or disclosed in whole or in part without prior 
written permission of Mad Apparel, Inc.

Re: Bypass the HAL

Posted by marko kiiskila <ma...@runtime.io>.
Hi Jitesh,

yes, you can use the SDKs directly. It is hard to completely to get rid of HAL
completely, as it’s pretty much always considered for linking. If I’m not
mistaken, hal watchdog is always enabled by OS. I suspect you’ll need
to do code mods to turn that off.

Also, you can also use HAL for some peripherals, and use SDK for others.

Any package which accesses flash uses HAL for it. Any package which
accesses UART ends up going for HAL. I’m guessing that about 80% of
the packages want to use HAL, or on another package which wants to use
HAL.

> On Feb 21, 2017, at 10:40 PM, Jitesh Shah <ji...@liveathos.com> wrote:
> 
> Hey guys,
> Is it possible to bypass the mynewt HAL for SPI/UART/other-peripherals and
> directly call the APIs from nrf52sdk/stm32f4 directories? Is there a safe
> way to compile the HAL out? and lastly, what features am I losing if I
> don't use the HAL? (nffs? newtmgr?)
> 
> I am working with mynewt_1_0_0_b2_tag.
> 
> Thanks,
> Jitesh
> 
> -- 
> This email including attachments contains Mad Apparel, Inc. DBA Athos 
> privileged, confidential, and proprietary information solely for the use 
> for the addressed recipients. If you are not the intended recipient, please 
> be aware that any review, disclosure, copying, distribution, or use of the 
> contents of this message is strictly prohibited. If you have received this 
> in error, please delete it immediately and notify the sender. All rights 
> reserved by Mad Apparel, Inc. 2012. The information contained herein is the 
> exclusive property of Mad Apparel, Inc. and should not be used, 
> distributed, reproduced, or disclosed in whole or in part without prior 
> written permission of Mad Apparel, Inc.


Re: Bypass the HAL

Posted by Jitesh Shah <ji...@liveathos.com>.
..snip..

On Wed, Feb 22, 2017 at 9:09 AM, Christopher Collins <ch...@runtime.io>
wrote:
>
>
> Could you clarify why you want to bypass the HAL?  Are you trying to
> reduce code size, or does the HAL simply not provide functionality that
> you need?
>
>
Compiling out is optional I guess. I have a non-trivial amount of code that
uses nRF/STM calls to access peripherals already. If the HAL plays nicely
with nRF/STM peripheral access, they could coexist.

The question is then whether I can continue using the nRF/STM APIs safely.

Jitesh

-- 
This email including attachments contains Mad Apparel, Inc. DBA Athos 
privileged, confidential, and proprietary information solely for the use 
for the addressed recipients. If you are not the intended recipient, please 
be aware that any review, disclosure, copying, distribution, or use of the 
contents of this message is strictly prohibited. If you have received this 
in error, please delete it immediately and notify the sender. All rights 
reserved by Mad Apparel, Inc. 2012. The information contained herein is the 
exclusive property of Mad Apparel, Inc. and should not be used, 
distributed, reproduced, or disclosed in whole or in part without prior 
written permission of Mad Apparel, Inc.

Re: Bypass the HAL

Posted by Christopher Collins <ch...@runtime.io>.
Hi Jitesh,

On Tue, Feb 21, 2017 at 10:40:49PM -0800, Jitesh Shah wrote:
> Hey guys,
> Is it possible to bypass the mynewt HAL for SPI/UART/other-peripherals and
> directly call the APIs from nrf52sdk/stm32f4 directories? Is there a safe
> way to compile the HAL out? and lastly, what features am I losing if I
> don't use the HAL? (nffs? newtmgr?)
> 
> I am working with mynewt_1_0_0_b2_tag.

The HAL is a fundamental part of Mynewt.  It is used by most of the
system, including the kernel itself, so compiling it out would
definitely be an uphill battle.

Could you clarify why you want to bypass the HAL?  Are you trying to
reduce code size, or does the HAL simply not provide functionality that
you need?

Thanks,
Chris