platformio / builder-framework-arduino-core-mbed

Apache License 2.0
3 stars 9 forks source link

Invalid macro definition for CM4_BINARY_START #6

Closed maxgerhardt closed 2 years ago

maxgerhardt commented 2 years ago

Somehow this piece of code

https://github.com/platformio/builder-framework-arduino-core-mbed/blob/ed9a3458e336660fdf2b1d4a4c828a2ddfd214ad/arduino-core-mbed.py#L50-L76

generates in the .vscode/c_cpp_properties.json

            "defines": [
                "PLATFORMIO=60003",
                "ARDUINO_PORTENTA_H7_M7",
[...]
                "ARDUINO_ARCH_MBED",
                "-DCM4_BINARY_START=0x08100000",
                ""
            ],

The -D should not be there. VSCode doesn't like that at all

image

Using platformio.ini

[env:portenta_h7_m7]
platform = ststm32
board = portenta_h7_m7
framework = arduino
ivankravets commented 2 years ago

Is this the latest dev platform? I can't reproduce this issue.

maxgerhardt commented 2 years ago

Indeed, this problem goes away when using platform = https://github.com/platformio/platform-ststm32.git.