This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Linking libnrf_cc310_0.9.13.a using IAR compiler

Dear reader

  • We want to use the floating point unit (FPU) in our project
  • We are building using the IAR compiler (8.5.x)
  • We'd like to use the hardware acceleration (CC310)
  • we have a makefile where we configure the build process

So what we did:

- Add the compiler flag (--fpu=VFPv4_sp)

Now my question is, how can I tell the compiler to link the libnrf library, found in the SDK at: nRF5_SDK_17.1.0_ddde560/external/nrf_cc310/lib/cortex-m4/hard-float/libnrf_cc310_0.9.13.a

We've tried using --semihosted, but this does not work.

Or is this not required? I do not fully grasp the topic yet...

here is a snipped of our makefile:

CFLAGS_xC   :=--cpu=cortex-m4 --cpu_mode=thumb --endian=little --aapcs=std --abi=ilp32 --fpu=VFPv4_sp -e
CPP_FLAGS_xC:=--c++ --cpu=cortex-m4 --cpu_mode=thumb --endian=little --aapcs=std --abi=ilp32 --fpu=VFPv4_sp -e
.
.
.
LD_FLAGS_xC :=--no_out_extension \
              --entry __iar_program_start \
			  --semihosting $(ROOT_DIR)/_Libs/nRF5_SDK_17.1.0_ddde560/external/nrf_cc310/lib/cortex-m4/hard-float/libnrf_cc310_0.9.13.a \
			  --fpu=VFPv4_sp \
			  ...

Any help would be much appreciated!

Regards

David

Parents
  • Hi David,

    We do not use Makefiles with IAR so unfortunately I am not able to say precisely how you would organize this. For a "normal" IAR project though, you can take any IAR project for the nRF52840 and just replace the libnrf_cc310_0.9.13.a with the one from nRF5_SDK_17.1.0_ddde560/external/nrf_cc310/lib/cortex-m4/hard-float/libnrf_cc310_0.9.13.a as you have already found (not short-wchar which is used by default in the examples, and which is only suitable for IAR 7).

    If you do not get sensible feedback about how to write the Makefile for IAR this from any community member here I suggest you contact IAR support and ask them.

    Einar

  • Thank you for your answer. In the meantime I've been able to resolve the issue. For some reason I associated the --semihosting with the linking of the library, however this is not the case. And about my wondering how to link the libnrf library, its done by just providing the path to it to the linker flags. So in short, I've just removed the --semihosting linker flag.

Reply
  • Thank you for your answer. In the meantime I've been able to resolve the issue. For some reason I associated the --semihosting with the linking of the library, however this is not the case. And about my wondering how to link the libnrf library, its done by just providing the path to it to the linker flags. So in short, I've just removed the --semihosting linker flag.

Children
No Data
Related