When calling avr-size, we want to expand ${AVR_SIZE_FLAGS}, not pass it as a
single argument, hence, we do not need to - and do not want to! - quote it.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
* Uses usbconfig to determine the Model 01's USB modem port.
* Works around incompatibe avrsize flags.
You need to be able to run usbconfig to flash the firmware from the
buildtools. This can be accomplished with appropriate groups and devfs
rules.
Requires gmake, perl, avrdude, and (probably) arduino18 from ports.
The version of avrdude in ports uses an avr-size command that doesn't
understand the -C or --mcu flags. From what I can tell, these flags
are uneccessary, as the size computed with them is the same as what
you get from adding up the appropriate segments from the standard
output of avr-size without any flags. However, since the size is only
informative, I've opted to simply check to see if the command
succeeded, and if not, output a string saying it could not be.
It would probably be better to:
* Determine appropriate flags based on build tools, or,
* Just not use the flags at all, and grab the .text, etc., segment
sizes from the standard output and add them up via `dc` for
display.
I've been using this toolchain to build successfully on FreeBSD 12 for
the Model 01 without issue. It should work with earlier versions of
FreeBSD as well.
Signed-off-by: Brian Cully <bjc@kublai.com>
For better organisation, we're putting examples in subdirectories of
`examples/`. The builder should support that.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
If there's a config file in the sketch dir, load BOARD & FQBN from it, so we can
compile for different boards from within the same repo.
Fixes#425.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
After talking with Jesse, this changes the license to GPLv3 (only), where
appropriate, and adds copyright headers to all files that were missing them.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
Use ./_build/ for the build path by default, and do not delete it at the end of
compilation, only when doing a clean.
Fixes#315.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
Instead of hardcoding the max program size, pick it out of boards.txt, like we
pick the device VID and PID.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
Based on #306, with slightly improved text. Thanks to Ross Donaldson
(@Gastove) for the original pull request!
Closes#306.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
There are a number of false-positives, where ShellCheck warns about behaviour we
do want, or are otherwise intentional.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
If the user has missed the step about setting up their account
with the right group membership, they would get a cryptic failure
from stty, so catch this and explain the problem.
This should never happen, but could if something goes badly wrong
in the device detection code, e.g. someone changing it in a way
which caused extra output on STDOUT.
It's easier for most people to interpret numbers in decimal than hexadecimal; adding this
option to avr-nm prints out the sizes in the size_map in a more intuitive format.
On some locales awk will generate commas instead of dots in the percentage. This will mess up the sed command. Instead of forcing awk to always generate dots we can simply cange the sed command to treat commas as regular text.
Currently, if kaleidoscope-builder fails to find a sketch file, the
resulting error message is very confusing and unhelpful. This commit
makes it more straightforward and helpful.