Compile PE KDS project using ARM Compiler 6

Showing results for 
Search instead for 
Did you mean: 

Compile PE KDS project using ARM Compiler 6

Contributor II

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.




0 Kudos
1 Reply

NXP TechSupport
NXP TechSupport

Dear Arthur,

From the start I think this would not be enough to reduce your program size. Since your using C++ that is not efficient to use in embedded systems for all the overhead that include, processor expert that has a little overhead also and adding to that the RTOS I doubt using the Keil compiler would be enough.

The best approach for this I think it will be start with a project that already has implemented the FreeRTOS like the ones from the SDK (link here), and instead to use the PE you could try using the config tools to set the peripheral configuration.

Best Regards,

Alexis Andalon

0 Kudos