Skip to main content
NPash.1
Associate II
August 4, 2020
Question

Error: .size expression for RAMTest does not evaluate to a constant

  • August 4, 2020
  • 2 replies
  • 1613 views

I am testing the RAM code in assembly, function name is ML_RAMTest and it is ended with instruction .size ML_RAMTest, .-ML_RAMTest. It is compiling but encounter with the Error: .size expression for RAMTest does not evaluate to a constant.

Can you please provide the solution for it.

This topic has been closed for replies.

2 replies

KnarfB
Super User
August 4, 2020

Probably the symbol ML_RAMTest is misspelled or undefined. You can find a good example in the startup code:

 .section	.text.Reset_Handler
	.weak	Reset_Handler
	.type	Reset_Handler, %function
Reset_Handler:
...
.size	Reset_Handler, .-Reset_Handler

NPash.1
NPash.1Author
Associate II
August 4, 2020

Thank you for your reply, I have rechecked the code now the error is resolved.