Skip to main content
Hiren Bhuva
Associate III
May 28, 2021
Solved

Want to use __no_init CHAR gPassthruMode[4] @ APP_WORKSPACE_BLOCK_START;

  • May 28, 2021
  • 3 replies
  • 1084 views

Hello Community,

I want to use __no_init CHAR gPassthruMode[4] @ APP_WORKSPACE_BLOCK_START;

Here APP_WORKSPACE_BLOCK_START is the flash address.

Can anyone suggest, how can we use this.

Thanks in advance,

Hiren

This topic has been closed for replies.
Best answer by TDK

You can, but that doesn't eliminate the limitations of flash, namely that it must be unlocked and erased before written. There is no limitation on reading it.

3 replies

TDK
Super User
May 28, 2021

Different IDEs have different ways of doing this. Not familiar with IAR.

Another option is to just use a pointer, which is compatible across IDEs.

CHAR * gPassThruMode = (CHAR *) APP_WORKSPACE_BLOCK_START;

 You'd need to ensure that space isn't being used for other things by the linker.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Hiren Bhuva
Associate III
June 7, 2021

Hi @TDK​ ,

Thanks for the reply,

I just want to know that can we use flash address( Instead of RAM) directly for this?

Thanks,

Hiren

TDK
TDKBest answer
Super User
June 7, 2021

You can, but that doesn't eliminate the limitations of flash, namely that it must be unlocked and erased before written. There is no limitation on reading it.

"If you feel a post has answered your question, please click ""Accept as Solution""."