Commit Graph

15 Commits

Author SHA1 Message Date
Kevin O'Connor 233adfe660 build: Add __visible to variables in compile_time_request.c
Add __visible to generated code in compile_time_request.c so that the
main code can be compiled with -fwhole-program.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-05-15 14:02:04 -04:00
Kevin O'Connor 450c14b286 build: Rename makefile CFLAGS-y to CFLAGS and LDFLAGS-y to CFLAGS_klipper.elf
Rename some makefile variables.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-05-15 14:01:56 -04:00
Kevin O'Connor 1878da228d build: Add workaround to suppress broken avr-gcc "misspelled" warnings
Detect avr gcc v4.8.1 and then disable warnings during the klipper.o
linking to suppress bogus "misspelled signal handler" warnings.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-04-24 08:54:10 -04:00
Kevin O'Connor fe95ea221b build: Define DECL_CONSTANT mechanism for defining exported constants
Add a DECL_CONSTANT macro to allow the firmware to define constants
that are to be exported to the host during the "identify" phase.  This
replaces the existing hardcoded mechanism of scanning the Kconfig
header file for certain constants.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-12-23 17:06:10 -05:00
Kevin O'Connor 4e8674d5df build: Disable gcc's use-linker-plugin option
On GCC v6 the -fwhole-program option does not take effect when
-fuse-linker-plugin is also in effect. The -fuse-linker-plugin option
does not optimize as well as -fwhole-program, so explicitly disable
the linker plugin via -fno-use-linker-plugin.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-12-22 22:48:14 -05:00
Kevin O'Connor 306db9a851 build: Be sure to also include out/*.d files in Makefile
Not including the out/*.d build files can cause the build to be
incomplete.  In particular, without this fix, if the code is built for
ARM and then configured for AVR, the build can produce a corrupt AVR
binary.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-10-21 12:00:03 -04:00
Kevin O'Connor 33a48d926c build: Support creating and storing the data dictionary on each build
Generate the data dictionary in out/klipper.dict on each build.  This
makes it easier to use the dictionary when debugging.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-09-10 20:01:52 -04:00
Kevin O'Connor b0b2e9c4aa build: Avoid objcopy --dump-section flag
Commit da305e6b changed the objcopy command to use the --dump-section
flag.  However, the 2.24 version of avr-objcopy (which is common on
raspbian installs) does not support this flag.  Avoid using
--dump-section and continue to use the -j option instead.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-07-10 21:46:57 -04:00
Kevin O'Connor da305e6b61 build: Update declfuncs.lds.S to only use progmem sections on AVR
On non-avr platforms the declfunc stuff still needs to be in the
binary in a rodata section.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-06-14 14:00:57 -04:00
Kevin O'Connor ea5f825a91 build: Default to O2 optimization
Default to O2 and set Os in the AVR makefile.  Platforms besides AVR
are likely to produce better code with O2 so make that the default.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-06-14 14:00:57 -04:00
Kevin O'Connor 71947d6bea gpiocmds: Add Kconfig option to allow boards to disable ADC commands
Some boards may not support the ADC hardware.  Update the build so
that those commands do not need to be compiled if they are not
available.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-06-13 23:18:59 -04:00
Kevin O'Connor 4dd3478fc1 Makefile: Move listing of directories to create to board makefiles
Rename DIRS to dirs-y and populate it in the per-board Makefile rules.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-06-13 23:18:59 -04: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 3eafc83458 avr: Initial support for Atmel AT90USB1286 mcu
Add GPIO definitions for the AT90USB1286.  Add code for communicating
over USB port on AT90USB1286.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-06-05 10:52:45 -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