Missing integers in `board.extra_flags` in `board.json`

I’m trying to create custom board.json, but pio is “eating out” my values.

{
  "build": [
    "extra_flags": "-DN79E85X -DN79E855 -DNAKED_ARCH_MCS51 -DNAKED_MCS51_N79E85X --iram-size 256 --xram-size 256 --code-size 16384 --stack-size 128",
    ...
  ],
  ...
}

but when I issue pio run -v, the 128, 256 and 16384 are all missing…

sdcc -o .pioenvs/mcs51/src/ADC.rel -c --std-sdcc11 --opt-code-size --peep-asm --peep-return -mmcs51 --iram-size --xram-size --code-size --stack-size -DF_CPU=22118400L -DPLATFORMIO=030100 -DN79E85X -DN79E855 -DNAKED_ARCH_MCS51 -DNAKED_MCS51_N79E85X -I/home/palatis/.platformio/packages/framework-nakedmcs51/cores/naked -I/home/palatis/.platformio/packages/framework-nakedmcs51/variants/n79e85x -Isrc src/ADC.c

I found that only stuff starting with [0-9] are missing.
I also tried

    "extra_flags": [
        "-DN79E85X", "-DN79E855", "-DNAKED_ARCH_MCS51", "-DNAKED_MCS51_N79E85X",
        "--iram-size 256",
        "--xram-size 256",
        "--code-size 16384",
        "--stack-size 128"
    ],

and

    "extra_flags": [
        "-DN79E85X", "-DN79E855", "-DNAKED_ARCH_MCS51", "-DNAKED_MCS51_N79E85X",
        "--iram-size", "256",
        "--xram-size", "256",
        "--code-size", "16384",
        "--stack-size", "128"
    ],

and

    "extra_flags": [
        "-DN79E85X", "-DN79E855", "-DNAKED_ARCH_MCS51", "-DNAKED_MCS51_N79E85X",
        "--iram-size", "\"256\"",
        "--xram-size", "\"256\"",
        "--code-size", "\"16384\"",
        "--stack-size", "\"128\""
    ],

none of them works.

what should I do now? do I file a issue report?

build_flags = --iram-size 256 --xram-size 256 --code-size 16384 --stack-size 128

in platformio.ini doesn’t work either, the numbers are just all missing.

Of course, please file issue here Issues · platformio/platformio-core · GitHub

P.S: How about?

{
  "build": {
    "extra_flags": "-DNAKED_MCS51_N79E85X \"--iram-size 256\" \"--xram-size 256\""
  }
}

In any case, this is a bug. I’ll fix it later.

the compile recognize "--iram-size[space]256" as one argument and refuse to run.

i’m also digging out the problem, first time python