Skip to main content
Muthaiah Murugappan
Associate III
June 26, 2018
Question

Issues due to optimization level

  • June 26, 2018
  • 6 replies
  • 1905 views
Posted on June 26, 2018 at 23:00

Hello All,

              I hope your doing good. I am working on a project based on STM32L476RG using Keil v5. I have used assert in my code. It works correctly for the compiler optimization L2 and L3. But when I change to Level 1 or 0, i get

'G3\G3.axf: Error: L6218E: Undefined symbol __aeabi_assert (referred from st_spi.o).'

 Anybody with any leads on this. Thank you all for your time.

Muthaiah Murugappan

#optimization #hal-spi #stm32l476
This topic has been closed for replies.

6 replies

Bob S
Super User
June 26, 2018
Posted on June 26, 2018 at 23:15

See this link:

http://www.keil.com/support/man/docs/armlib/armlib_chr1358938924063.htm

Apparently with the Keil compiler the assert() macro behaves differently depending on the optimization level.  The real question is why the linker isn't finding the __atabi_assert() function that is supposed to be in a library somewhere.

Muthaiah Murugappan
Associate III
June 26, 2018
Posted on June 26, 2018 at 23:48

Hello Bob,

                Thanks for getting back to me. The link you sent describes a better picture for my issue. Thanks for the information. 

Even I'm not able to figure out, why the compiler doesn't find out the library function.

Thanks

Muthaiah Murugappan

Tesla DeLorean
Guru
June 27, 2018
Posted on June 27, 2018 at 00:21

>>Even I'm not able to figure out, why the compiler doesn't find out the library function.

Keil has support contact numbers for such issues.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Muthaiah Murugappan
Associate III
June 27, 2018
Posted on June 27, 2018 at 15:11

Hey Clive, thanks for responding, I will get in touch with keil support and post an update here.