This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

consult to write and debug question on dm355

hi,all

 

    The question is:I write a driver code of SPI on dm355 EVM myself,please tell me how to write Makefile?debug driver program to how to make use of arm_v5t_le_gdb?

 

 

 

   Best regard!

  • Writing a makefile is something that is documented all over the web, as make is not TI software you can probably find the best documentation elsewhere, a quick google search nets a number of results on how to write a makefile such as this. In the case of a driver I would normally suggest taking an existing driver and modifying it to your needs so you can keep the same build process and build your driver with the kernel, however you can build without the rest of the kernel, there is an article here I came across that discusses this. 

    Debugging a driver can be a bit of a difficult process, what I have typically done is used a lot of print statements to debug the driver, you cannot use GDB as it is only for user space applications. There is a kernel level debugger called KDB though I have never used it myself and I am not sure how much effort there would be to use it on a DM355.

  • I just want to emphasize that makefiles for the kernel are a bit different than drivers is user space and you also need to modify other files such as Konfig files that work alongside makefiles to provide kernel configuration options via menuconfig. 

    With regards to debugging,

    1) at the boot-loader level (u-boot), you want to use some time of JTAG solution (e.g. CCS with XDS510USB JTAG); BDI2000 JTAG is very popular in the ARM world.

    2) for kernel debugging KGDB is a good choice; KGDB support need to be built into the kernel and should be fairly trivial.  You can use DevRocket IDE (among others) as front-end to KGDB

    3) fo user space debugging, GDB is the popular choice.  Almost all IDEs I am aware of run on top of GDB.