After modifying the EVK-MIMXRT1050 SDK manifest file to get the emwin_gui_demo project to become available
(see post EVK-MIMXRT1050 SDK middleware projects not available for details) I'm getting lots of compile errors when I try to build in MCUXpresso.
Memory region Used Size Region Size %age Used
SRAM_DTC: 436480 B 128 KB 333.01%
SRAM_ITC: 0 GB 128 KB 0.00%
SDRAM: 0 GB 32 MB 0.00%
c:/integrity/mcuxpressoide_10.1.0_589/ide/tools/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv5-sp/hard\libcr_c.a(alloc.o): In function `malloc':
alloc.c:(.text.malloc+0x0): multiple definition of `malloc'
c:/integrity/mcuxpressoide_10.1.0_589/ide/tools/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv5-sp/hard\libc.a(lib_a-malloc.o):malloc.c:(.text.malloc+0x0): first defined here
c:/integrity/mcuxpressoide_10.1.0_589/ide/tools/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv5-sp/hard\libcr_c.a(alloc.o): In function `free':
SRAM_OC: 0 GB 256 KB 0.00%
alloc.c:(.text.free+0x0): multiple definition of `free'
c:/integrity/mcuxpressoide_10.1.0_589/ide/tools/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv5-sp/hard\libc.a(lib_a-malloc.o):malloc.c:(.text.free+0x0): first defined here
c:/integrity/mcuxpressoide_10.1.0_589/ide/tools/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/bin/ld.exe: evkmimxrt1050_emwin_examples_emwin_gui_demo_emwin_gui_demo.axf section `.text' will not fit in region `SRAM_DTC'
c:/integrity/mcuxpressoide_10.1.0_589/ide/tools/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/bin/ld.exe: region `SRAM_DTC' overflowed by 305408 bytes
collect2.exe: error: ld returned 1 exit status
make: *** [evkmimxrt1050_emwin_examples_emwin_gui_demo_emwin_gui_demo.axf] Error 1
After some digging I found the multiple definitions of malloc/free can be fixed by a project setting of
C/C++ Build - Settings - MCU Linker - General
Tick the box next to: "No startup of default libs (-nostdlib)"
- this is the same setting as in many of the other demo projects in the SDK.
Unfortunately the memory overflows remained... I ended up moving the emwin libraries into another project (using the external flash and SDRAM) but would be good to get this project fixed in the SDK so have a stable base to test emwin with.
Memory region Used Size Region Size %age Used
SRAM_DTC: 431168 B 128 KB 328.96%
SRAM_ITC: 0 GB 128 KB 0.00%
SDRAM: 0 GB 32 MB 0.00%SRAM_OC: 0 GB 256 KB 0.00%
Any way to fix the project in the SDK?
The IMX RT code needs to run from an external flash. By default, whenever a new or some of the sample projects are loaded, they are configured to run from the ram (the reason for your SRAM_DTC overflow). To convert them you will need to do some changes to the mcu config settings. This is given in the "SDK Examples: Convertng a RAM project to XIP from Flash" section in the pdf given in the thread below....
https://community.nxp.com/community/mcuxpresso/mcuxpresso-ide/blog/2017/12/07/overview-of-using-the-mimxrt1050-evk-with-mcuxpresso-ide