littlekernel / lk

LK embedded kernel
MIT License
3.17k stars 621 forks source link

[platform][tms570-launchpad] Do not try to save d16-d31 on ARMv7-R #268

Closed vsrinivas closed 3 years ago

vsrinivas commented 4 years ago

All shipping ARMv7-R processors include VFPv3-D16, a subset of VFPv3 with only 16 double-precision registers. The first -R profile CPU with a complete VFP or NEON implementation is the Cortex-R52, implementing ARMv8-R.

LK's context switch code had a dynamic check and would only save d16-d31 if present, but gcc/gas will not assemble code that includes references to d16-d31 when mcpu=cortex-r4f or other v7-R CPUs.

Ideally we'd key the #if off of __TARGET_FPU_VFPV3_D16, but that only appears to be defined by the ARM compilers, not gcc. Use V7-R as the key instead.

vsrinivas commented 4 years ago

Part 1 of fixing the TMS570 build; the second part is to remove the GIC rules and add VIM support. Working on that now.

travisg commented 4 years ago

Feel free to add this target to the travis-ci build as well so it gets tested. It's the only armv7-r in the matrix.