srkdb
srkdb

Reputation: 815

error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void': Weak case

I have a portion of the code as:

__weak  void TimingDelay_Decrement(void) {

}

and it keeps throwing up the captioned error. I checked the web and couldn't find relevant content for the __weak case. Any help is appreciated.

Upvotes: 0

Views: 1364

Answers (1)

0___________
0___________

Reputation: 67476

Because it is ARM Cortex gcc toolchain so the __weak is a definition of __attribute__((weak)).

The easiest way to add is to amend the gcc command line arguments: -D__weak=__attribute__((weak))

Upvotes: 3

Related Questions