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 support for compiling on vanilla mipsel GCC toolchain #15

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

etherealvisage
Copy link

As previously discussed in issue #14, I was working on supporting a vanilla mipsel GCC toolchain in m-stack. The changes I made are quite minor, but as they're in a working state now I feel it's probably appropriate to get some feedback here.

There are two main things to consider here:

  1. How do we detect a vanilla GCC as opposed to Microchip's modified XC32?
    • This may not be the best approach, but I decided to detect a 32-bit MIPS GCC-compatible compiler leave it at that. I haven't run exhaustive tests just yet, but putting these under the XC32 cases seems to work perfectly.
  2. How can we get access to C-like declarations of SFRs for M-stack to use?
    • Presumably, if one isn't using Microchip's XC32 compiler it may not be possible to have a standard header (xc.h) one can include to get access to useful SFR declarations, such as U1IR. However, there is already a standardized way to allow the user to configure things for the library, which is the file usb_config.h. As such, I assume now that if using a vanilla compiler, you must include a header file to provide SFR declarations.

Please let me know what you think! I'm happy to sign the ICLA and make any modifications you feel are necessary.

Thank you.

This allows usb_hal to pass the first stage of compilation on an unmodified
mipsel GCC toolchain.
This function/macro does not exist on vanilla mipsel GCC.
This uses the locally-defined macros and makes these files compile on vanilla
mipsel GCC.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant