Put function from FLASH to RAM

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
mjt_4825471
Level 1
Level 1
10 sign-ins 5 questions asked 5 sign-ins

uint8 ProgramData(uint32 address, uint8* data, uint32 length)
{

.........

}

I want to define this function in ram so that after hardwa reset it will  disappear. I tried to change the link file add a section in ram area and use "CY_SECTION".It builded successfully but it failed in programming.It showed that the hex file not correct.Could somebody tell me how to modfiy this code?🤔

0 Likes
1 Solution
LinglingG_46
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 10 questions asked

As my understanding, the function 's status which define in the ram will disappear after the hardware reset.  

The difference between ram and flash is that, the flash could store the data when the power down, but the ram can't.

Could you tell us more information about why do you want to do?

About how to define the function in the ram, please refer to the below linker thread: Solved: Re: Non-blocking emulated EEPROM - Cypress Developer Community

View solution in original post

0 Likes
2 Replies
LinglingG_46
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 10 questions asked

As my understanding, the function 's status which define in the ram will disappear after the hardware reset.  

The difference between ram and flash is that, the flash could store the data when the power down, but the ram can't.

Could you tell us more information about why do you want to do?

About how to define the function in the ram, please refer to the below linker thread: Solved: Re: Non-blocking emulated EEPROM - Cypress Developer Community

0 Likes

Yes, Now I want to make a  LIN bootloader .Refer to the specification ,it said that flash driver should be  put in ram and downloaded before programming  app.

0 Likes