Any zephyr experience using arm math/dsp library w/cortex m4f processors


cpmcparland@...
 

Have recently joined project community and am looking for any info on linking to
existing arm math/dsp library for an embedded arm m4 project.  If this is the wrong
group to address this question to, please advise.

Am using recent (1.1.2) zephyr release and can build and execute c programs on
target hardware with GCC on debian stretch.  Would like to use the arm-published math/dsp library
and have hit a few snags....any suggestions would be appreciated.  I believe this works
on IAR, but am committed to GCC at the moment.  First, one of the required includes.
arm_math.h, includes <math.h>. Although that file, and other required files, are in
/usr/include, the zephyr build cannot find them.  Is there a way to add additional include
directories to the build - in particular those specified w/angled brackets <>?

I did a brute force hack to sidestep that issue, but then encountered problems during the
link phase.  Followed the samples example to include external libraries but linker complained
that the existing arm gcc library and zephyr libraries did not share the same call formats (CMSIS?).  Do I
need to specify that the OS use CMSIS or is that the default?

Appreciate any pointers.

Regards,
Chuck McP (rtisys)


Abderrezak Mekkaoui
 

Hi Chuck,

Please see below. I hope that helps. I am also using gcc.
Abderrezak

Hi All,

Just in case this is helpful. To build and correctly run my app, I needed to add the following configuration variables to my prj.conf:

CONFIG_FLOAT=y
CONFIG_NEWLIB_LIBC=y

Nothing else is needed because everything is defined with the board (nrf52840_pca10056).

Adding CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y would enable float fprinting for debugging.
Thanks for your help.
Abderrezak


On 8/2/2018 4:58 PM, cpmcparland@... wrote:

Have recently joined project community and am looking for any info on linking to
existing arm math/dsp library for an embedded arm m4 project.  If this is the wrong
group to address this question to, please advise.

Am using recent (1.1.2) zephyr release and can build and execute c programs on
target hardware with GCC on debian stretch.  Would like to use the arm-published math/dsp library
and have hit a few snags....any suggestions would be appreciated.  I believe this works
on IAR, but am committed to GCC at the moment.  First, one of the required includes.
arm_math.h, includes <math.h>. Although that file, and other required files, are in
/usr/include, the zephyr build cannot find them.  Is there a way to add additional include
directories to the build - in particular those specified w/angled brackets <>?

I did a brute force hack to sidestep that issue, but then encountered problems during the
link phase.  Followed the samples example to include external libraries but linker complained
that the existing arm gcc library and zephyr libraries did not share the same call formats (CMSIS?).  Do I
need to specify that the OS use CMSIS or is that the default?

Appreciate any pointers.

Regards,
Chuck McP (rtisys)