[riot-notifications] [RIOT-OS/RIOT] drivers/rail: efr32 radio driver (#9212)

Kai Beckmann notifications at github.com
Mon Jan 7 14:10:52 CET 2019


Hmm, now I get a problem with the FPU-support. 

If I try to compile it the linker complains:
```
/usr/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld: error: /home/kai/git/RIOT/examples/gnrc_networking/bin/slwstk6000b/gnrc_networking.elf uses VFP register arguments, /home/kai/git/RIOT/examples/gnrc_networking/bin/slwstk6000b/gecko_sdk_librail.a(pa_conversions_efr32.o) does not
...
```
I found #2660, but using ARM's official toolchain didn't help.

The library provided by Silabs (gecko_sdk_librail.a) is compiled with different FPU settings than the current riot for cortex-m.
If I make a ```arm-none-eabi-readelf -A``` to the lib I get:
```
  Tag_CPU_name: "Cortex-M4"
  Tag_CPU_arch: v7E-M
  Tag_CPU_arch_profile: Microcontroller
  Tag_THUMB_ISA_use: Thumb-2
  Tag_FP_arch: FPv5/FP-D16 for ARMv8
  Tag_ABI_PCS_wchar_t: 4
  Tag_ABI_FP_denormal: Needed
  Tag_ABI_FP_exceptions: Needed
  Tag_ABI_FP_number_model: IEEE 754
  Tag_ABI_align_needed: 8-byte
  Tag_ABI_align_preserved: 8-byte, except leaf SP
  Tag_ABI_enum_size: small
  Tag_ABI_HardFP_use: SP only
  Tag_ABI_optimization_goals: Aggressive Size
  Tag_CPU_unaligned_access: v6
```

When I compile the hello_world example for the EFR32 I get:
```
  Tag_CPU_name: "Cortex-M4"
  Tag_CPU_arch: v7E-M
  Tag_CPU_arch_profile: Microcontroller
  Tag_THUMB_ISA_use: Thumb-2
  Tag_FP_arch: VFPv4-D16
  Tag_ABI_PCS_wchar_t: 4
  Tag_ABI_FP_denormal: Needed
  Tag_ABI_FP_exceptions: Needed
  Tag_ABI_FP_number_model: IEEE 754
  Tag_ABI_align_needed: 8-byte
  Tag_ABI_enum_size: small
  Tag_ABI_HardFP_use: SP only
  Tag_ABI_VFP_args: VFP registers
  Tag_ABI_optimization_goals: Aggressive Size
  Tag_CPU_unaligned_access: v6
```

The problem seams to be the Tag_ABI_VFP_args: VFP registers

If I compile it with ```CFLAGS_FPU="-mfloat-abi=softfp -mfpu=fpv4-sp-d16" ```  it is working.

So I guess as long as Silabs does not provide the lib with ``-mfloat-abi=hard`` compiled, I have to change the compile settings, if the rail driver is selected. The question is where?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/9212#issuecomment-451929795
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190107/0cd843ca/attachment-0001.html>


More information about the notifications mailing list