SparkFun Forums 

Where electronics enthusiasts find answers.

Open source ARM Debugger
By psychegr
#185723
Hi there,

i am new to openocd and i would like to add support for a new target cpu, as the one that i am working on has no support in openocd.
I know that this is not something easy but it always depends on the knowledge that someone has.
The processor series that i want to add support is MPC55xx and MPC56xx. I have gathered enough information about JTAGc and NEXUS from various datasheets
from freescale and ST and i strongly believe that i can make it work.
What i cant find is a guide on how to add/write new targets for openocd. Maybe it is in front of my eyes and i cant see it but some help would be usefull.
From my understanding i think that i need to add a new target_type in target.c file and write the corresponding mpc5xxx source code but is this the only things that i need to do?

Thank you in advance
By ppcust
#186198
add new target to openocd
1. copy a simple target like dsp563.c ,change target name as you like.
2. modify target.c add your target define, modify makefile in target ,compile your target.c
3. add basic function in your target ,such as : init_target ,poll, halt ,and so on
4. debug your target.c with hardware.

good luck to you