Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Is there a way to specify a file to upload when there are multiple .ino files in directory? #5021

Open
1 task
ryanlinjui opened this issue Nov 19, 2024 · 0 comments

Comments

@ryanlinjui
Copy link

ryanlinjui commented Nov 19, 2024

What kind of issue is this?

  • Question.
    This issue tracker is not the place for questions. If you want to ask how to do something,
    or to understand why something isn't working the way you expect it to,
    use Community Forums or Premium Support

Configuration

Operating system: macOS Sonoma Version 14.2

PlatformIO Version (platformio --version): PlatformIO Core, version 6.1.16

Description of problem

Here's my directory structure:

arduino
├── platformio.ini
├── arm_atmega1280.ino
├── receiver_esp8266.ino
├── remote_esp8266.ino
└── servo_debug.ino

I'm wondering if there's a way to specify the environment to run a different file?
Or can I specify a file to compile and upload?

By the way, this is for my project darkchess-robot. Thanks for your help!

Steps to Reproduce

  1. cd to arduino directory
  2. Run pio run -e remote, then it prints error message.
  3. Run pio run -e receiver, then it also prints error message.

Actual Results

Error message by step 2:

Error: Nothing to build. Please put your source code files to the '/my/workspace/dir/arduino' folder.

Error message by step 3:

Error: Nothing to build. Please put your source code files to the '/my/workspace/dir/arduino' folder

Expected Results

Successfully compile and upload to board.

If problems with PlatformIO Build System:

The content of platformio.ini:

[platformio]
src_dir = .

[env:remote]
platform = espressif8266
board = esp07
framework = arduino
src_filter = +<remote_esp8266.ino>

[env:receiver]
platform = espressif8266
board = esp07
framework = arduino
src_filter = +<receiver_esp8266.ino>

[env:arm]
platform = atmelavr
board = ATmega1280
framework = arduino
src_filter = +<arm_atmega1280.ino>

[env:debug]
platform = atmelavr
board = ATmega1280
framework = arduino
src_filter = +<servo_debug.ino>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant