Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support gQuintic (and gQuadratic) #285

Open
wants to merge 208 commits into
base: edge
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
208 commits
Select commit Hold shift + click to select a range
5ec70ed
Making dev-168-gquintic to point to Motate sams70-port
giseburt Dec 14, 2016
e0b0db6
Update Motate for various fixes (mostly sams70)
giseburt Dec 15, 2016
eceb69f
Removed unnecessary FREQUENCY_SGI
giseburt Dec 15, 2016
0c8af69
Debugging: enable semihosting
giseburt Dec 15, 2016
91300cd
Adjustments to trinamic SPI message handling
giseburt Dec 16, 2016
bc95121
Update motate for sams70 USB connection sequence
giseburt Dec 16, 2016
ba23648
Update Motate reference for new sys calls and fix the sam3x builds
giseburt Dec 16, 2016
bd43a0d
Merge branch 'refs/heads/edge' into dev-168-gquintic
giseburt Jan 6, 2017
0cce90b
Make Neopixel support in gQuadratic non-default.
giseburt Jan 6, 2017
f73bdb1
Disabling broken (for a long time) debugging code in zoid.
giseburt Jan 8, 2017
01b004b
Adjusting the Quintic board to use all timers for planning/step gener…
giseburt Jan 8, 2017
5d8f361
Moving the load_move call outside of a syscall/timer.
giseburt Jan 8, 2017
eb80e1e
Added support for AxiDrawv3, and cleaned up some other code
giseburt Feb 16, 2017
62919b0
Removing ROTATION_ABOUT_Z, in prep for adding proper Kinematics for C…
giseburt Feb 18, 2017
91f7793
Added CoreXY Kinematics, and set AxiDraw settings to use it.
giseburt Feb 18, 2017
5c97d8a
Make MIN_SEGMENT_MS settable in the board hardware.h file
giseburt Feb 18, 2017
1905fe1
Remove too-strict tests and extra commented-out code in stepper and e…
giseburt Feb 18, 2017
ca7c489
New command: {prbs:true} store the current position as a probe point.
giseburt Feb 18, 2017
a5466bf
Tweak AxiDrawv3 settings.
giseburt Feb 18, 2017
e811666
Update motate reference for minor S70 USB adjustment.
giseburt Feb 18, 2017
2d3e916
Cleanup for DEBUG=0
giseburt Feb 22, 2017
cb65138
Cleanup gQuintic. Added 6th motor, a hobby servo (motor 6) on OUT_7.
giseburt Feb 22, 2017
fdf663f
Updated AxiDrawv3 settings to support the gQuintic or gQuadratic.
giseburt Feb 22, 2017
a22158f
Removing all references to SysTickTimer_getValue() … again.
giseburt Feb 22, 2017
a8a5ab5
Fix for crash with an FPU: converting a float to a int32, then storin…
giseburt Feb 22, 2017
b810a01
Removed SysTickTimer_getValue() for real this time.
giseburt Feb 22, 2017
0806ab6
Update Motate reference to get new SAMS&0 changes and new compiler. A…
giseburt Feb 22, 2017
d5c131b
GDB file changes for ICE/Jlink independence.
giseburt Feb 22, 2017
dda233f
gQuintic: Fix redundant Servo1 pin assignment.
giseburt Feb 22, 2017
9136aba
HOT_FUNC and HOT_DATA assignments sprinkled all over. Also removing n…
giseburt Feb 22, 2017
48c4d7d
Adding gQuadratic and gQuintic on AxiDraw v3 configs to Atmel Studio,…
giseburt Feb 24, 2017
c20684f
Updated reference to Motate for make clean and tools won load files o…
giseburt Feb 24, 2017
c031daa
Fix for broken Motor_3!
giseburt Feb 24, 2017
c2f5bfd
Adjust TMC2130 callbacks, lower processor usage noticeably
giseburt Feb 24, 2017
b97fb54
Fix issue where power levels are getting scaled before the per-driver…
giseburt Feb 24, 2017
73a772b
Update Makefile and Motate to get TOOLS_VERSION matching.
giseburt Feb 24, 2017
aace4ad
Speedup for gQuintic: DDA freq of 300K, and marked USB object as HOT_…
giseburt Feb 24, 2017
87967e7
Update Motate for initial ADC code (broken)
giseburt Mar 9, 2017
ec80cbf
Updates for new ADC API (cleaner).
giseburt Mar 9, 2017
9d9ed0e
Fix a sprint with the wrong tag
giseburt Mar 9, 2017
264f11d
Update Motate reference for new ADC updates
giseburt Mar 15, 2017
1c3915c
Added “heNtv” to display the sensor’s voltage reading. Added PT100 se…
giseburt Mar 15, 2017
54f3061
Fix INPUTn_AVAILABLE settings for gquintic-b
giseburt Mar 15, 2017
c96849c
Added CONFIG=Ultimaker2Plus and settings_Ultimaker_2_Plus.h
giseburt Mar 15, 2017
80542a5
Merge branch 'refs/heads/dev-227-marlin-compat' into dev-168-gquintic
giseburt Mar 15, 2017
d2c6eff
Cleanup configuration of temperature sensors in settings files.
giseburt Mar 15, 2017
d3e980d
Restore cm_set_probe and {"prbs":true} that was broken in the merge.
giseburt Mar 15, 2017
56f29ba
Rearranged kADCn pin number to start with 1 (except Due). Made extrud…
giseburt Mar 16, 2017
f1b8d1f
Adjustments for quintic pinout and Ultimaker2+ settings
giseburt Mar 16, 2017
cb4273b
Adde ability for each heater to have it’s own min temp rise over time.
giseburt Mar 16, 2017
ac3fd47
Update motate for PWM fixes.
giseburt Mar 16, 2017
6e343c1
Fix marlin compatibility bed controls not working.
giseburt Mar 17, 2017
ee805be
Enable marlin compatibility for UM2+
giseburt Mar 17, 2017
1648e96
Update PT100 to use differential ADC in a wheatstone config.
giseburt Mar 22, 2017
54cb9e6
Configure Ultimaker2+ configs to use a wheatstone config
giseburt Mar 22, 2017
fc674c6
Update Motate to pull in support for differential ADC on SamS70
giseburt Mar 22, 2017
806aa81
Ultimaker Interim commit
giseburt Mar 30, 2017
443e6f7
Fixed missing interrupt call from max31865 synthetic ADC
giseburt Mar 31, 2017
ace2076
Minor cleanup, tuning, and notes
giseburt Apr 5, 2017
099ff5b
Update motate reference for SPI fixes
giseburt Apr 5, 2017
ea07e9e
Made PLANNER_POOL_SIZE adjustable int he hardware files, and bumped i…
giseburt Apr 11, 2017
3b4e9bb
Ultimaker 2+: Tweaks to speeds and turned on TRAVERSE_AT_HIGH_JERK
giseburt Apr 11, 2017
f04256d
gQuintic: bump DDA clock to 400khz
giseburt Apr 13, 2017
7b62912
Marlin: fix M4 to be in milliseconds for Marlin flavor gcode
giseburt Apr 13, 2017
5b0aa6b
Adjust dwell to internally be in milliseconds (giving more overhead b…
giseburt Apr 13, 2017
ac7a7d4
Annotate motor power modes in comments
giseburt Apr 13, 2017
d34a362
Ultimaker2+: More settings adjustments
giseburt Apr 13, 2017
8f26732
Motate: update reference for USB fixes
giseburt Apr 13, 2017
8ad5211
Updates to UM2+ settings, switched to the new ADCDifferentialPair for…
giseburt Apr 18, 2017
287182f
Minor typo fix in AxiDraw settings.
giseburt Apr 18, 2017
3dded28
Update Motate reference for ADCDifferentialPair.
giseburt Apr 18, 2017
5b1a0f4
Rearranged heater to not collide/interact with GPIO (to be undone later)
giseburt Apr 21, 2017
f0a0385
Rework of temperature control, PID, and PWM outputs.
giseburt Apr 21, 2017
cda38cd
Fixes for step/dir hobby servo PWMPin usage.
giseburt Apr 21, 2017
a2ee622
Exposing F in PIDF via JSON.
giseburt Apr 21, 2017
9cb5ca4
Update motate reference for PWMPin fixes
giseburt Apr 21, 2017
43ccc96
Update to using the new arm toolchain. (Includes Motate update)
giseburt Apr 25, 2017
86651f6
Remove redundant file
giseburt Apr 25, 2017
c58a1de
Update mb analyze (will not only work with quintic without mods)
giseburt Apr 25, 2017
971835a
Fix URL referenced in quintic-b-pinout.h
giseburt Apr 25, 2017
4730b56
Fixes to GPIO initialization
giseburt Apr 25, 2017
e806e37
Fix where gcode flavor wasn’t reset on disconnect.
giseburt Apr 27, 2017
1c9111c
Update motate reference for typos
giseburt Apr 27, 2017
4f7a6e0
Tweaks to stepper: don’t turn of dad timer, and use std::min instead …
giseburt Apr 27, 2017
37914e8
Adjust quintic-b-pinout.h back to use the servo instead of out10
giseburt Apr 27, 2017
fab5368
Cleanup some comments and more min/max → std::min/std::max
giseburt Apr 28, 2017
520bd7d
Adjust Ultimaker settings.
giseburt Apr 28, 2017
5b9a133
Large number of improvements all at once.
giseburt Apr 28, 2017
52743a3
Fixed a few issues with the last commit.
giseburt Apr 28, 2017
cdf9478
Merge branch 'refs/heads/dev-168-gquintic' into LOCAL-ultimaker2plus
giseburt May 1, 2017
c955b56
Moving MOTORS back to 5, and the heater outputs to have unique names …
giseburt May 1, 2017
5b82021
Added temporary not_maxidraw
giseburt May 1, 2017
ef72a84
Fix missing frequency in GPIO settings.
giseburt May 2, 2017
3e26890
Rebuilding DDA dubstep accumulator to not incorporate time. Other loa…
giseburt May 2, 2017
08facb8
Adjusting Ultimaker2+ settings (TESTING)
giseburt May 2, 2017
8e06da5
EXPERIMENT: Adding tiny junction compensation
giseburt May 2, 2017
5e54658
Fix missing frequency in GPIO settings.
giseburt May 2, 2017
fd95d73
Uncommenting code commented for debugging
giseburt May 2, 2017
dbaec2d
Motate update to fix PWM on pin A23 inversion
giseburt May 2, 2017
980e243
Merge remote-tracking branch 'refs/remotes/origin/dev-168-gquintic' i…
giseburt May 2, 2017
591a5f2
Correct not Maxidraw settings.
giseburt May 2, 2017
ceb4462
Renamed Not Maxidraw to DROSMM
giseburt May 2, 2017
d183160
Update to UM2+
giseburt May 3, 2017
64a2890
More complete control over TMC2130 via JSON and in general. Other qui…
giseburt May 16, 2017
72f80f9
Added NEW_DDA to test a new optimized DDA
giseburt May 16, 2017
02e3aaf
Computed last-in move exit junction_velocity to non-zero.
giseburt May 16, 2017
f95c1c1
Update Motate reference for various ADC/Pin/compile fixes
giseburt May 16, 2017
b25a2a0
Adding gquintic-c target
giseburt May 16, 2017
6c11444
Corrections in GDB configs for use with SAM-ICE
giseburt May 16, 2017
8599d08
Added formal USING_A_MAX31865 define to allow disabling Motor_1 cleanly
giseburt May 16, 2017
9d450c7
Ultimaker 2+ settings update
giseburt May 16, 2017
64c3056
Corrections to PB Simple 1608 settings.
giseburt May 16, 2017
606e388
Cleanup of temperature code. Utilizing new ADCPin.is_differential
giseburt May 16, 2017
98af94c
UM2+ settings: Minor adjustments and notes
giseburt Jun 7, 2017
d27f105
UM2+: Raise Z latch backoff
giseburt Jun 17, 2017
5d21d84
UM2+: Adjust settings, mostly for Z
giseburt Jun 21, 2017
1203584
Marlin: Add support from M205, which changes jerk settings
giseburt Jun 21, 2017
058039d
Fixing cornering to include active jerk, not default jerk for the axes.
giseburt Jun 28, 2017
8840ee6
UM2+ Lowered Z power level, made PID more aggressive, and gave it mor…
giseburt Jun 30, 2017
02e790a
Merge branch 'refs/heads/LOCAL-ultimaker2plus2' into dev-168-gquintic
giseburt Jun 30, 2017
d87eeef
Added Ender 3d Printer Config
ril3y Jul 16, 2017
532d875
Merge branch 'dev-168-gquintic' of https://github.com/synthetos/g2 in…
giseburt Jul 16, 2017
5609c87
Fixes for Thermistor not accepting ADCDifferentialPair<...> correctly.
giseburt Jul 16, 2017
2de0870
Highly experimental segment linear-velocity-interpolation
giseburt Jul 16, 2017
65c675c
Added Ender config to boards.mk
giseburt Jul 16, 2017
578db0c
Added support for building the ender3d printer configs
ril3y Jul 16, 2017
d68d94d
some more settings improvements
ril3y Jul 18, 2017
2cddd94
Update Printrbot Play settings, added CONFIG=PrintrbotPlayQuintic
giseburt Jul 18, 2017
5d552e4
Add differential ADC support to Thermistor object
giseburt Jul 18, 2017
7e1fa34
Merge remote-tracking branch 'refs/remotes/origin/dev-168-gquintic' i…
giseburt Jul 18, 2017
f4e7bec
Removed accidental duplicate Quintic-Ender in boards.mk
giseburt Jul 18, 2017
14209f8
added xcarve_extended setting file
ril3y Jul 23, 2017
cfc3dcd
Merge branch 'dev-168-gquintic' of https://github.com/synthetos/g2 in…
ril3y Jul 23, 2017
e932850
Refactor Temperature code, pulling the circuits out of the PT100 and …
giseburt Aug 14, 2017
3f7fc88
Fix for inaccuracies that are caught by encoder corrections
giseburt Sep 13, 2017
d377b16
Added some missing setting files
ril3y Sep 16, 2017
b95992a
Merge branch 'dev-168-gquintic' of https://github.com/synthetos/g2 in…
giseburt Oct 27, 2017
10412b3
Better fault handling in max31865
giseburt Oct 27, 2017
4e482ba
Make temperature reading more tolerant
giseburt Oct 27, 2017
554de46
Update Motate reference
giseburt Oct 27, 2017
594c74d
Adjust default setings for PrintrBot Play and UM2 (testing)
giseburt Oct 27, 2017
39035a1
Attempted fix for #298 (reading nested JSON fail)
giseburt Oct 27, 2017
d6ee30f
Fix temperature readings, adjusting Ultimaker2+ settings, and make MA…
giseburt Nov 17, 2017
96ed945
Xcode Project updates
giseburt Nov 17, 2017
cb80e7b
committing anyway
aldenhart Nov 22, 2017
db13676
Committing Motate switched to sams70-port
aldenhart Nov 22, 2017
6d790ea
Update Motate link
aldenhart Nov 23, 2017
295436b
Minor changes (comments, etc)
giseburt Nov 27, 2017
6f1f27b
Update Motate reference
giseburt Nov 27, 2017
896b0b6
Refactor how Trinamic TMC2130 JSON controls are inserted in configArr…
giseburt Nov 28, 2017
c9b4e4a
Added TMC2130 settings to settings_default.h
giseburt Dec 1, 2017
e6b41a3
First pass at spring-compensation
giseburt Dec 1, 2017
d61f272
Merge commit '59a00f0d45f1092b28825579e8c6fa96a038d059' into dev-168-…
giseburt Dec 2, 2017
b44be38
Merge branch 'dev-168-gquintic' into dev-xxx-spring-comp
giseburt Dec 2, 2017
38bb76d
Fix issue where setting `{prbr:t}` (or any value) wasn't working.
giseburt Dec 2, 2017
93a0bb1
Removing testing code.
giseburt Dec 2, 2017
a0ad3a5
Remove old constant-rate stepper and related forward difference code.
giseburt Dec 2, 2017
5bafefd
Updating README with changelog (in progress)
giseburt Dec 2, 2017
1967919
Fixes for temperature settings in the various Printrbot settings
giseburt Dec 2, 2017
abd655c
Fix disambiguation of outputs to heaters on all board types.
giseburt Dec 2, 2017
5c85583
Readme updates (attempting to use details tag)
giseburt Dec 2, 2017
feb5c84
Readme updates (attempting to use details tag)
giseburt Dec 2, 2017
ef0839d
More work on the ReadMe
giseburt Dec 2, 2017
187e247
More work on the ReadMe
giseburt Dec 2, 2017
459f7c5
More work on the ReadMe
giseburt Dec 2, 2017
b70abe4
Switched from `fabs` to `std::abs` which is type-aware and safer goin…
giseburt Dec 3, 2017
d36049f
More work on the ReadMe
giseburt Dec 3, 2017
25932d5
More work on the ReadMe
giseburt Dec 3, 2017
16482dc
More work on the ReadMe
giseburt Dec 3, 2017
a68e81b
Initial support for gQuintic rev D
giseburt Dec 5, 2017
d9eed39
Minor cleanup in gpio.cpp
giseburt Dec 5, 2017
6c67e58
Removing old comments
giseburt Dec 5, 2017
4f8aa01
Adjusting the spring factor computation and configuration
giseburt Dec 8, 2017
6006574
Removing square of error in PID to increase PID reliability.
giseburt Dec 8, 2017
7329076
Merge branch 'dev-168-gquintic' into dev-307-spring-comp
giseburt Dec 8, 2017
01d3973
Reforctor of GPIO in prep of adding `ain`N and `ts`N (temperature sen…
giseburt Dec 13, 2017
7ee5850
Fixing GPIO bugs from last commit.
giseburt Dec 13, 2017
cebdab7
Update reference to Motate for SamS70 fixes
giseburt Feb 19, 2018
7dc5b96
Adjusted for latest Motate changes to SamS70 USB
giseburt Feb 19, 2018
70a3f30
Major GOIO refactor
giseburt Feb 19, 2018
193493b
Finish support for gQuintic rev D
giseburt Feb 19, 2018
c827075
Adding support for SMW3D R7 and Pendulum v2
giseburt Feb 19, 2018
3e8f443
Adjustments to Ultimaker_2_Plus
giseburt Feb 19, 2018
5ed86f8
First pass at making outN and inN configured by doutNout and dinNin r…
giseburt Feb 27, 2018
4a86b9d
Fixing gQuintic gpio configuration for new settings
giseburt Feb 27, 2018
865dd56
Add gQuadratic rev C (need to fix motors still)
giseburt Feb 27, 2018
10f69bd
Finishing touches on the qQuadratic board files (fixes to pinouts on …
giseburt Mar 1, 2018
1c35c92
Update reference to new Motate (fixes to SPI)
giseburt Mar 1, 2018
9817e0b
Finishing fixes for gQuadratic rev C
giseburt Mar 4, 2018
23194e9
Initial GPIO action refactor (incomplete)
giseburt Mar 4, 2018
02ef06a
Fix default settings.
giseburt Mar 4, 2018
9b46efb
Fix Axidraw settings
giseburt Mar 4, 2018
b833230
Finsihed adding reset, limit, and interlock event handlers
giseburt Mar 4, 2018
8a07cee
Renaming "Listener" to "Handler"
giseburt Mar 4, 2018
f2f42a3
Name collision fix with "_handler" and some code rarrangement.
giseburt Mar 4, 2018
29db380
Updated Motate reference for SamS70 USB fixes
giseburt Mar 5, 2018
f41ec45
Adjust analog inputs: cache computed value, and default to lowest res…
giseburt Mar 26, 2018
f9ac1c7
Remove leftover ifdefs
giseburt Mar 26, 2018
79a5788
Remove spring offset code
giseburt Mar 26, 2018
71e0400
Minor adjustments to GPIO
giseburt Mar 28, 2018
fc93693
gpioDigitalOutputReader -> gpioDigitalOutputWriter, and 16 instead of 14
giseburt Mar 28, 2018
57b34d1
`inM` and `outM` go to `M`=16, `ainN`->`aiN`, added `ainM`, added `ai…
giseburt Mar 29, 2018
150e322
Added `aiNain` to expose the analog pins on `ainM`
giseburt Mar 29, 2018
fed9c9e
Fixes for GPIO proxies
giseburt May 6, 2018
500aa6f
Merge branch 'dev-168-gquintic' of github.com:synthetos/g2 into dev-1…
aldenhart Jun 4, 2018
fbad7f5
Made svb300 compile
giseburt Jun 7, 2018
1cb13ba
Changed AS7 project files to include some additional files
aldenhart Jun 18, 2018
a1155a4
Merge pull request #355 from synthetos/issue-347-gpio-enhancements
giseburt Jun 18, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Motate
Submodule Motate updated 44 files
+52 −1 MotateProject/Motate.xcodeproj/project.pbxproj
+3 −1 MotateProject/Motate.xcodeproj/xcshareddata/xcschemes/ArduinoDue.xcscheme
+3 −1 MotateProject/Motate.xcodeproj/xcshareddata/xcschemes/FRDM-KL05Z.xcscheme
+3 −1 MotateProject/Motate.xcodeproj/xcshareddata/xcschemes/Motate.xcscheme
+3 −1 MotateProject/Motate.xcodeproj/xcshareddata/xcschemes/TinyG v8.xcscheme
+3 −1 MotateProject/Motate.xcodeproj/xcshareddata/xcschemes/index_kl05z.xcscheme
+3 −1 MotateProject/Motate.xcodeproj/xcshareddata/xcschemes/index_sam.xcscheme
+3 −1 MotateProject/Motate.xcodeproj/xcshareddata/xcschemes/index_xmega.xcscheme
+6 −60 MotateProject/motate/Atmel_sam3x/SamUSB.h
+47 −45 MotateProject/motate/Atmel_sam3x/motate_chip_pin_functions.h
+42 −42 MotateProject/motate/Atmel_sam_common/SamCommon.h
+42 −20 MotateProject/motate/Atmel_sam_common/SamDMA.h
+64 −45 MotateProject/motate/Atmel_sam_common/SamPins.cpp
+426 −130 MotateProject/motate/Atmel_sam_common/SamPins.h
+2 −1 MotateProject/motate/Atmel_sam_common/SamPower.cpp
+56 −31 MotateProject/motate/Atmel_sam_common/SamSPI.h
+1 −1 MotateProject/motate/Atmel_sam_common/SamServiceCall.cpp
+188 −123 MotateProject/motate/Atmel_sam_common/SamServiceCall.h
+64 −64 MotateProject/motate/Atmel_sam_common/SamTimers.cpp
+50 −46 MotateProject/motate/Atmel_sam_common/SamTimers.h
+8 −8 MotateProject/motate/Atmel_sam_common/SamUART.h
+1 −1 MotateProject/motate/Atmel_sam_common/SamUniqueID.cpp
+5 −1 MotateProject/motate/Atmel_sams70/SamUSB.cpp
+287 −151 MotateProject/motate/Atmel_sams70/SamUSB.h
+115 −96 MotateProject/motate/Atmel_sams70/motate_chip_pin_functions.h
+71 −13 MotateProject/motate/Motate.mk
+38 −5 MotateProject/motate/MotateBuffer.h
+1 −1 MotateProject/motate/MotateDebug.h
+407 −13 MotateProject/motate/MotatePins.h
+43 −11 MotateProject/motate/MotateSPI.h
+10 −12 MotateProject/motate/MotateUSB.h
+9 −5 MotateProject/motate/MotateUSBCDC.h
+5 −0 MotateProject/motate/MotateUtilities.h
+1 −1 MotateProject/motate/arch/arm.mk
+4 −2 MotateProject/motate/cmsis/TARGET_Atmel/linker_scripts/sam3x/sam3x8/gcc/flash.ld
+28 −4 MotateProject/motate/cmsis/TARGET_Atmel/linker_scripts/sams70/sams70n19/gcc/flash.ld
+174 −0 MotateProject/motate/cmsis/TARGET_Atmel/linker_scripts/sams70/sams70n19/gcc/flash_notcm.ld
+90 −3 MotateProject/motate/cmsis/TARGET_Atmel/sams70/source/templates/gcc/startup_sams70.c
+5 −0 MotateProject/motate/platform/atmel_ice.gdb
+9 −2 MotateProject/motate/platform/atmel_sam.mk
+3 −0 MotateProject/motate/platform/jlink.gdb
+44 −18 Tools/Makefile
+47 −1 Tools/Tools.xcodeproj/project.pbxproj
+3 −1 Tools/Tools.xcodeproj/xcshareddata/xcschemes/Tools.xcscheme
302 changes: 119 additions & 183 deletions README.md

Large diffs are not rendered by default.

99 changes: 98 additions & 1 deletion Resources/debug/mb.gdb
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ set logging overwrite on
set logging redirect on
set logging file mb.txt
set logging on
print sizeof(mb.bf)/sizeof(mb.bf[0])
print mb.r
print mb.w
print mp.p
print mp.c
# generated with:
# node -e 'for (i=0; i<48;i++) {console.log("print &mb.bf["+i+"]\nprint mb.bf["+i+"]");}'
# node -e 'for (i=0; i<96;i++) {console.log("print &mb.bf["+i+"]\nprint mb.bf["+i+"]");}'
print &mb.bf[0]
print mb.bf[0]
print &mb.bf[1]
Expand Down Expand Up @@ -105,5 +106,101 @@ print &mb.bf[46]
print mb.bf[46]
print &mb.bf[47]
print mb.bf[47]
print &mb.bf[48]
print mb.bf[48]
print &mb.bf[49]
print mb.bf[49]
print &mb.bf[50]
print mb.bf[50]
print &mb.bf[51]
print mb.bf[51]
print &mb.bf[52]
print mb.bf[52]
print &mb.bf[53]
print mb.bf[53]
print &mb.bf[54]
print mb.bf[54]
print &mb.bf[55]
print mb.bf[55]
print &mb.bf[56]
print mb.bf[56]
print &mb.bf[57]
print mb.bf[57]
print &mb.bf[58]
print mb.bf[58]
print &mb.bf[59]
print mb.bf[59]
print &mb.bf[60]
print mb.bf[60]
print &mb.bf[61]
print mb.bf[61]
print &mb.bf[62]
print mb.bf[62]
print &mb.bf[63]
print mb.bf[63]
print &mb.bf[64]
print mb.bf[64]
print &mb.bf[65]
print mb.bf[65]
print &mb.bf[66]
print mb.bf[66]
print &mb.bf[67]
print mb.bf[67]
print &mb.bf[68]
print mb.bf[68]
print &mb.bf[69]
print mb.bf[69]
print &mb.bf[70]
print mb.bf[70]
print &mb.bf[71]
print mb.bf[71]
print &mb.bf[72]
print mb.bf[72]
print &mb.bf[73]
print mb.bf[73]
print &mb.bf[74]
print mb.bf[74]
print &mb.bf[75]
print mb.bf[75]
print &mb.bf[76]
print mb.bf[76]
print &mb.bf[77]
print mb.bf[77]
print &mb.bf[78]
print mb.bf[78]
print &mb.bf[79]
print mb.bf[79]
print &mb.bf[80]
print mb.bf[80]
print &mb.bf[81]
print mb.bf[81]
print &mb.bf[82]
print mb.bf[82]
print &mb.bf[83]
print mb.bf[83]
print &mb.bf[84]
print mb.bf[84]
print &mb.bf[85]
print mb.bf[85]
print &mb.bf[86]
print mb.bf[86]
print &mb.bf[87]
print mb.bf[87]
print &mb.bf[88]
print mb.bf[88]
print &mb.bf[89]
print mb.bf[89]
print &mb.bf[90]
print mb.bf[90]
print &mb.bf[91]
print mb.bf[91]
print &mb.bf[92]
print mb.bf[92]
print &mb.bf[93]
print mb.bf[93]
print &mb.bf[94]
print mb.bf[94]
print &mb.bf[95]
print mb.bf[95]
set logging off
shell python ../Resources/debug/mb_analyze.py mb.txt
76 changes: 45 additions & 31 deletions Resources/debug/mb_analyze.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
import sys

STATES = {
0 : 'EMPTY',
1 : 'PLANNING',
2 : 'QUEUED',
3 : 'PENDING',
4 : 'RUNNING'
0: 'EMPTY',
1: 'PLANNING',
2: 'QUEUED',
3: 'PENDING',
4: 'RUNNING'
}

TUMBLER = ['r', 'w', 'p', 'c']
TUMBLER = ['size', 'r', 'w', 'p', 'c']


def load_pool(filename):
Expand All @@ -25,8 +25,15 @@ def load_pool(filename):
if buf:
current_buffer = int(buf.groups()[0], 16)
pool[TUMBLER[tumbler_pos]] = current_buffer
print "TUMBLER[tumbler_pos]: %s=%i" % (TUMBLER[tumbler_pos], current_buffer)
tumbler_pos += 1
print 'TUMBLER[tumbler_pos]: %s=%d' % (
TUMBLER[tumbler_pos], current_buffer
)
else:
buf = re.search(' = ([0-9]+)', line)
current_buffer = int(buf.groups()[0], 10)
pool[TUMBLER[tumbler_pos]] = current_buffer

tumbler_pos += 1
else:
buf = re.search('\(mpBuf_t\s\*\)\s(0x[0-9a-fA-F]+)', line)
if buf:
Expand All @@ -42,7 +49,9 @@ def load_pool(filename):
if current_buffer == pool['c']:
pool[current_buffer]['is_c'] = True
else:
match = re.search('([a-zA-Z_]+)\s=\s((?:0x[0-9a-fA-F]+|[0-9.]+(?:e[-+][0-9]+)?|[A-Z_]+)|true|false)', line)
match = re.search('([a-zA-Z_]+)\s=\s((?:0x[0-9a-fA-F]+|'
'[0-9.]+(?:e[-+][0-9]+)?|[A-Z_]+)|true|'
'false)', line)
if match:
# print "current_buffer: %s" % current_buffer
key, val = match.groups()
Expand Down Expand Up @@ -85,6 +94,7 @@ def load_pool(filename):
pool[current_buffer]['iterations'] = val
return pool


def check_integrity(pool):
key = pool.keys()[0]
buffers = set()
Expand All @@ -97,14 +107,16 @@ def check_integrity(pool):

count += 1

if count != 48:
if count != pool['size']:
raise Exception("Buffer pool integrity is bad.")


def check_pool(filename):
pool = load_pool(filename)
check_integrity(pool)
return pool


def print_pool(pool):
for key in sorted(pool.keys()):
buffer = pool[key]
Expand Down Expand Up @@ -141,27 +153,29 @@ def print_pool(pool):
else:
junction_str = "!"

print '0x%08x [%02d] : N%04d (%02dx) %-22s %-8s L% 8.2f Ti% 8.2f C% 10.2f %1s[% 10.2f] X% 10.2f %1s[% 10.2f] J%1s% 10.2f %5s %20s (%5.2f)' % (
key,
float(buffer['buffer_number']),
float(buffer['linenum']),
int(buffer['iterations']),
buffer['buffer_state'].strip(),
pointer,
float(buffer['length']),
float(buffer['move_time']),
float(buffer['cruise_velocity']),
cruise_str,
float(buffer['cruise_vmax']),
float(buffer['exit_velocity']),
exit_str,
float(buffer['exit_vmax']),
junction_str,
float(buffer['junction_vmax']),
buffer['plannable'],
buffer['hint'],
float(buffer['jerk'])/1000000.0
)
print '0x%08x [%02d] : N%06d (%02dx) %-22s %-8s L% 8.2f Ti% 8.2f '\
'C% 10.2f %1s[% 10.2f] X% 10.2f %1s[% 10.2f] J%1s% 10.2f ' \
'%5s %20s (%5.2f)' % (
key,
float(buffer['buffer_number']), # []
float(buffer['linenum']), # N
int(buffer['iterations']), # ()
buffer['buffer_state'].strip(),
pointer, # (w,p,r)
float(buffer['length']), # L
float(buffer['move_time']), # Ti
float(buffer['cruise_velocity']), # C
cruise_str,
float(buffer['cruise_vmax']),
float(buffer['exit_velocity']), # X
exit_str,
float(buffer['exit_vmax']),
junction_str, # J
float(buffer['junction_vmax']),
buffer['plannable'],
buffer['hint'],
float(buffer['jerk'])/1000000.0
)

if __name__ == "__main__":
pool = check_pool(sys.argv[1])
Expand Down
38 changes: 38 additions & 0 deletions Resources/generate_motors_cfgArray.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/usr/bin/env node

// Run this with no arguments, and get the motor code suitable for use in config_app.cpp

for (n=1; n<=6; n++) {
console.log(`
#if (MOTORS >= ${n})
{ "${n}","${n}ma", _fip, 0, st_print_ma, get_ui8, st_set_ma, (float *)&st_cfg.mot[MOTOR_${n}].motor_map, M${n}_MOTOR_MAP },
{ "${n}","${n}sa", _fip, 3, st_print_sa, get_flt, st_set_sa, (float *)&st_cfg.mot[MOTOR_${n}].step_angle, M${n}_STEP_ANGLE },
{ "${n}","${n}tr", _fipc, 4, st_print_tr, get_flt, st_set_tr, (float *)&st_cfg.mot[MOTOR_${n}].travel_rev, M${n}_TRAVEL_PER_REV },
{ "${n}","${n}mi", _fip, 0, st_print_mi, get_int, st_set_mi, (float *)&st_cfg.mot[MOTOR_${n}].microsteps, M${n}_MICROSTEPS },
{ "${n}","${n}su", _fipi, 5, st_print_su, st_get_su,st_set_su, (float *)&st_cfg.mot[MOTOR_${n}].steps_per_unit, M${n}_STEPS_PER_UNIT },
{ "${n}","${n}po", _fip, 0, st_print_po, get_ui8, set_01, (float *)&st_cfg.mot[MOTOR_${n}].polarity, M${n}_POLARITY },
{ "${n}","${n}pm", _fip, 0, st_print_pm, st_get_pm,st_set_pm, (float *)&cs.null, M${n}_POWER_MODE },
{ "${n}","${n}pl", _fip, 3, st_print_pl, get_flt, st_set_pl, (float *)&st_cfg.mot[MOTOR_${n}].power_level, M${n}_POWER_LEVEL },
// { "${n}","${n}pi", _fip, 3, st_print_pi, get_flt, st_set_pi, (float *)&st_cfg.mot[MOTOR_${n}].power_idle, M${n}_POWER_IDLE },
// { "${n}","${n}mt", _fip, 2, st_print_mt, get_flt, st_set_mt, (float *)&st_cfg.mot[MOTOR_${n}].motor_timeout, M${n}_MOTOR_TIMEOUT },
#ifdef MOTOR_${n}_IS_TRINAMIC
{ "${n}","${n}ts", _f0, 0, tx_print_nul, motor_${n}.get_ts_fn, set_ro, (float *)&motor_${n}, 0 },
{ "${n}","${n}pth", _fip, 0, tx_print_nul, motor_${n}.get_pth_fn, motor_${n}.set_pth_fn, (float *)&motor_${n}, M${n}_TMC2130_TPWMTHRS },
{ "${n}","${n}cth", _fip, 0, tx_print_nul, motor_${n}.get_cth_fn, motor_${n}.set_cth_fn, (float *)&motor_${n}, M${n}_TMC2130_TCOOLTHRS },
{ "${n}","${n}hth", _fip, 0, tx_print_nul, motor_${n}.get_hth_fn, motor_${n}.set_hth_fn, (float *)&motor_${n}, M${n}_TMC2130_THIGH },
{ "${n}","${n}sgt", _fip, 0, tx_print_nul, motor_${n}.get_sgt_fn, motor_${n}.set_sgt_fn, (float *)&motor_${n}, M${n}_TMC2130_SGT },
{ "${n}","${n}sgr", _f0, 0, tx_print_nul, motor_${n}.get_sgr_fn, set_ro, (float *)&motor_${n}, 0 },
{ "${n}","${n}csa", _f0, 0, tx_print_nul, motor_${n}.get_csa_fn, set_ro, (float *)&motor_${n}, 0 },
{ "${n}","${n}sgs", _f0, 0, tx_print_nul, motor_${n}.get_sgs_fn, set_ro, (float *)&motor_${n}, 0 },
{ "${n}","${n}tbl", _fip, 0, tx_print_nul, motor_${n}.get_tbl_fn, motor_${n}.set_tbl_fn, (float *)&motor_${n}, M${n}_TMC2130_TBL },
{ "${n}","${n}pgrd",_fip, 0, tx_print_nul, motor_${n}.get_pgrd_fn,motor_${n}.set_pgrd_fn, (float *)&motor_${n}, M${n}_TMC2130_PWM_GRAD },
{ "${n}","${n}pamp",_fip, 0, tx_print_nul, motor_${n}.get_pamp_fn,motor_${n}.set_pamp_fn, (float *)&motor_${n}, M${n}_TMC2130_PWM_AMPL },
{ "${n}","${n}hend",_fip, 0, tx_print_nul, motor_${n}.get_hend_fn,motor_${n}.set_hend_fn, (float *)&motor_${n}, M${n}_TMC2130_HEND },
{ "${n}","${n}hsrt",_fip, 0, tx_print_nul, motor_${n}.get_hsrt_fn,motor_${n}.set_hsrt_fn, (float *)&motor_${n}, M${n}_TMC2130_HSTRT },
{ "${n}","${n}smin",_fip, 0, tx_print_nul, motor_${n}.get_smin_fn,motor_${n}.set_smin_fn, (float *)&motor_${n}, M${n}_TMC2130_SMIN },
{ "${n}","${n}smax",_fip, 0, tx_print_nul, motor_${n}.get_smax_fn,motor_${n}.set_smax_fn, (float *)&motor_${n}, M${n}_TMC2130_SMAX },
{ "${n}","${n}sup", _fip, 0, tx_print_nul, motor_${n}.get_sup_fn, motor_${n}.set_sup_fn, (float *)&motor_${n}, M${n}_TMC2130_SUP },
{ "${n}","${n}sdn", _fip, 0, tx_print_nul, motor_${n}.get_sdn_fn, motor_${n}.set_sdn_fn, (float *)&motor_${n}, M${n}_TMC2130_SDN },
#endif
#endif`);
}
50 changes: 50 additions & 0 deletions Resources/generate_motors_default_config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#!/usr/bin/env node

// Run this with no arguments, and get the motor code suitable for use in config_app.cpp

console.log('// START Generated with ${PROJECT_ROOT}/Resources/generate_motors_default_config.js');
for (n=1; n<=6; n++) {
console.log(
`#ifndef M${n}_TMC2130_TPWMTHRS
#define M${n}_TMC2130_TPWMTHRS 1200 // ${n}pth
#endif
#ifndef M${n}_TMC2130_TCOOLTHRS
#define M${n}_TMC2130_TCOOLTHRS 1000 // ${n}cth
#endif
#ifndef M${n}_TMC2130_THIGH
#define M${n}_TMC2130_THIGH 10 // ${n}hth
#endif
#ifndef M${n}_TMC2130_SGT
#define M${n}_TMC2130_SGT 4 // ${n}sgt
#endif
#ifndef M${n}_TMC2130_TBL
#define M${n}_TMC2130_TBL 2 // ${n}tbl
#endif
#ifndef M${n}_TMC2130_PWM_GRAD
#define M${n}_TMC2130_PWM_GRAD 1 // ${n}pgrd
#endif
#ifndef M${n}_TMC2130_PWM_AMPL
#define M${n}_TMC2130_PWM_AMPL 200 // ${n}pamp
#endif
#ifndef M${n}_TMC2130_HEND
#define M${n}_TMC2130_HEND 0 // ${n}hend
#endif
#ifndef M${n}_TMC2130_HSTRT
#define M${n}_TMC2130_HSTRT 0 // ${n}hsrt
#endif
#ifndef M${n}_TMC2130_SMIN
#define M${n}_TMC2130_SMIN 5 // ${n}smin
#endif
#ifndef M${n}_TMC2130_SMAX
#define M${n}_TMC2130_SMAX 5 // ${n}smax
#endif
#ifndef M${n}_TMC2130_SUP
#define M${n}_TMC2130_SUP 2 // ${n}sup
#endif
#ifndef M${n}_TMC2130_SDN
#define M${n}_TMC2130_SDN 1 // ${n}sdn
#endif
`
);
}
console.log('// END Generated');
Loading