platformio / platform-native

Native: development platform for PlatformIO
https://registry.platformio.org/platforms/platformio/native
Apache License 2.0
21 stars 27 forks source link

Do not know how to make File target `upload' #10

Closed d42ohpaz closed 2 years ago

d42ohpaz commented 3 years ago

MacOS Catalina CLion 2020.3 PlatformIO Core 5.1.0

When using PlatformIO Upload on a native environment, I eventually get the error in the subject. I can run the command ./.pio/build/native/program manually from the terminal, but would like it to Just Work as if I were uploading to an MCU board.

The following is my native configuration from platformio.ini:


[env:native]
platform = native@^1.1.3
extra_scripts = support/sdl2_build_extra.py
build_flags =
    ${common.build_flags}
    -std=c++17
; Use 32-bits build when possible, for correct memory stat display. You need
; `:i386` sdl2 libs installed. Comment this option for 64-bits build.
;    !python -c "import platform; print('-m32' if platform.system() in [ 'Linux' ] else '')"
; Add recursive dirs for hal headers search
;    !python -c "import os; print(' '.join(['-I {}'.format(i[0].replace('\x5C','/')) for i in os.walk('hal/sdl2')]))"
    -lSDL2
; SDL drivers options
    -D LV_LVGL_H_INCLUDE_SIMPLE
    -D LV_DRV_NO_CONF
    -D USE_MONITOR
    -D MONITOR_ZOOM=2
    -D USE_MOUSE
    -D USE_MOUSEWHEEL
    -D USE_KEYBOARD
lib_deps =
    ${common.lib_deps}
    lv_drivers@~7.9.0
;lv_drivers=https://github.com/littlevgl/lv_drivers/archive/7d71907c1d6b02797d066f50984b866e080ebeed.zip
src_filter =
    ${common.src_filter}
    +<../hal/sdl2>
    -<*/nodemcu32s*>
vshymanskyy commented 2 years ago

Also run into this

ivankravets commented 2 years ago

Resolved in v1.2.0 https://github.com/platformio/platform-native/releases/tag/v1.2.0

ivankravets commented 2 years ago

Please use pio run -t exec or pio run -t upload (legacy way).

You can also pass extra arguments to the program using the latest PIO Core 6.0 and -a,--program-arg option.

pio run -t exec -a "arg" -a "--option1=value"