You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When builder runs the preprocessor on the sketch for ctags, the compiler recipe is taken from global default, not the platform.txt file specific to the selected target.
So even if my platform.txt defines -DBOARD_DUET, the preprocessor gets called with -DARDUINO_DUET instead. The sketch subsequently does not parse correctly if it relies on BOARD_DUET being defined.
@bobc, from the top of my head, I think this means that your platform.txt does not define the recipe for the preprocessor, and arduino-builder falls back to a default. There have been some recent changes in this regard though, see arduino/arduino-builder#125
I see that your package is under: C:\Users\bob\Documents\Arduino\hardware\Duet\Duet\system/libsam
but it should really be: C:\Users\bob\Documents\Arduino\hardware\Duet\sam\system/libsam
would you like to try renaming ....\Duet\Duet in ....\Duet\sam?
Also if Duet is your board name, I suggest to rename the first folder to your "vendor/maintainer" name since the folders structure meaning is: hardware/<Vendor>/<Architecture>/....
Ok, I added the recipes for the preproc to my platform.txt, seems to work fine. I copied platform.txt from the latest Due package, but that works OK with the default recipes.
@cmaglie thanks for the tip, I will change accordingly.
Just for general info, the Duet is a 3d printer board with onboard SAM3X8E, similar to Due (hence name), I am adapting the core package for use in Arduino IDE.
Anyway, I think this is solved, thanks. I will close.
When builder runs the preprocessor on the sketch for ctags, the compiler recipe is taken from global default, not the platform.txt file specific to the selected target.
So even if my platform.txt defines -DBOARD_DUET, the preprocessor gets called with -DARDUINO_DUET instead. The sketch subsequently does not parse correctly if it relies on BOARD_DUET being defined.
The text was updated successfully, but these errors were encountered: