Michael Moon [Sun, 10 Feb 2013 01:20:59 +0000 (12:20 +1100)]
ConfigValue: remove redundant as_pin and as_pwm methods
Michael Moon [Sat, 9 Feb 2013 14:05:21 +0000 (01:05 +1100)]
Pwm: use underlying pin; Switch: static Pwm
Michael Moon [Sat, 9 Feb 2013 14:00:00 +0000 (01:00 +1100)]
Stepper: remove redundant Pin pointers
Michael Moon [Sat, 9 Feb 2013 13:56:59 +0000 (00:56 +1100)]
Endstops: static Pins
Michael Moon [Sat, 9 Feb 2013 13:54:24 +0000 (00:54 +1100)]
TemperatureControl: static Pins
Michael Moon [Sat, 9 Feb 2013 13:49:42 +0000 (00:49 +1100)]
Extruder: static Pins
Michael Moon [Sat, 9 Feb 2013 13:46:03 +0000 (00:46 +1100)]
PauseButton: static Pins
Michael Moon [Sat, 9 Feb 2013 13:44:05 +0000 (00:44 +1100)]
Robot: static Pins
Ben Gamari [Sat, 9 Feb 2013 03:09:41 +0000 (19:09 -0800)]
Merge pull request #98 from bgamari/fixes
Gcode: Again ensure no allocations occur
Ben Gamari [Sat, 9 Feb 2013 03:05:25 +0000 (22:05 -0500)]
Gcode: Again ensure no allocations occur
For some reason `const char std::string::operator[]` still assumes that
things might be mutated. `const char& operator[]`, on the other hand,
appears to do the right thing. I'll admit that this is evidence that
`std::string` is just too subtle here. Perhaps a homebrew string type is
in order.
Adam Green [Fri, 8 Feb 2013 23:43:07 +0000 (15:43 -0800)]
Reorganized members in Pin class to save 4 bytes.
Drops sizeof(Pin) down from 12 bytes per Pin to 8 bytes per Pin.
Ben Gamari [Thu, 7 Feb 2013 04:04:24 +0000 (20:04 -0800)]
Merge pull request #94 from bgamari/fixes
Gcode: Ensure std::string operations don't incur allocations
Ben Gamari [Thu, 7 Feb 2013 03:59:05 +0000 (22:59 -0500)]
Gcode: Ensure std::string operations don't incur allocations
Adam Green [Thu, 7 Feb 2013 03:01:50 +0000 (19:01 -0800)]
_sbrk() check for overflow past MSP.
Make sure that a dynamic memory allocation won't exceed the current top
of stack. It is still possible for stack to grow down into heap.
Michael Moon [Wed, 6 Feb 2013 08:28:29 +0000 (19:28 +1100)]
USB: ensure Connect pin is set up before disconnect delay
Michael Moon [Wed, 6 Feb 2013 08:03:54 +0000 (19:03 +1100)]
USB: work around OSX behaviour where if the device disconnects and quickly reconnects, it assumes it's the same device instead of checking
Michael Moon [Mon, 4 Feb 2013 15:14:37 +0000 (02:14 +1100)]
Module Events: remove on_stepper_wake_up event as it was unused
Michael Moon [Wed, 6 Feb 2013 00:30:12 +0000 (11:30 +1100)]
Module: don't sign all modules up for ON_CONFIG_RELOAD- they don't all use the event.
Michael Moon [Wed, 23 Jan 2013 04:14:16 +0000 (15:14 +1100)]
Module: use macros for event definitions to ensure consistency
Michael Moon [Wed, 6 Feb 2013 00:17:32 +0000 (11:17 +1100)]
USB: run USB stack from idle event instead of via interrupts
Michael Moon [Wed, 6 Feb 2013 00:16:22 +0000 (11:16 +1100)]
SDCard: implement busy flag
Arthur Wolf [Tue, 5 Feb 2013 22:02:14 +0000 (23:02 +0100)]
Merge branch 'edge' of github.com:arthurwolf/Smoothie into edge
Arthur Wolf [Tue, 5 Feb 2013 21:59:37 +0000 (22:59 +0100)]
added max_pwm to temperaturecontrol
Adam Green [Tue, 5 Feb 2013 08:52:48 +0000 (00:52 -0800)]
Remove iprintf() call from spi.cpp
People were noticing that MRI was halting and waiting for GDB to attach
immediately at startup when configured for full debugging mode. This
was because output was being sent to stdout and MRI was waiting to
redirect it to GDB's console. I tracked this down to an
iprintf("\n") call in spi.cpp so I commented it out like the rest of
the iprintf() calls in this file.
Adam Green [Tue, 5 Feb 2013 08:31:27 +0000 (00:31 -0800)]
Accept outside ENABLE_DEBUG_MONITOR settings.
You can now specify ENABLE_DEBUG_MONITOR setting from outside the
makefile and it will only be set to 0 if another value wasn't
provided on the make command line or environment variable. This allows
it to be specified in builds kicked off from Eclipse.
Arthur Wolf [Sun, 3 Feb 2013 18:38:30 +0000 (19:38 +0100)]
adding info about junction_deviation
Arthur Wolf [Sun, 3 Feb 2013 18:35:28 +0000 (19:35 +0100)]
adding junction_deviation to config file
Arthur Wolf [Sun, 3 Feb 2013 18:25:35 +0000 (19:25 +0100)]
Merge branch 'edge' of github.com:arthurwolf/Smoothie into edge
Arthur Wolf [Sun, 3 Feb 2013 18:25:25 +0000 (19:25 +0100)]
removing max_jerk from Planner too
Arthur Wolf [Sun, 3 Feb 2013 18:23:44 +0000 (19:23 +0100)]
max_jerk was unused, removing
Michael Moon [Sun, 3 Feb 2013 02:55:18 +0000 (13:55 +1100)]
USB: silence warning when debug output is disabled
Michael Moon [Sun, 3 Feb 2013 02:53:33 +0000 (13:53 +1100)]
Alter USB descriptors and windows INF driver to have the same manufacturer- perhaps this will help with driver installation?
Michael Moon [Sun, 3 Feb 2013 02:16:11 +0000 (13:16 +1100)]
MRI Hooks: remember previous state, programmatically construct pin lists from TemperatureControl, StepperMotor and Switch
Arthur Wolf [Sat, 2 Feb 2013 22:34:45 +0000 (23:34 +0100)]
speed did not get reset between SOLO blocks in Extruder, fixing
Arthur Wolf [Sat, 2 Feb 2013 21:08:15 +0000 (22:08 +0100)]
Merge branch 'edge' of github.com:arthurwolf/Smoothie into edge
Arthur Wolf [Sat, 2 Feb 2013 21:07:57 +0000 (22:07 +0100)]
Extruder now reacts to G90 and G91
Adam Green [Sat, 2 Feb 2013 07:03:49 +0000 (23:03 -0800)]
Set SDCard::_cs pin to be an output.
Smoothie didn't work with my 16GB SD card and it turns out that the
chip select GPIO pin wasn't being set to output mode.
Arthur Wolf [Fri, 1 Feb 2013 22:51:41 +0000 (23:51 +0100)]
adding current_block = NULL in player.cpp, johaness fix
Adam Green [Fri, 1 Feb 2013 07:58:33 +0000 (23:58 -0800)]
Add OS X binaries for dfu-util and lpc21isp
I built these to use them on my MacBook Air with the Smoothie project
so I thought others might find it useful to have them as well.
They will be placed in the path by the default BuildShell script that
is created when install scripts are run.
Adam Green [Fri, 1 Feb 2013 07:40:13 +0000 (23:40 -0800)]
Easier to configure MRI in makefile.
The default mode for MRI's usage in Smoothie is the same as before
where it only executes if a crash is encountered and isn't really
useable for things like single stepping, etc.
Now you can change the ENABLE_DEBUG_MONITOR make variable from 0 to 1
and it will switch MRI into a fuller debug experience where it takes
over UART0 and stops at init so that you have an opportunity to set
any breakpoints you might be interested in.
Ben Gamari [Thu, 31 Jan 2013 20:57:17 +0000 (12:57 -0800)]
Merge pull request #91 from bgamari/edge
Ensure that C++11 checksum is evaluated at compile-time
Ben Gamari [Thu, 31 Jan 2013 20:53:52 +0000 (15:53 -0500)]
Ensure that C++11 checksum is evaluated at compile-time
Wrapping the expression in an std::integral_constant<> seems to do the
right thing, even with no optimization.
Unfortunately, it seems that gcc 4.6 doesn't support user-defined string
literals, so we'll need to wait until we start building with 4.7 before
enabling this.
Adam Green [Thu, 31 Jan 2013 08:04:47 +0000 (00:04 -0800)]
Make checksum macros work in non-optimized builds.
Previously the checksum macros would bloat the code because the inline math to
calculate the checksums were not constant folded in -O0 builds. This commit
modifies the CHECKSUM() macro to just call get_checksum() instead in such
builds.
The fact that checksums are no longer constant expressions in non-optimized
builds means that they can't be used as case labels in switch statements. I
modified the affected switch statements to use if / else if statements instead.
Adam Green [Thu, 31 Jan 2013 07:28:31 +0000 (23:28 -0800)]
Add bgamari's C++11 checksumming approach.
I haved added bgamari's cool C++11 user defined literals approach. In simple
cases it generates the exact same code as the C preprocessor approach but if
multiple checkums are calculated in the same function, I see the constant
folding not happening for some which makes the code even larger than just
having the string in the code. For this reason I have disabled it for now but
left it in so that it is easy to test out in the future and hopefully switch
to as its implementation is much shorter and clearer.
Maybe just an issue in GCC as these features are new or maybe there is an
optimizer setting that needs to be set. I tried GCC 4.7 from
https://launchpad.net/gcc-arm-embedded/+milestone/4.7-2012-q4-major
Adam Green [Thu, 31 Jan 2013 07:09:14 +0000 (23:09 -0800)]
Merge branch 'edge' into checksum_macro
Arthur Wolf [Wed, 30 Jan 2013 09:50:27 +0000 (10:50 +0100)]
https://gist.github.com/
4671861 : using on_idle instead of on_main_loop caused everything to go way too deep
Adam Green [Wed, 30 Jan 2013 05:20:59 +0000 (21:20 -0800)]
Calculate Fletcher Checksums at compile time from string.
You can now just call CHECKSUM macro like the following to have the checksum
calculated for you at compile time:
#define enable_checksum CHECKSUM("enable")
This uses a set of recursive macros from src/libs/checksumm.h to inline the
checksum calculation and then the compiler uses constant folding in optimized
builds (-O1 or higher) to pre-calculate the values.
NOTE: The macros in checksumm.h currently only support a maximum string length
of 32 characters. If you exceed this, the macros will return a fixed value
of 0xFFFF which won't match your string. You should keep your
checksummed strings below this length.
I took a copy of main.bin from before I starting making these changes and then
kept running builds and verifying that the new main.bin was exactly the same
as the original. This means that it created the same checksums and didn't grow
the binary size at all.
Arthur Wolf [Mon, 28 Jan 2013 19:28:08 +0000 (20:28 +0100)]
the laser module now will not take the p21 pin, unless enabled. that was just silly. fixed
Arthur Wolf [Mon, 28 Jan 2013 17:13:01 +0000 (18:13 +0100)]
adding support for (comments)
Adam Green [Mon, 28 Jan 2013 04:43:06 +0000 (20:43 -0800)]
Demangle C++ names in main.disasm.
Thanks to wolfmanjm on IRC for pointing out that I wasn't already doing this.
Ben Gamari [Thu, 24 Jan 2013 16:33:19 +0000 (08:33 -0800)]
Merge pull request #87 from bgamari/edge
StreamOutput: Mark printf with __attribute__((format))
Ben Gamari [Thu, 24 Jan 2013 16:30:51 +0000 (11:30 -0500)]
StreamOutput: Mark printf with __attribute__((format))
This allows the compiler to throw useful warnings.
Michael Moon [Thu, 24 Jan 2013 15:54:12 +0000 (02:54 +1100)]
StreamOutput: printf calls virtual puts so we can reduce code reuse elsewhere
StreamOutputPool: ditch printf, implement puts which distributes to each Stream's puts
Michael Moon [Thu, 24 Jan 2013 14:50:34 +0000 (01:50 +1100)]
USBSerial: marshall attach/detach operations to idle event
Adam Green [Thu, 24 Jan 2013 14:18:04 +0000 (06:18 -0800)]
Catch dynamic de/allocations in ISRs.
Arthur Wolf [Thu, 24 Jan 2013 14:04:23 +0000 (15:04 +0100)]
removing get_value from laser too
Arthur Wolf [Thu, 24 Jan 2013 14:01:43 +0000 (15:01 +0100)]
removing a get_value from switch
Arthur Wolf [Thu, 24 Jan 2013 10:17:30 +0000 (11:17 +0100)]
added make dfu, need to merge with existing upload
arthurwolf [Wed, 23 Jan 2013 13:58:54 +0000 (05:58 -0800)]
Merge pull request #86 from bgamari/edge
Sundry fixes
Ben Gamari [Wed, 23 Jan 2013 05:04:37 +0000 (00:04 -0500)]
Gcode: Use const_cast to silence warning
Ben Gamari [Wed, 23 Jan 2013 05:03:53 +0000 (00:03 -0500)]
Gcode: Use operator[] instead of string::at to avoid allocation
Not entire sure why string::at allocates, but we don't need bounds
checking regardless. Perhaps this is due to const-ness?
Ben Gamari [Tue, 22 Jan 2013 04:39:44 +0000 (23:39 -0500)]
Kernel: Use vector<array<Module*>> instead of flat array
As it turns out ON_CONFIG_RELOAD filled the previous array size of 32
entries. Using vector<array<...>> here does incur a memory indirection,
which Arthur rightly points out will have a performance penalty in a hot
path. That being said, we'll use this for now. Eventually it might make
sense to move to array<array<...>> with a sufficiently large size.
Michael Moon [Wed, 23 Jan 2013 02:42:49 +0000 (13:42 +1100)]
use MRI hooks to disable heaters in debug mode
Adam Green [Tue, 22 Jan 2013 02:18:48 +0000 (18:18 -0800)]
Add __mriPlatform_EnteringDebuggerHook() and __mriPlatform_LeavingDebuggerHook() to MRI.
Upgrades to version 0.5 of MRI.
A debuggee can implement these "C" hook routines to be called when MRI enters and
leaves a debug exception to do cleanup such as turn off heaters so that they
don't remain on while sitting in the debugger.
NOTE: You can assume very little about the state of your program from these
routines. I recommend that they be written in low level C code. It
isn't even safe to assume that C++ global constructors have been run
before these routines are called.
Example which just toggles a LED on while in debug exception:
extern "C" void __mriPlatform_EnteringDebuggerHook(void)
{
LPC_GPIO1->FIODIR |= 1 << 18;
LPC_GPIO1->FIOPIN |= 1 << 18;
}
extern "C" void __mriPlatform_LeavingDebuggerHook(void)
{
LPC_GPIO1->FIODIR |= 1 << 18;
LPC_GPIO1->FIOPIN &= ~(1 << 18);
}
Michael Moon [Mon, 21 Jan 2013 23:25:25 +0000 (10:25 +1100)]
Merge bgamari/median into edge
Ben Gamari [Sun, 13 Jan 2013 18:28:55 +0000 (13:28 -0500)]
TemperatureControl: Use median smoothing instead of mean
Arthur Wolf [Sun, 20 Jan 2013 20:08:56 +0000 (21:08 +0100)]
added make dfu
Michael Moon [Sun, 20 Jan 2013 03:49:28 +0000 (14:49 +1100)]
Secret Sauce for windows to activate the driver it comes installed with
Michael Moon [Fri, 18 Jan 2013 03:44:08 +0000 (14:44 +1100)]
TemperatureControl: PID resets I to 0 if output exceeds bounds to reduce anti-windup effect
Michael Moon [Fri, 18 Jan 2013 03:07:56 +0000 (14:07 +1100)]
SlowTicker: implement G4 pause
Michael Moon [Fri, 18 Jan 2013 03:07:07 +0000 (14:07 +1100)]
Gcode: get_int method to shortcut string->float->int conversion
Michael Moon [Fri, 18 Jan 2013 03:06:13 +0000 (14:06 +1100)]
utils: is_alpha, is_digit, is_numeric, is_alphanum, is_whitespace utility functions
Michael Moon [Wed, 16 Jan 2013 17:51:02 +0000 (04:51 +1100)]
Extruder: make sure we have a block to release, avoid segfaults
Michael Moon [Wed, 16 Jan 2013 16:30:20 +0000 (03:30 +1100)]
USB DFU: keep usb connected while we respond to reset request.
we also become a kernel module so we can receive the on idle event. This would be an ideal place to do shutdown tasks, eg save position somewhere
Michael Moon [Wed, 16 Jan 2013 02:40:35 +0000 (13:40 +1100)]
Robot: remove unused variable
Arthur Wolf [Thu, 17 Jan 2013 23:20:23 +0000 (00:20 +0100)]
version change
Ben Gamari [Tue, 15 Jan 2013 16:54:01 +0000 (08:54 -0800)]
Merge pull request #83 from bgamari/fixes
Some of these are small changes extracted from @triffid's std::string -> char* conversion which are worth on their own. Each patch is small, self-contained, and hopefully pretty non-controversial.
Ben Gamari [Sun, 13 Jan 2013 21:41:59 +0000 (16:41 -0500)]
SerialConsole: reserve a reasonably sized buffer
Ben Gamari [Sun, 13 Jan 2013 21:40:34 +0000 (16:40 -0500)]
utils: Make string utils const where possible
This will help prevent unnecessary allocations
Ben Gamari [Tue, 8 Jan 2013 23:32:54 +0000 (18:32 -0500)]
Endstops: Fix whitespace
Ben Gamari [Tue, 8 Jan 2013 23:04:30 +0000 (18:04 -0500)]
CircBuffer: Add peek()
Ben Gamari [Tue, 8 Jan 2013 23:03:07 +0000 (18:03 -0500)]
Kernel: Use bzero instead of loop
Michael Moon [Tue, 15 Jan 2013 08:20:39 +0000 (19:20 +1100)]
Robot: add M220 speed override percentage, ala Marlin et al.
M220 S100 = normal speed, M220 S200 = double speed, M220 S50 = half speed, etc.
Axis limits are still obeyed to avoid skipped steps with ludicrous numbers, and a 1% minimum is enforced in case of accidental mis-keying and also to prevent the block queue locking up.
There is no maximum ;)
Michael Moon [Tue, 15 Jan 2013 05:14:11 +0000 (16:14 +1100)]
TemperatureControl: increase default I_MAX to PWM_MAX so marginally strong heaters have a chance to achieve temperature
Michael Moon [Tue, 15 Jan 2013 04:24:28 +0000 (15:24 +1100)]
TemperatureControl: honor readings_per_second configuration option
Michael Moon [Tue, 15 Jan 2013 05:12:47 +0000 (16:12 +1100)]
Merge branch 'feature/on_second_tick_event' into edge
Michael Moon [Tue, 15 Jan 2013 04:23:54 +0000 (15:23 +1100)]
TemperatureControl: report temperatures every second while waiting for warmup
Michael Moon [Tue, 15 Jan 2013 04:22:35 +0000 (15:22 +1100)]
move on_second_tick callout to on_idle event, also provide a flag to detect interrupt context
Michael Moon [Tue, 8 Jan 2013 11:49:21 +0000 (22:49 +1100)]
Events: add ON_SECOND_TICK event that fires once per second. Also finish moving event stuff to Module.{h,cpp} so it's all in one place
Michael Moon [Tue, 15 Jan 2013 01:48:23 +0000 (12:48 +1100)]
USB: ensure interrupts are disabled while getting LPC serial number
Michael Moon [Tue, 15 Jan 2013 04:58:05 +0000 (15:58 +1100)]
Merge branch 'fix/gcode_freed_while_in_queue' into edge
Michael Moon [Tue, 15 Jan 2013 04:37:23 +0000 (15:37 +1100)]
allocate Gcode objects on the heap, don't clean them up until the related block becomes unused
Michael Moon [Sun, 6 Jan 2013 01:17:09 +0000 (12:17 +1100)]
makefile: flash target to use defined console, and correct crystal frequency
Michael Moon [Sun, 6 Jan 2013 00:53:48 +0000 (11:53 +1100)]
looks like clear_vector_double might be broken, trying clear_vector instead
Michael Moon [Sun, 6 Jan 2013 00:38:08 +0000 (11:38 +1100)]
bare G92 by itself should behave now
Reported-by: Ben Gamari <bgamari.foss@gmail.com>
Michael Moon [Thu, 3 Jan 2013 10:56:50 +0000 (21:56 +1100)]
Merge branch 'feature/extra-usbserial-interface' into edge
Michael Moon [Thu, 3 Jan 2013 10:52:14 +0000 (21:52 +1100)]
another USBSerial interface
Michael Moon [Thu, 3 Jan 2013 10:50:27 +0000 (21:50 +1100)]
always add MSD descriptors, don't wait for connect
Michael Moon [Wed, 2 Jan 2013 03:43:15 +0000 (14:43 +1100)]
Merge branch 'hotfix/db35a1-typo' into edge
Michael Moon [Wed, 2 Jan 2013 03:42:38 +0000 (14:42 +1100)]
fix typo - https://github.com/arthurwolf/Smoothie/commit/
db35a1525f75c50fb64f9fa0947dd0d421a2ca12#commitcomment-
2365308
Reported-by: bwhoward