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

arduino_ci doesn't seems to work properly with mega2560 #86

Closed
s-celles opened this issue Jan 14, 2019 · 6 comments
Closed

arduino_ci doesn't seems to work properly with mega2560 #86

s-celles opened this issue Jan 14, 2019 · 6 comments
Labels
arduino mocks Compilation mocks for the Arduino library bug Something isn't working help wanted Extra attention is needed YAML The configuration files or system

Comments

@s-celles
Copy link
Contributor

s-celles commented Jan 14, 2019

Hello,

Here is a minimal (non) working example
https://github.com/scls19fr/mwe_arduino_ci

to show problem I was facing (see https://github.com/ianfixes/arduino_ci/issues/78#issuecomment-453776168 ) with Arduino Mega 2560.

Kind regards

PS : arduino_ci log finish with Failures: 1
It may be interesting to show how many tests / examples are being run...
because showing only Failures: 0 can be quite misleading... it can simply be because tests / examples haven't been found

@ianfixes
Copy link
Collaborator

It looks like I added a definition for this board, but it's incomplete -- it's missing the compiler flags that are needed for this compilation target. e.g. here's what the definition for leonardo looks like in the default yaml file:

  leonardo:
    board: arduino:avr:leonardo
    package: arduino:avr
    gcc:
      features:
      defines:
        - __AVR_ATmega32U4__
      warnings:
      flags:

That __AVR_ATmega32U4__ is the crucial value, and I don't know what it is (or if there are several, what they all should be).

It appears that not much more is known now than when I first went looking; here are a bunch of search results that just turned up people with the same problem as me:

This is a topic I am entirely unqualified to answer; all the existing stuff in the default YAML file came from values I found in other documentation or source files.

If you want to experiment with it (perhaps just using __AVR_ATmega2560__, shown in this gist , I'd copy the following section into your .arduino-ci.yml file and let me know if it works:

  mega2560:
    board: arduino:avr:mega:cpu=atmega2560
    package: arduino:avr
    gcc:
      features:
      defines:
        - __AVR_ATmega2560__
      warnings:
      flags:

@ianfixes ianfixes added bug Something isn't working help wanted Extra attention is needed arduino mocks Compilation mocks for the Arduino library YAML The configuration files or system labels Jan 14, 2019
@per1234
Copy link
Contributor

per1234 commented Jan 14, 2019

Here's a list of all the MCU definition macros for AVR:
https://www.microchip.com/webdoc/avrlibcreferencemanual/using_tools_1using_avr_gcc_mach_opt.html
These are widely used in preprocessor conditionals for part-specific code.

@s-celles
Copy link
Contributor Author

@ianfixes
Copy link
Collaborator

Looks like you're missing the toplevel platforms: section. It should look like this:

platforms:
  mega2560:
    board: arduino:avr:mega:cpu=atmega2560
    package: arduino:avr
    gcc:
      defines:
        - __AVR_ATmega2560__

@ianfixes
Copy link
Collaborator

@per1234 that's exactly what I'm looking for! If you have a list of all known Arduino platforms, I could really use your help on #89.

@ianfixes
Copy link
Collaborator

I see a passing build 🎉 https://travis-ci.com/scls19fr/mwe_arduino_ci/builds/97377931

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arduino mocks Compilation mocks for the Arduino library bug Something isn't working help wanted Extra attention is needed YAML The configuration files or system
Projects
None yet
Development

No branches or pull requests

3 participants