CPU Bean Disable

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

CPU Bean Disable

跳至解决方案
4,794 次查看
Punit
Contributor III

I have a code which requires CPU bean to be disabled in order to prevent user changes. However, with processor expert I can disable all other beans but not the CPU Bean. By not able to do this, I need to manually edit in cpu.c everytime it is compiled for teh first time, else it gives linker error. So, is there a way to disable CPU bean generation in PE?

0 项奖励
回复
1 解答
4,549 次查看
ProcessorExpert
Senior Contributor III

Hello,

 

I think that in case of bootloader project it´s not neceesary to disable re-generation of the whole CPU.c module. Processor Expert (PE) provides features to rediretion of reset vector or redirection the vector table - please see “Internal resource mapping“ group in CPU component.

 

You can find PE bootloader example project beased on AN3561 under the following link.

https://community.freescale.com/message/61051#61051

 

best regards
Vojtech Filip
Processor Expert Support Team

在原帖中查看解决方案

0 项奖励
回复
5 回复数
4,551 次查看
BlackNight
NXP Employee
NXP Employee

Are you using CW MCU10.1? There you can right click on the CPU and select 'Code Generation' > 'Don't write generated component module'.

 

BK

0 项奖励
回复
4,551 次查看
Punit
Contributor III

I am using CW V6.3 and it has this option disabled ie "'Don't write generated component module" is disabled/not highted so you can not select. However, this is not the case for any of the other beans.

0 项奖励
回复
4,551 次查看
ProcessorExpert
Senior Contributor III

Hello,

 

It´s not possible to disable code generation of CPU component in CW Classic. In this case it´s necessary to freeze the whole project using "Freeze Generated Code" menu command from "Processor Expert" menu. You can find more details also in PE help: User Interface > Main Menu > Freeze Generate Code

 

There are also options "User code before PE initialization" and "User code after PE initialization" in Build options tab in CPU component that allow add a user code into CPU initialization function (__initialize_hardware, _EntryPoint, etc.).

 

Could you please specify what exactly do you need to do? 

 

best regards
Vojtech Filip
Processor Expert Support Team

4,551 次查看
Punit
Contributor III

I have a project which uses two programs in Flash. So the Program 1 is bootloader code and program 2 is Application code.

I am using vector table in Bootloader code. Whenever there is an Interrupt the Programn jumps to Bootlaoder code space which redirects to Application code. So in my application code I need to rename all the ISRs to general functions, which I can do except for CPU ISR. If you need further information you can search for the questions asked by me previously.

 

So, everything works great but when some other programmer opens this application code, due to auto generation feature of CPU Bean the user defined functions gets changed into ISR and linker errors.  

0 项奖励
回复
4,550 次查看
ProcessorExpert
Senior Contributor III

Hello,

 

I think that in case of bootloader project it´s not neceesary to disable re-generation of the whole CPU.c module. Processor Expert (PE) provides features to rediretion of reset vector or redirection the vector table - please see “Internal resource mapping“ group in CPU component.

 

You can find PE bootloader example project beased on AN3561 under the following link.

https://community.freescale.com/message/61051#61051

 

best regards
Vojtech Filip
Processor Expert Support Team

0 项奖励
回复