LPC1857 locate part of code in FlashB

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

LPC1857 locate part of code in FlashB

1,711 次查看
luciano_mortari
Contributor I

I'm using LCP1857 developing with MCUXpresso, the code is near to reach the limit of the FlashA,  ( today the code size is near 480kBytes).

I know that's possible to locate functions and constants to FlashB using the directives

__TEXT(Flash2) void function_xxx(uint32_t u32_parameter) {

…}

__RODATA(Flash2) const unsigned char ach_l_Table[dim]={...};

If i'd like to move a library  composed by several files to FlashB it's necessary to mark each function and table with the directive or exists a method to locate all the code in a *.c file in FlashB ?

 

0 项奖励
回复
4 回复数

1,681 次查看
luciano_mortari
Contributor I

Tank you, i knew this method, but , as I have to move a large number of functions in Flash2, i was wondering if exists another method that allows to declare all the functions in a *.c file all located in Flash2 instead of marking each function with __TEXT(Flash2)

 

0 项奖励
回复

1,685 次查看
luciano_mortari
Contributor I

Ok, tank you,

i know that i have to use the directive __TEXT(Flash2) but, as I have to move a large number of functions in Flash2 , i wondered if there is another method to  declare all the functions in a *.c file all located in Flash2 instead of mark each function with __TEXT(Flash2)

 

0 项奖励
回复

1,677 次查看
converse
Senior Contributor V

You can relocate all functions in a file by changing the linker script - not by changing the source code.

Take a look at this article by SiLabs

https://www.silabs.com/community/mcu/32-bit/knowledge-base.entry.html/2018/06/27/how_to_locate_anent...

 

0 项奖励
回复

1,692 次查看
Omar_Anguiano
NXP TechSupport
NXP TechSupport

Hello luciano_mortari

 

This document provides some sample codes and steps for relocating Code and Data into RAM/FLASH. Although the examples are for the Kinetis K64 you may use this as reference:

https://community.nxp.com/t5/Kinetis-Design-Studio-Knowledge/Relocating-Code-and-Data-Using-the-MCUX...

 

Let me know if this is helpful, if you have more questions do not hesitate to ask me.

Best regards,

Omar

0 项奖励
回复