Commit Graph

10 Commits

Author SHA1 Message Date
Kevin O'Connor b9940f0e0d build: Avoid linker magic in compile_time_request.c unique id generation
Avoid generating unique ids via memory locations and linker scripts.
Instead, generate them using code produced by buildcommands.py.
Utilize gcc's ability to perform static string comparisons at compile
time to produce a unique id for each unique string.

This fixes a build failure on ARM introduced in 142b92b8.  It also
reduces the complexity of the build.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-05-26 12:32:02 -04:00
Kevin O'Connor 969ee4c8f9 irq: Add an irq_poll() stub for board code
Allow the board specific code to run checks prior to running each
task.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-05-15 15:00:45 -04:00
Kevin O'Connor c35278e217 build: Avoid using noinline in common code
It's not necessary to use noinline for parsef() and stop_steppers().

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-05-15 14:02:59 -04:00
Kevin O'Connor 37572bc217 command: Only implement 16bit signed conversion on AVR
On regular 32bit machines there is no need to implement explicit
signed conversion on 16bit integers.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-05-15 14:02:04 -04:00
Kevin O'Connor d67f962a38 command: Simplify sendf() switch
Commit f28eb902 reworked the switch to fix int16 encoding.  However,
at least one version of avr gcc doesn't like that switch layout (it
uses a jump table).  Reorg the switch to avoid that issue.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-03-26 21:55:24 -04:00
Kevin O'Connor f28eb902df command: Fix encoding of 16bit signed integers
The code wasn't properly sign-extending 16bit integers which caused
int16_t reports in output() to appear as uint16_t.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-03-24 15:31:26 -04:00
Kevin O'Connor ed715ec437 command: No need to disable irqs in sendf reentrant check
As long as the code is careful when writing the in_sendf variable it
should be safe to update it without having to disable irqs.

Also, make sure in_sendf is cleared on shutdown.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-01-14 11:32:27 -05:00
Kevin O'Connor 9a44a20a9d command: Check for reentrant calls to sendf()
Allow sendf() to be called from irq and timer context - check for the
case where sendf() is called while already in sendf() and simply
discard those messages.  This makes it safe to use output() debugging
calls even in irq and timer context.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-01-13 12:10:00 -05:00
Kevin O'Connor 9971f999b3 generic: Create generic board infrastructure and move misc.h to it
Instead of creating a misc.h file in each board directory, create a
generic board directory and declare misc.h there.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-06-13 23:18:58 -04:00
Kevin O'Connor f582a36e4d Initial commit of source code.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-05-25 11:37:40 -04:00