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

New makefile #2

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

New makefile #2

wants to merge 3 commits into from

Conversation

nunogrl
Copy link

@nunogrl nunogrl commented Jan 14, 2022

No description provided.

@nunogrl nunogrl closed this Jan 14, 2022
@nunogrl nunogrl deleted the new-makefile branch January 14, 2022 19:46
@nunogrl nunogrl restored the new-makefile branch January 14, 2022 19:46
@nunogrl nunogrl reopened this Jan 14, 2022
@nunogrl
Copy link
Author

nunogrl commented Jan 14, 2022

Hello

Thanks for writing this makefile. I did some changes to it so I can use it on multiple projects.
I was careful to not remove any functionality that already had. So it can still be used as it was designed initially, using the environment variables

Many thanks!
Here follows the changes.


Changes

Added a new json configuration file

Among the .ino file, there's an compilerconfig.json file that has the parameters for the Makefile. Here's an example (I added one of these to your projects):

{
  "config": {
    "fqbn": "esp8266:esp8266:d1_mini",
    "serial": "/dev/ttyUSB0",
    "iot_name": "esp8266-blink",
    "ota_port": "8266",
    "verbosity": "0",
    "ota_pass": ""
  },
  "libs": [
    "Adafruit GFX Library",
    "Adafruit SSD1306"
  ]
}

Added dependencies

I added an extra field for dependencies on the Makefile for the libs, so it can support this extra way manage lib dependencies, and not have to maintain 2 extra files.

Added help

I added an help message so I could test the output, and because it can be useful

Added a new dependency

This to run, requires jq installed on your workstation to handle the json file.

Usage

The usage would then be

make -f ../Makefile help
make -f ../Makefile compile
make -f ../Makefile upload

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

Successfully merging this pull request may close these issues.

1 participant