How to manually enable VLE for a given section of memory?

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

How to manually enable VLE for a given section of memory?

跳至解决方案
1,687 次查看
petitbeurre
Contributor I

Hi all,

 

I am writing an application on a MPC5516 microcontroler, and I want it to be able to execute some VLE instructions that I manually wrote in flash memory.

 

I succeed in making PC jump to the address where is stored the code that I want to execute, but they are not recognized as VLE instructions. For exemple, the 32bits VLE instruction

182106E0 e_stwu R1, -32(R1)

is considered illegal.

 

My guess is that the memory section where are stored my instructions is not 'VLE enabled'. The document "Variable Lenth Encoding (VLE) Programming Environments Manual" indicates that the "set of alternate encodings is selected on a page basis. A single storage bit attribute bit selects between standard instruction encodings and VLE instructions for that page".

 

Could someone explain me how could I manually enable VLE for a given section of flash memory?

 

Thanks a lot,

Regards,

Nicolas

标签 (1)
标记 (4)
0 项奖励
1 解答
1,470 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

It is necessary to set the MMU pages appropriately. There's VLE bit in MAS2 register that says if the code in MMU page is VLE or BOOKE.

I created XLS tool that can help to set the MMU (attached). It generates asm code and also script for Lauterbach debugger.
More details about MMU can be found in

http://www.freescale.com/files/32bit/doc/ref_manual/e200z1RM.pdf

Lukas

在原帖中查看解决方案

0 项奖励
1 回复
1,471 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

It is necessary to set the MMU pages appropriately. There's VLE bit in MAS2 register that says if the code in MMU page is VLE or BOOKE.

I created XLS tool that can help to set the MMU (attached). It generates asm code and also script for Lauterbach debugger.
More details about MMU can be found in

http://www.freescale.com/files/32bit/doc/ref_manual/e200z1RM.pdf

Lukas

0 项奖励