-
-
Notifications
You must be signed in to change notification settings - Fork 114
-mmcu=
not passed while generating dependencies
#106
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
Comments
@cmaglie, I think this is something to fix for the next release. |
There is a smaller sketch that we can use to reproduce the problem? (sorry I didn't read the full thread yet...) |
I had a closer look, and it seems the problem is that digistup does not define the recipe.preproc.macros value. arduino-builder has a default value for it, but that does not seem to include -mmcu (at least not when combined with the digistump platform.txt. Looking through the history, the arduino-builder version never had the -mmcu option, and the Arduino version always had it, so I'm not sure what happened there. I was going to suggest to remove the recipe.preproc.macros entry from Arduino's platform.txt and use the below sketch, but that doesn't seem to break it somehow (
|
Arduino IDE 1.6.8 2016/02/24 06:33:
Note that the arduino-builder default |
solves arduino#106 Signed-off-by: Martino Facchin <[email protected]>
I finally managed to find why I could not reproduce this issue before: I was changing the platform.txt in my git checkout, but there was still a "cached" version in build/linux/work/hardware. I had set up symlinks from my sketchbook into my git checkout to make sure any changes to source files would be picked up without having to update the build folder copy, but it turns out both versions of the platform.txt are removed, so uncommenting the recipe didn't work. In any case, now that I can reliably reproduce the problem, I can confirm it no longer occurs with the latest git master of arduino-builder, so I'm closing this issue. |
I have the same problem today (arduino-builder 1.3.21), but only when I set the fqbn to arduino:avr:nano. It's working fine with arduino:avr:uno. |
Could you post the full verbose log of an attempt with both the nano and the uno? Are you using the IDE, or calling builder directly? |
Uno Log: http://termbin.com/jm64 I'm using cmake to build, but the CMakeLists (Here: http://termbin.com/yaxd) just run the arduino-builder command. |
You must use An easy way to debug this kind of issues is to enable the "verbose compile" from the preferences of the IDE and see how arduino-builder is called when you compile. |
I haven't thoroughly verified this, but arduino/Arduino#4512 (comment) seems to indicate that, while running the preprocessor to collect dependencies, the
-mmcu=
option is not passed to gcc. You would say that this is not needed for preprocessing, but this also prevents defines like__AVR_ATmega328p__
from being present, which could be used to determine what libraries to use (as happens in this library).The text was updated successfully, but these errors were encountered: