cancel
Showing results for 
Search instead for 
Did you mean: 

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

Hiren Bhuva
Associate II

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

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

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".

View solution in original post

3 REPLIES 3
TDK
Guru

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 II

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
Guru

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".