Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Last revision Both sides next revision
mri-debugging [2017/01/26 00:31]
arthur
mri-debugging [2017/05/26 22:29]
207.229.187.233 Remove encoding artifacts
Line 5: Line 5:
 If Smoothie crashes, or you manually tell it to, it can go into a special mode ( MRI ), where if you use a serial cable to connect to it's hardware serial port ( UART0 ), you can use GDB to connect to it, and step through the code, add breakpoints,​ print values, and more generally debug the code.  If Smoothie crashes, or you manually tell it to, it can go into a special mode ( MRI ), where if you use a serial cable to connect to it's hardware serial port ( UART0 ), you can use GDB to connect to it, and step through the code, add breakpoints,​ print values, and more generally debug the code. 
  
-This is a feature that would otherwise require an expensive ​JTAG adapter.+This is a feature that would otherwise require an expensive ​JTAG adapter.
 </​callout>​ </​callout>​
  
Line 33: Line 33:
 </​code>​ </​code>​
  
-== Causing Smoothie to go into MRI mode+== Causing Smoothie to go into MRI mode
  
-Smoothie will go into MRI mode ​automatically if a problem occurs.+Smoothie will go into MRI mode ​automatically if a problem occurs.
  
-But sometimes you want to -put- Smoothie into MRI mode ​to poke around in it's brain, run code step by step etc.+But sometimes you want to -put- Smoothie into MRI mode ​to poke around in it's brain, run code step by step etc.
  
-If you want to do that, you have two ways to cause Smoothie to enter MRI mode ​: +If you want to do that, you have two ways to cause Smoothie to enter MRI mode ​:
  
 * Click on the <​kbd>​ISP</​kbd>​ button next to the <​kbd>​Reset</​kbd>​ button * Click on the <​kbd>​ISP</​kbd>​ button next to the <​kbd>​Reset</​kbd>​ button
Line 155: Line 155:
 This is done by editing the Makefile : https://​github.com/​Smoothieware/​Smoothieware/​blob/​edge/​src/​makefile This is done by editing the Makefile : https://​github.com/​Smoothieware/​Smoothieware/​blob/​edge/​src/​makefile
  
-First, change <​kbd>​BUILD_TYPE</​kbd>​ from <​kbd>​Checked</​kbd>​ to <​kbd>​Debug</​kbd>​ : +First, change <​kbd>​BUILD_TYPE</​kbd>​ from <​kbd>​Checked</​kbd>​ to <​kbd>​Debug</​kbd>​ :
  
 <​code>​ <​code>​
Line 165: Line 165:
 One thing you can do for example is to disable networking ( which takes quite a bit of space, and which you don't need while debugging, unless you are debugging a network-specific problem ). One thing you can do for example is to disable networking ( which takes quite a bit of space, and which you don't need while debugging, unless you are debugging a network-specific problem ).
  
-You do this by uncommenting <​kbd>​NONETWORK</​kbd>​ : +You do this by uncommenting <​kbd>​NONETWORK</​kbd>​ :
  
 <​code>​ <​code>​
Line 171: Line 171:
 </​code>​ </​code>​
  
-If you still need to reduce size further, you can also disable specific modules : +If you still need to reduce size further, you can also disable specific modules :
  
 <​code>​ <​code>​
Line 193: Line 193:
 You can add your module excludes in the <​kbd>​src/​default_excludes.mk</​kbd>​ file. Because it is not saved by git, it is useful for development as you can delete it once you are done, and you do not risk committing a modified makefile with your code. You can add your module excludes in the <​kbd>​src/​default_excludes.mk</​kbd>​ file. Because it is not saved by git, it is useful for development as you can delete it once you are done, and you do not risk committing a modified makefile with your code.
  
-For example you can add this to it : +For example you can add this to it :
  
 <​code>​ <​code>​