cancel
Showing results for 
Search instead for 
Did you mean: 

Constant at certain location (0xefff) with C compiler?

markbng
Associate II
Posted on May 16, 2003 at 06:25

Constant at certain location (0xefff) with C compiler?

3 REPLIES 3
markbng
Associate II
Posted on May 14, 2003 at 08:41

Hello,

I wrote firmware that is able to update the firmware of the device ($e000-$efff) by USB. I want to place a constant at the end of this memory to check whether the firmware has been programmed/updated successfully.

This is the constant value:

const Byte FlashableVersionNumber=0x01; //place at 0xefff?

How can I do this with the Cosmic compiler? I was/am new in C, so please clarify with some code. Thanks in advance

Kind regards,

Mark

sjo
Associate II
Posted on May 14, 2003 at 15:03

Have alook at

http://www.stmcu.com/forums-cat-256-1.html

, this topic was discussed.

Regards

SJO
stephanie23
Associate II
Posted on May 16, 2003 at 06:25

In both C compilers (Cosmic or Metrowerks), you can define a variable by precising the address where you want it to be (like in the mapfiles for the hardware registers for instance!):

const Byte FlashableVersionNumber @efff;