Hi all!
I want to place some data in program memory. At the moment I am using:
signed char states[]={,,,,,,,,} which uses ram.
How can I put this in program memory? I have tried by writing "rom signed char states[]={,,,,,,,,} but this does not work!
Flowcode 5 uses boost c.
Can anyone help?
Thanks
Dave
Flowcode v5 User
placing data into program memory
- Enamul
- Posts: 1772
- Joined: Mon Mar 05, 2012 11:34 pm
- Location: Nottingham, UK
- Has thanked: 271 times
- Been thanked: 814 times
Re: placing data into program memory
Hi,
I have found a function to do that..you can have play..
Memory mapped functions
Functions just as variables can be forced to be placed at certain addresses. Syntax
is the same as in the legacy C2C compiler:
void foo() @ <addr>;
where <addr> is an hex or decimal address.
//This function placed at address 0x100
void foo1() @ 0x100
{
...
}
In most cases there is no need to use memory mapped functions as linker will
analyze the code and optimize function allocation. Only very special occasions
require this feature.
You have to put the function in ....>V5>Tools>boostc>include>boostc.h
Enamul
I have found a function to do that..you can have play..
Memory mapped functions
Functions just as variables can be forced to be placed at certain addresses. Syntax
is the same as in the legacy C2C compiler:
void foo() @ <addr>;
where <addr> is an hex or decimal address.
//This function placed at address 0x100
void foo1() @ 0x100
{
...
}
In most cases there is no need to use memory mapped functions as linker will
analyze the code and optimize function allocation. Only very special occasions
require this feature.
You have to put the function in ....>V5>Tools>boostc>include>boostc.h
Enamul