Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rules and scripts for building on FreeBSD. #480

Merged
merged 1 commit into from Dec 12, 2018

Conversation

Projects
None yet
3 participants
@bjc
Copy link
Contributor

commented Nov 25, 2018

  • 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.

@bjc bjc force-pushed the bjc:freebsd-port branch 5 times, most recently from af8008d to fdc77df Nov 25, 2018

Add rules and scripts for building on FreeBSD.
  * 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>

@bjc bjc force-pushed the bjc:freebsd-port branch from fdc77df to 39d1f70 Nov 25, 2018

@obra

This comment has been minimized.

Copy link
Member

commented Dec 7, 2018

@bjc - Sorry for the delay in review on this. I've been in China since right around when you pushed this.

Looks good to me. @algernon - anything you want to see cleaned up before we merge?

@algernon

This comment has been minimized.

Copy link
Member

commented Dec 7, 2018

I still need to go through it. Been meaning to, but got distracted. Will bump it to the top of my queue.

@algernon algernon merged commit b9b0a5d into keyboardio:master Dec 12, 2018

2 checks passed

DCO DCO
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@bjc bjc deleted the bjc:freebsd-port branch Dec 19, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.