Update callers to only use exported methods of the msgproto objects.
This makes it easier to make internal changes to the code.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Replace the custom encoding with a hex encoding. This makes it a
little easier to inspect the CTR conversions.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Store the CTR requests in compile_time_request.txt with the null
characters removed. This makes it slightly easier to inspect the CTR
conversions.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Add basic ARM Cortex-M C init code and build linker scripts to
src/generic/ code. This can be used to simplify the various ARM board
code.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Avoid transmitting lists of message ids for commands and responses -
gzip doesn't do a good job of compressing them.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Add --always flag to "git describe" command to get a build identifier
even if one checks out the repo with a depth parameter that prunes out
the last tagged version.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Store the gcc and binutils versions used in the compilation of the
firmware in the firmware data dictionary. Forward that information to
the log so it is available during debugging.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Don't use the sendf() macro for ack and nak messages - directly call
the command_sendf() code instead.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Some systems point python to python3 instead of python2 - explicitly
request python2 to avoid conflicts.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Avoid using linker magic to define the init, task, and shutdown
functions. Instead, use the compile_time_request system. This
simplifies the build and produces more efficient code.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
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>
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>
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>
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>
Store the baud rate the MCU is configured for in the "identify" data
and use that rate when calculating the baudadjust parameter.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
The maximum max_size value should not include MESSAGE_MIN - that is
already added by the runtime code.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>