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

change(idf): Rename component example and fix compilation warnings #9801

Merged
merged 5 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .github/workflows/build_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ on:
description: 'Chip to build tests for'
required: true

concurrency:
group: tests-build-${{ github.event.pull_request.number || github.ref }}-${{ inputs.chip }}-${{ inputs.type }}
cancel-in-progress: true

jobs:
build-tests:
name: Build ${{ inputs.type }} tests for ${{ inputs.chip }}
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/hw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ on:
description: 'Chip to run tests for'
required: true

concurrency:
group: tests-hw-${{ github.event.pull_request.number || github.ref }}-${{ inputs.chip }}-${{ inputs.type }}
cancel-in-progress: true

jobs:
hardware-test:
name: Hardware ${{ inputs.chip }} ${{ inputs.type }} tests
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ jobs:
echo "chunks=$chunks" >> $GITHUB_OUTPUT

- name: Upload sketches found
if: ${{ steps.set-chunks.outputs.build_all == 'false' }}
if: ${{ steps.set-chunks.outputs.build_all == 'false' && steps.set-chunks.outputs.build_libraries == 'true' }}
uses: actions/upload-artifact@v4
with:
name: sketches_found
Expand Down Expand Up @@ -214,13 +214,13 @@ jobs:
run: bash ./.github/scripts/on-push.sh ${{ matrix.chunk }} ${{ env.MAX_CHUNKS }} 1

- name: Download sketches found
if: ${{ needs.gen-chunks.outputs.build_all == 'false' }}
if: ${{ needs.gen-chunks.outputs.build_all == 'false' && needs.gen-chunks.outputs.build_libraries == 'true' }}
uses: actions/download-artifact@v4
with:
name: sketches_found

- name: Build selected sketches
if: ${{ needs.gen-chunks.outputs.build_all == 'false' }}
if: ${{ needs.gen-chunks.outputs.build_all == 'false' && needs.gen-chunks.outputs.build_libraries == 'true' }}
run: bash ./.github/scripts/on-push.sh ${{ matrix.chunk }} ${{ needs.gen-chunks.outputs.chunk_count }} 1 sketches_found.txt

#Upload cli compile json as artifact
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/qemu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ on:
required: true
type: string

concurrency:
group: qemu-${{ github.event.pull_request.number || github.ref }}-${{ inputs.chip }}-${{ inputs.type }}
cancel-in-progress: true

jobs:
qemu-test:
name: QEMU ${{ inputs.chip }} ${{ inputs.type }} tests
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/wokwi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ on:
description: 'Wokwi CLI API token'
required: true

concurrency:
group: tests-wokwi-${{ github.event.pull_request.number || github.ref }}-${{ inputs.chip }}-${{ inputs.type }}
cancel-in-progress: true

env:
WOKWI_TIMEOUT: 600000 # Milliseconds

Expand Down
8 changes: 4 additions & 4 deletions cores/esp32/MacAddress.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ bool MacAddress::fromString(const char *buf) {

//Parse user entered string into MAC address
bool MacAddress::fromString6(const char *buf) {
char cs[18];
char cs[18]; // 17 + 1 for null terminator
char *token;
char *next; //Unused but required
int i;

strncpy(cs, buf, sizeof(cs)); //strtok modifies the buffer: copy to working buffer.
strncpy(cs, buf, sizeof(cs) - 1); //strtok modifies the buffer: copy to working buffer.

for (i = 0; i < 6; i++) {
token = strtok((i == 0) ? cs : NULL, ":"); //Find first or next token
Expand All @@ -86,12 +86,12 @@ bool MacAddress::fromString6(const char *buf) {
}

bool MacAddress::fromString8(const char *buf) {
char cs[24];
char cs[24]; // 23 + 1 for null terminator
char *token;
char *next; //Unused but required
int i;

strncpy(cs, buf, sizeof(cs)); //strtok modifies the buffer: copy to working buffer.
strncpy(cs, buf, sizeof(cs) - 1); //strtok modifies the buffer: copy to working buffer.

for (i = 0; i < 8; i++) {
token = strtok((i == 0) ? cs : NULL, ":"); //Find first or next token
Expand Down
2 changes: 1 addition & 1 deletion cores/esp32/esp32-hal-adc.c
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ esp_err_t __analogContinuousInit(adc_channel_t *channel, uint8_t channel_num, ad

bool analogContinuous(uint8_t pins[], size_t pins_count, uint32_t conversions_per_pin, uint32_t sampling_freq_hz, void (*userFunc)(void)) {
adc_channel_t channel[pins_count];
adc_unit_t adc_unit;
adc_unit_t adc_unit = ADC_UNIT_1;
esp_err_t err = ESP_OK;

//Convert pins to channels and check if all are ADC1s unit
Expand Down
2 changes: 1 addition & 1 deletion idf_component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,4 @@ dependencies:
version: "1.0.3"
require: public
examples:
- path: ./idf_component_examples/Hello_world
- path: ./idf_component_examples/hello_world
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ To create a ESP-IDF project from this example with the latest release of Arduino
ESP-IDF will download all dependencies needed from the component registry and setup the project for you.

If you want to use cloned Arduino-esp32 repository, you can build this example directly.
Go to the example folder `arduino-esp32/idf_component_examples/Hello_world`.
Go to the example folder `arduino-esp32/idf_component_examples/hello_world`.
First you need to comment line 6 `pre_release: true` in examples `/main/idf_component.yml`.
Then just run command: `idf.py build`.

## Example folder contents

The project **Hello_world** contains one source file in C++ language [main.cpp](main/main.cpp). The file is located in folder [main](main).
The project **hello_world** contains one source file in C++ language [main.cpp](main/main.cpp). The file is located in folder [main](main).

ESP-IDF projects are built using CMake. The project build configuration is contained in `CMakeLists.txt`
files that provide set of directives and instructions describing the project's source files and targets
Expand Down
8 changes: 4 additions & 4 deletions libraries/Ethernet/src/ETH.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -358,11 +358,11 @@ bool ETHClass::begin(eth_phy_type_t type, int32_t phy_addr, int mdc, int mdio, i
#endif /* CONFIG_ETH_USE_ESP32_EMAC */

#if ETH_SPI_SUPPORTS_CUSTOM
static void *_eth_spi_init(const void *ctx) {
__unused static void *_eth_spi_init(const void *ctx) {
return (void *)ctx;
}

static esp_err_t _eth_spi_deinit(void *ctx) {
__unused static esp_err_t _eth_spi_deinit(void *ctx) {
return ESP_OK;
}

Expand Down Expand Up @@ -575,8 +575,8 @@ bool ETHClass::beginSPI(
}

// Init common MAC and PHY configs to default
eth_mac_config_t eth_mac_config = ETH_MAC_DEFAULT_CONFIG();
eth_phy_config_t phy_config = ETH_PHY_DEFAULT_CONFIG();
__unused eth_mac_config_t eth_mac_config = ETH_MAC_DEFAULT_CONFIG();
__unused eth_phy_config_t phy_config = ETH_PHY_DEFAULT_CONFIG();

// Update PHY config based on board specific configuration
phy_config.phy_addr = phy_addr;
Expand Down
Loading