Skip to content

[BUG] Compilation Issues as Conditionals not correctly calculated/processed - M993/M994 #27922

@DaLiV

Description

@DaLiV

Did you test the latest bugfix-2.1.x code?

Yes, and the problem still exists.

Bug Description

Preprocessor Marlin/src/inc/*
not running as expected depsite all variables defined where they are.
compiling with platformio on linux.

wanted to save-restore SPI flash between compilations M993/M994 - not compiled-in depsite all variables are defined

Expected behavior

executed
Conditionals-3-etc.h

#if ALL(SPI_FLASH, HAS_MEDIA, MARLIN_DEV_MODE)
  #define SPI_FLASH_BACKUP 1
#endif


Actual behavior

SPI_FLASH_BACKUP variable not set depsite explicit
SDSUPPORT and MARLIN_DEV_MODE in main configs
and
SPI_FLASH thru pins_MKS_ROBIN_NANO_V3_common.h

by checking which are set at #if ALL(SPI_FLASH, HAS_MEDIA, MARLIN_DEV_MODE)
only HAS_MEDIA is set ... other are not.

Steps to Reproduce

in Configuration.h define any board with SD
#define MOTHERBOARD BOARD_MKS_ROBIN_NANO_V3_1

and enable
#define SDSUPPORT

Also serial is requirement for board from preprocessors
#define SERIAL_PORT -1

in Configuration_adv.h
#define MARLIN_DEV_MODE

in Marlin/src/inc/Conditionals-3-etc.h add warning

 #if ALL(SPI_FLASH, HAS_MEDIA, MARLIN_DEV_MODE)
#warning "this line MUST BE PROCESSED"**
   #define SPI_FLASH_BACKUP 1
 #endif

pio run

warning not shown, also as xcommand not compiled-in.

Version of Marlin Firmware

latest git

Additional information & file uploads

similar problem previously noted in
#27807 (comment)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions