AnsweredAssumed Answered

Compile PE KDS project using ARM Compiler 6

Question asked by Arthur Passos on Oct 9, 2019
Latest reply on Oct 21, 2019 by Alexis Andalon

I have a c++17 project currently compiling with G++ 8.x, but I'm running out of flash memory. I've read that the ARM Compiler 6, used on Keil, is very effective on reducing the binary size, so I'm trying to migrate from KDS to Keil.


Following the steps described in this article: Using Keil μVision 5 with Processor Expert | MCU on Eclipse  by Erich Styger, I've successfully (compiled) ported a demo baremetal project using PE from KDS to Keil.


Unfortunately, it defaults to ARM Compiler 5 and ARM Compiler 5 doesn't support c++17 (which my main project relies on). Switching to ARM Compiler 6, I'm running some issues:


  1. ./SDK/platform/CMSIS/Include\core_cmFunc.h(629): error: unknown register name 'vfpcc' in asm. This error goes away if I disable the floating point unit, although I don't think I should have to do so, since in KDS it's using the "hard" floating point flag.
  2. SDK/platform/utilities/src/fsl_misc_utilities.c(57): error: unknown type name 'caddr_t'.
  3. I had to replace all "pragma push" to "pragma clang diagnostic push". Not sure if that's a problem.


As I've said, that's a demo baremetal project. In the main project, I'm using FreeRTOS, which I'll also have to migrate. If you guys could provide any tips in advance, I'd be grateful.


The MCU is MK22FX512AVLL12 and I'm using KSDK 1.3 alongside with Processor Expert.