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:
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.
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.