Skip to content

Instantly share code, notes, and snippets.

@triffid
Last active January 4, 2016 07:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save triffid/8588100 to your computer and use it in GitHub Desktop.
Save triffid/8588100 to your computer and use it in GitHub Desktop.
smoothie crash- feature/Actuator branch
triffid@aleisa ~/Projects/Smoothie $ make BAUD=9600 console
make[1]: Entering directory `/home/triffid/Projects/Smoothie/src'
stty raw ignbrk -echo 9600 < /dev/arduino
( cat <&3 & cat >&3 ; kill %% ) 3<>/dev/arduino
No disk, or could not put SD card in to SPI idle state
**Hard Fault**
Status Register: 0x40000000
Forced
**Bus Fault**
Status Register: 0x04
Imprecise Data Access
$T0b0c:00000000;0d:587e0010;0e:4b240100;0f:3e230100;#d1
triffid@aleisa ~/Projects/Smoothie-clean $ make BAUD=9600 debug
make[1]: Entering directory `/home/triffid/Projects/Smoothie-clean/src'
arm-none-eabi-gdb ../LPC1768/main_lastupload.elf -ex "set target-charset ASCII" -ex "set remotelogfile mri.log" -ex "target remote /dev/arduino"
GNU gdb (GNU Tools for ARM Embedded Processors) 7.4.1.20121207-cvs
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i686-linux-gnu --target=arm-none-eabi".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/triffid/Projects/Smoothie-clean/LPC1768/main_lastupload.elf...done.
Remote debugging using /dev/arduino
0x0001233e in Stepper::turn_enable_pins_off (this=this@entry=0x10001f88) at modules/robot/Stepper.cpp:117
117 for (StepperMotor* m : THEKERNEL->robot->actuators)
(gdb) p this
$1 = (Stepper * const) 0x10001f88
(gdb) p Kernel::instance->robot
$2 = (Robot *) 0x10001d20
(gdb) p Kernel::instance->robot->actuators
$3 = {<std::_Vector_base<StepperMotor*, std::allocator<StepperMotor*> >> = {_M_impl = {<std::allocator<StepperMotor*>> = {<__gnu_cxx::new_allocator<StepperMotor*>> = {<No data fields>}, <No data fields>}, _M_start = 0x10001f70, _M_finish = 0x10001f7c, _M_end_of_storage = 0x10001f80}}, <No data fields>}
(gdb) p m
$4 = <optimized out>
(gdb) list
112 this->enable_pins_status = true;
113 }
114
115 // Disable steppers
116 void Stepper::turn_enable_pins_off(){
117 for (StepperMotor* m : THEKERNEL->robot->actuators)
118 m->en_pin->set(1);
119 this->enable_pins_status = false;
120 }
121
(gdb) p Kernel::instance->robot->actuators.size()
Cannot evaluate function -- may be inlined
(gdb) p Kernel::instance->robot->actuators._M_impl
$5 = {<std::allocator<StepperMotor*>> = {<__gnu_cxx::new_allocator<StepperMotor*>> = {<No data fields>}, <No data fields>}, _M_start = 0x10001f70, _M_finish = 0x10001f7c, _M_end_of_storage = 0x10001f80}
(gdb) p Kernel::instance->robot->actuators._M_impl._M_start
$6 = (std::_Vector_base<StepperMotor*, std::allocator<StepperMotor*> >::pointer) 0x10001f70
(gdb) p Kernel::instance->robot->actuators._M_impl._M_start[0]
$7 = (StepperMotor *) 0x10001e20
(gdb) p Kernel::instance->robot->actuators._M_impl._M_start[1]
$8 = (StepperMotor *) 0x10001e70
(gdb) p Kernel::instance->robot->actuators._M_impl._M_start[2]
$9 = (StepperMotor *) 0x10001ef0
(gdb) p Kernel::instance->robot->actuators._M_impl._M_start[3]
$10 = (StepperMotor *) 0xdeadbeef
(gdb) p &Kernel::instance->robot->actuators._M_impl._M_start[2]
$11 = (StepperMotor **) 0x10001f78
(gdb) p Kernel::instance->robot->actuators._M_impl._M_start[0]
$12 = (StepperMotor *) 0x10001e20
(gdb) p Kernel::instance->robot->actuators._M_impl._M_start[0]->en_pin
$13 = (Pin *) 0x10007e88
(gdb) p Kernel::instance->robot->actuators._M_impl._M_start[1]->en_pin
$14 = (Pin *) 0x10007ea0
(gdb) p Kernel::instance->robot->actuators._M_impl._M_start[2]->en_pin
$15 = (Pin *) 0x10007eb8
(gdb) p *(Kernel::instance->robot->actuators._M_impl._M_start[0]->en_pin)
$16 = {port = 0x10001f88, inverting = 136, port_number = 31 '\037', pin = 0 '\000'}
(gdb) p *(Kernel::instance->robot->actuators._M_impl._M_start[1]->en_pin)
$17 = {port = 0x1, inverting = 211, port_number = 41 ')', pin = 1 '\001'}
(gdb) p *(Kernel::instance->robot->actuators._M_impl._M_start[2]->en_pin)
$18 = {port = 0x2009c000, inverting = false, port_number = 0 '\000', pin = 19 '\023'}
(gdb)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment