cancel
Showing results for 
Search instead for 
Did you mean: 

How generate hex file without link files Hal_drivers

Fredolive
Associate II

Hello,

When I builed the project, I had seen the Hal drivers files links in the end file *.HEX.

How can I change the project configuration not to put this links in file because it use flash memory unnecessarily ?

Thanks 

21 REPLIES 21
Pavel A.
Evangelist III

If you don't define USE_FULL_ASSERT these filenames are just for debug information. They do not occupy room in the flash.

 

If Debug level is different of "None" then these roots filenames are in rom flash.

The only solution is the "None" choice to have any root filename.

What do you mean by, "Debug level" ?

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

Yes "debug level".

I looked this on STM32G0 and stm32G4. not on STM32F0.

Ah - this:

AndrewNeil_0-1727103345486.png

 

I'll bet that 'None' causes USE_FULL_ASSERT to be not defined.

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

@Fredolive wrote:

How can I change the project configuration not to put this links in file because it use flash memory unnecessarily ? 


Note that it's just putting the file names in as string literals - it's not linking any code.

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

Yes, it is rigth. But it used rom flash to anything. 

You can get rid of it by not defining USE_FULL_ASSERT .

Or you could change your assert_param definition to not use __FILE__ and, thus, not require that the filenames be stored.

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

Hello,

Thanks for your help.

Now, it is Ok, and I haven't the roots names in my Hex File.

Best Regards

Excellent.

Now please mark the solution:

https://community.st.com/t5/community-guidelines/help-others-to-solve-their-issues/ta-p/575256

 

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.