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

unit test build failing #607

Open
tdb3 opened this issue Jan 4, 2025 · 2 comments
Open

unit test build failing #607

tdb3 opened this issue Jan 4, 2025 · 2 comments

Comments

@tdb3
Copy link
Contributor

tdb3 commented Jan 4, 2025

Describe the bug
Compilation issues when building for unit tests, starting with commit 61042d9

To Reproduce

cd ESP-Miner
git checkout master
git checkout 61042d93ae0b0e54c4a0020dd87b2803f6fd369d
cd test
idf.py build

Expected behavior
Unit test build is successful.

Log

idf.py build
...
/home/dev/myrepos/ESP-MinerAlt/ESP-Miner/components/asic/bm1368.c: In function '_reset':
/home/dev/myrepos/ESP-MinerAlt/ESP-Miner/components/asic/bm1368.c:18:25: error: 'CONFIG_GPIO_ASIC_RESET' undeclared (first use in this function); did you mean 'GPIO_ASIC_RESET'?
   18 | #define GPIO_ASIC_RESET CONFIG_GPIO_ASIC_RESET
      |                         ^~~~~~~~~~~~~~~~~~~~~~
/home/dev/myrepos/ESP-MinerAlt/ESP-Miner/components/asic/bm1368.c:125:20: note: in expansion of macro 'GPIO_ASIC_RESET'
  125 |     gpio_set_level(GPIO_ASIC_RESET, 0);
      |                    ^~~~~~~~~~~~~~~
/home/dev/myrepos/ESP-MinerAlt/ESP-Miner/components/asic/bm1368.c:18:25: note: each undeclared identifier is reported only once for each function it appears in
   18 | #define GPIO_ASIC_RESET CONFIG_GPIO_ASIC_RESET
      |                         ^~~~~~~~~~~~~~~~~~~~~~
/home/dev/myrepos/ESP-MinerAlt/ESP-Miner/components/asic/bm1368.c:125:20: note: in expansion of macro 'GPIO_ASIC_RESET'
  125 |     gpio_set_level(GPIO_ASIC_RESET, 0);
      |                    ^~~~~~~~~~~~~~~
/home/dev/myrepos/ESP-MinerAlt/ESP-Miner/components/asic/bm1368.c: In function 'BM1368_init':
/home/dev/myrepos/ESP-MinerAlt/ESP-Miner/components/asic/bm1368.c:18:25: error: 'CONFIG_GPIO_ASIC_RESET' undeclared (first use in this function); did you mean 'GPIO_ASIC_RESET'?
   18 | #define GPIO_ASIC_RESET CONFIG_GPIO_ASIC_RESET
      |                         ^~~~~~~~~~~~~~~~~~~~~~
/home/dev/myrepos/ESP-MinerAlt/ESP-Miner/components/asic/bm1368.c:246:34: note: in expansion of macro 'GPIO_ASIC_RESET'
  246 |     esp_rom_gpio_pad_select_gpio(GPIO_ASIC_RESET);
      |                                  ^~~~~~~~~~~~~~~
ninja: build stopped: subcommand failed.
...

Additional context
Building on the previous commit (f454b0c) seems ok.
https://github.com/skot/ESP-Miner/blob/master/doc/unit_testing.md

@eandersson
Copy link
Collaborator

When you have some time can you take a look at this PR? #634

@tdb3
Copy link
Contributor Author

tdb3 commented Jan 11, 2025

When you have some time can you take a look at this PR? #634

Thanks. Took a look at it. Great work!
I checked out head of the #634 branch (4a07ee4), and unit test building was successful. Will close the Issue once #634 is merged.

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

2 participants