Skip to main content
Ark1
Associate III
October 4, 2018
Question

facing the difficulty of compiling the HAL code takes too long time.

  • October 4, 2018
  • 15 replies
  • 2331 views

Hi, i'm facing the difficulty of compiling the HAL driver codes takes nearly a 1:30 -3:00 min. So what should i do now?:sad_but_relieved_face:. it is quite a long compilation time for my application.

@Community member​ 

@Imen DAHMEN​ 

    This topic has been closed for replies.

    15 replies

    AvaTar
    Senior III
    October 4, 2018

    What hardware and OS, what toolchain ?

    Sources located on network ?

    Tesla DeLorean
    Guru
    October 4, 2018

    In Keil uncheck options to generate Browse Information

    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
    Ark1
    Ark1Author
    Associate III
    October 4, 2018

    stm32f429 mcu , arm keil tool chain @Community member​ 

    sorry for not mention this info

    Ark1
    Ark1Author
    Associate III
    October 4, 2018

    i don't get it what you said??

    @Community member​ 

    AvaTar
    Senior III
    October 4, 2018

    > ...stm32f429 mcu

    No, I meant the PC hardware. Or do you run the compiler on the target ... ;)

    If Windows, what does the task manager say while you build ?

    Tesla DeLorean
    Guru
    October 4, 2018

    Perhaps a picture?

    0690X000006C84vQAC.jpg

    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
    Jack Peacock_2
    Associate II
    October 4, 2018

    3 minutes to compile, some irony there...Those who remember PDP-11s (literally 5000 times slower than a PC) and build times in hours also remember the solution was to compile invariant sections of code one time so that only the changed code was recompiled and linked. Through the miracle of automatic code generation we can once again relive the good old days of the mini-computer era.

    I still use the old SPL, build time with parallel compile is about 10 seconds for a 128KB STM32L0 binary using a quad core and GCC. Even faster if I don't have to rebuild the SPL and FreeRTOS libraries.

    Ranting aside, this is a good example of why not many other Cortex M vendors have gone the Cube route.

    Jack Peacock

    AvaTar
    Senior III
    October 4, 2018

    All modern toolchains I know implement an incremental build, which is usually enabled by default.

    I tend to suspect some issues on the host PC.

    And I met a lot of people in my career that carelessly edited Word documents over a network connection, or builds like that. And complained ...

    Tesla DeLorean
    Guru
    October 4, 2018

    @Community member​  yeah, it took a while to run QuickC on a 4.77 or 8 MHz IBM PC, generally sufficient that I could boil a kettle and make some tea or coffee.

    Keil has some egregious issues with the browse information (at least in the 5.x compilers) where a rebuild of a HAL example might take several minutes, and perhaps 10x or 20x slower than necessary.

    @Community member​ and the problem with compile/edit on networks often means a disagreement about time locally and remotely, and causing grief with make and incremental builds.

    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
    Ark1
    Ark1Author
    Associate III
    October 5, 2018

    @Community member​ it's works very well. it means a lot for me. thanks a lot.

    i have another doubt . this hal file could make my mcu slow?? bacause of a bunch of file.