ARM compiler refuses to compile on large C files

Fully featured ARM compilers available on Windows, Linux, and macOS.
Post Reply
Author
Message
The_YongGrand
Posts: 37
Joined: 22 Feb 2011 11:36

ARM compiler refuses to compile on large C files

#1 Post by The_YongGrand » 14 Dec 2019 02:24

I've tested the ARM compiler in the Necto IDE and found out that it still refuses to compile when one of the C files are very large, example 20MB.

I have attached the project here. You can replicate this by building it. You will see this error:

Code: Select all

[1/3] Generating MCU configuration H:/stm32-projects-2019/build-u8g2_stm32_test_necto-mikrocarm-generic-stm32f100rb-1-mhz/STM32F100RB.jcfg.

[2/3] Building binary u8g2_fonts.emcl
FAILED: H:/stm32-projects-2019/build-u8g2_stm32_test_necto-mikrocarm-generic-stm32f100rb-1-mhz/u8g2_stm32_test_necto/u8g2_fonts.emcl
C:/NectoStudio/NectoStudio/compilers/ARM/mikroC/mikroCARM -jcom -DL -NRL -pSTM32F100RB -bH:\stm32-projects-2019\build-u8g2_stm32_test_necto-mikrocarm-generic-stm32f100rb-1-mhz\u8g2_stm32_test_necto\ -fo24 -MF -O11111114 -BIN -SSA -C -SP"C:\Users\yongh\AppData\Local\Mikroe\NectoStudio\libs\mikroC legacy STM\Data\STM\ST M3\__Lib_I2C_12\" -SP"C:\Users\yongh\AppData\Local\Mikroe\NectoStudio\libs\mikroC legacy STM\Data\STM\ST M3\__Lib_System_000\" -SPC:\NectoStudio\NectoStudio\compilers\ARM\mikroC\Defs\ -SPC:\NectoStudio\NectoStudio\compilers\ARM\mikroC\libs\core\st_m3\ -SPC:\NectoStudio\NectoStudio\compilers\ARM\mikroC\libs\core\st_m3\F1\00\ -SPH:\stm32-projects-2019\build-u8g2_stm32_test_necto-mikrocarm-generic-stm32f100rb-1-mhz\MeMakeFiles\def\ -SPH:\stm32-projects-2019\build-u8g2_stm32_test_necto-mikrocarm-generic-stm32f100rb-1-mhz\MeMakeFiles\delay\ -SPH:\stm32-projects-2019\u8g2_stm32_test_necto\u8g2_csrc\ -IP"C:\Users\yongh\AppData\Local\Mikroe\NectoStudio\libs\mikroC legacy STM\Data\STM\ST M3\__Lib_CStdlib\" -IP"C:\Users\yongh\AppData\Local\Mikroe\NectoStudio\libs\mikroC legacy STM\Data\STM\ST M3\__Lib_CString\" -IP"C:\Users\yongh\AppData\Local\Mikroe\NectoStudio\libs\mikroC legacy STM\Data\STM\ST M3\__Lib_CType\" -IP"C:\Users\yongh\AppData\Local\Mikroe\NectoStudio\libs\mikroC legacy STM\Data\STM\ST M3\__Lib_I2C_12\" -IP"C:\Users\yongh\AppData\Local\Mikroe\NectoStudio\libs\mikroC legacy STM\Data\STM\ST M3\__Lib_Sprintf\" -IP"C:\Users\yongh\AppData\Local\Mikroe\NectoStudio\libs\mikroC legacy STM\Data\STM\ST M3\__Lib_Sprinti\" -IP"C:\Users\yongh\AppData\Local\Mikroe\NectoStudio\libs\mikroC legacy STM\Data\STM\ST M3\__Lib_Sprintl\" -IP"C:\Users\yongh\AppData\Local\Mikroe\NectoStudio\libs\mikroC legacy STM\Data\STM\ST M3\__Lib_System_000\" -IPH:\stm32-projects-2019\u8g2_stm32_test_necto\u8g2_csrc\ -out u8g2_fonts.emcl u8g2_fonts.c STM32F100RB.emcl __Lib_GPIO_32F10x.emcl __Lib_GPIO_32F10x_Defs.emcl __Lib_I2C_12.emcl __Lib_Math.emcl __Lib_MathDouble.emcl __Lib_System_100.emcl __lib_delays.emcl
All LIBs loaded in 47 ms?

ninja: build stopped: subcommand failed.
Finished in: 18769.8 ms.
Attachments
u8g2_stm32_test_necto.7z
(5.35 MiB) Downloaded 102 times

User avatar
rajkovic
mikroElektronika team
Posts: 694
Joined: 16 Aug 2004 12:40

Re: ARM compiler refuses to compile on large C files

#2 Post by rajkovic » 14 Dec 2019 13:44

Thanks a lot on feedback. All though we have tested cmd lines with all use cases and scenarios that we have and all examples that we provide. We did not have larger files than 4MB in our test suit base. We will add your file to standard test procedure.
We will try to fix and include for next update. Probably next week.

User avatar
rajkovic
mikroElektronika team
Posts: 694
Joined: 16 Aug 2004 12:40

Re: ARM compiler refuses to compile on large C files

#3 Post by rajkovic » 16 Dec 2019 18:13

We have tested your project. The problem was memory allocation (internal implementation of our code for compilers, not in your code). We have successfully solved and will include fix in next update
of NECTO compiler, PRO compiler will also have this fix included in some of future updates. Thank you, we did not have this kind of memory demanding files, also we have found a lot of place for optimization here.

NOTE:
necto is building this project 4x faster on my PC (21sec. vs. 84sec on PRO compiler)

The_YongGrand
Posts: 37
Joined: 22 Feb 2011 11:36

Re: ARM compiler refuses to compile on large C files

#4 Post by The_YongGrand » 17 Dec 2019 14:24

Thank you Rajkovic for the help.

It's getting common that 32-bit projects have bigger files, especially when dealing with picture arrays and such.

In case if you are curious, I have ported the U8G2 to MikroC platforms: https://github.com/uncle-yong/u8g2-mikroC-arm

You can check it out and play with it if you have the time. :)

This helps in working with SSD1306 and other OLED displays.

User avatar
rajkovic
mikroElektronika team
Posts: 694
Joined: 16 Aug 2004 12:40

Re: ARM compiler refuses to compile on large C files

#5 Post by rajkovic » 17 Dec 2019 15:11

The_YongGrand wrote:Thank you Rajkovic for the help.

It's getting common that 32-bit projects have bigger files, especially when dealing with picture arrays and such.

In case if you are curious, I have ported the U8G2 to MikroC platforms: https://github.com/uncle-yong/u8g2-mikroC-arm

You can check it out and play with it if you have the time. :)

This helps in working with SSD1306 and other OLED displays.
Thanks for reporting, I agree, size and speed with today's MCU it is almost as you have PC from the time I have started working with microcontrollers. That essentially makes a must to the compiler to handle even bigger files. We will check out your code, definitly.


The good news is not only that we will provide a fixed 32bit version of compilers, but we will have both 64 bit and 32bit versions for mikroC AI, so it should be sufficient for some time :).

This also has pointed us to some parts of compilers that need refactoring to be more time and memory efficient when confronted with this kind of file or files.

Post Reply

Return to “ARM AI Compilers”