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

idf.py issue (IDFGH-1889) #4092

Closed
mmt-10 opened this issue Sep 19, 2019 · 13 comments
Closed

idf.py issue (IDFGH-1889) #4092

mmt-10 opened this issue Sep 19, 2019 · 13 comments
Labels
Resolution: Done Issue is done internally Status: Done Issue is done internally

Comments

@mmt-10
Copy link
Contributor

mmt-10 commented Sep 19, 2019

Hi,

I found below 2 issue.

  • idf.py ignores menuconfig --> Serial flasher config --> before flashing (No reset) option.
  • idf.py does not support defconfig option.
@github-actions github-actions bot changed the title idf.py issue idf.py issue (IDFGH-1889) Sep 19, 2019
@Alvin1Zhang
Copy link
Collaborator

@tatsutaigu Thanks for reporting the issue. Would you please help provide more details as suggested in the issue template? Information like elf, sdk configuration, backtrace, log outputs, commit ID, hardware and etc. would help us debug further. Thanks.

@mmt-10
Copy link
Contributor Author

mmt-10 commented Sep 19, 2019

Hi, @Alvin1Zhang

Environment

  • Development Kit: ESP32-DevKitC
  • Kit version (for DevKitC): v4
  • Module or chip used: ESP32-WROOM-32D|ESP32-SOLO-1
  • IDF version (run git describe --tags to find it): v4.1-dev-281-g96b96ae24
  • Build System: idf.py
  • Compiler version (run xtensa-esp32-elf-gcc --version to find it): xtensa-esp32-elf-gcc (crosstool-NG esp32-2019r1) 8.2.0
  • Operating System: Linux
  • Power Supply:USB

Problem Description

  • ignored before flashing (No reset)
    sample code:blink
    I set idf.py menuconfig --> Serial flasher config --> before flashing (No reset) option.
    But, idf.py ignore before flashing (No reset) option when I do idf.py -p /dev/ttyS20 flash.
    And, I cannot find --before no_reset option on below message.esptool.py reset before operation

$ idf.py build
[687/687] Generating binary image from built executable
esptool.py v2.8-dev
Generated /home/muto/esp/esp-idf/examples/get-started/blink/build/blink.bin

Project build complete. To flash, run this command:
../../../components/esptool_py/esptool/esptool.py -p (PORT) -b 921600 --after hard_reset write_flash --flash_mode dio --flash_size detect --flash_freq 40m 0x1000 build/bootloader/bootloader.bin 0x8000 build/partition_table/partition-table.bin 0x10000 build/blink.bin
or run 'idf.py -p (PORT) flash'

  • does not support defconfig
    sample code:ble mesh node
    This sample code should do make defconfig before build.IDFGH-1888
    But, idf.py does not prepare defconfig option.idf.py option

@kumekay
Copy link
Collaborator

kumekay commented Sep 19, 2019

Hi @tatsutaigu,
Thank you for the issue,

  • We will add missing --before parameter
  • If you just run idf.py build it will create sdkconfig automatically. If you want only create sdkconfig idf.py reconfigure can be used. This part of the issue is duplication of idf.py missing target defconfig (IDFGH-1730) #3965

@mmt-10
Copy link
Contributor Author

mmt-10 commented Sep 19, 2019

Hi, @kumekay ,

Thank you for your reply.

About defconfig,
I'm sorry, I cannot understand it.
when idf.py build, value of sdkconfig.default set to sdkconfig?
How do I let sdkconfig file reflect default value of sdkconfig.default?

@kumekay
Copy link
Collaborator

kumekay commented Sep 19, 2019

If sdkconfig is missing project build targets (like idf.py build) will automatically create sdkconfig file, populated with the settings from sdkconfig.defaults file, and the rest of the settings will be set to their default values.

If sdkconfig is present, settings that are already in sdkconfig will not be overriden by the ones in sdkconfig.defaults

@mmt-10
Copy link
Contributor Author

mmt-10 commented Sep 19, 2019

Thank you for your advice.

I have solved the problem.
When sdkconfig is missing and idf.py menuconfig, idf.py menuconfig does not read default value from sdkconfig.defaults.
If sdkconfig already exists, I remove it and copy sdkconfig.defaults to sdkconfig.
after that, idf.py menuconfig reads copied sdkconfig.

$ rm sdkconfig
$ rm sdkconfig.old
$ cp sdkconfig.defaults sdkconfig
$ idf.py menuconfig

@kumekay
Copy link
Collaborator

kumekay commented Sep 19, 2019

idf.py menuconfig should read values of sdkconfig.defaults. Could you, please share your sdkconfig.defaults and Kconfig.projbuild (if you have it)?

@mmt-10
Copy link
Contributor Author

mmt-10 commented Sep 19, 2019

I already wrote it on Problem Description.
#4092 (comment)

I use below example.
I did not modify code.
can you duplicate this issue?
https://github.com/espressif/esp-idf/tree/master/examples/bluetooth/esp_ble_mesh/ble_mesh_node

@kumekay
Copy link
Collaborator

kumekay commented Sep 19, 2019

@tatsutaigu
Yes, there is an issue with some parameters in sdkconfig.defaults that were recently renamed, for example CONFIG_BTU_TASK_STACK_SIZE -> CONFIG_BT_BTU_TASK_STACK_SIZE, while both old and new names are updated through menuconfig and stored in sdkconfig, old names are ignored in sdkconfig.defaults by cmake.
We will fix this.

@mmt-10
Copy link
Contributor Author

mmt-10 commented Sep 19, 2019

@kumekay
Thank you for checking.

When I did below command sequence,
CONFIG_BTU_TASK_STACK_SIZE and CONFIG_BT_BTU_TASK_STACK_SIZE are defined automatically.

$ rm sdkconfig
$ rm sdkconfig.old
$ cp sdkconfig.defaults sdkconfig
$ idf.py menuconfig

$ grep CONFIG_BTU_TASK_STACK_SIZE sdkconfig
CONFIG_BTU_TASK_STACK_SIZE=4512

$ grep CONFIG_BT_BTU_TASK_STACK_SIZE sdkconfig
CONFIG_BT_BTU_TASK_STACK_SIZE=4512

update

When I did below command sequence ( without cp sdkconfig.defaults sdkconfig),
CONFIG_BTU_TASK_STACK_SIZE and CONFIG_BT_BTU_TASK_STACK_SIZE are defined, but each value are different from sdkconfig.defaults.

$ rm sdkconfig
$ rm sdkconfig.old
$ idf.py menuconfig

$ grep CONFIG_BTU_TASK_STACK_SIZE sdkconfig
CONFIG_BTU_TASK_STACK_SIZE=4096

$ grep CONFIG_BT_BTU_TASK_STACK_SIZE sdkconfig
CONFIG_BT_BTU_TASK_STACK_SIZE=4096

.

@kumekay
Copy link
Collaborator

kumekay commented Sep 20, 2019

Yes, the issue is that if you have deprecated name in sdkconfig.defaults i.e. CONFIG_BTU_TASK_STACK_SIZE it's ignored,
for compatibility both CONFIG_BTU_TASK_STACK_SIZE and CONFIG_BT_BTU_TASK_STACK_SIZE are set in sdkconfig to default value of CONFIG_BT_BTU_TASK_STACK_SIZE that is 4096.

As I mentioned before, we are working on fix.

@dobairoland
Copy link
Collaborator

So there are three issues here mentioned:

  • missing before for flashing,
  • missing defconfig, and
  • problem with deprecated options in sdkconfig.defaults.

Since the missing defconfig is a duplicate of #3965, I propose to ignore it here. @tatsutaigu you can follow that issue and it will be solved when it gets closed. I will reference this current issue in the commit where I fix the sdkconfig.defaults. And #4125 could close this issue.

igrr pushed a commit that referenced this issue Oct 13, 2019
The issue was pointed out also in
#4092
igrr pushed a commit that referenced this issue Oct 27, 2019
The issue was pointed out also in
#4092
@kumekay
Copy link
Collaborator

kumekay commented May 19, 2020

@tatsutaigu If all problems described in the issue are solved, could you please close it?

@mmt-10 mmt-10 closed this as completed May 19, 2020
bencbyers pushed a commit to ifit/esp-idf that referenced this issue Apr 28, 2021
@espressif-bot espressif-bot added Resolution: Done Issue is done internally Status: Done Issue is done internally labels May 3, 2021
espressif-bot pushed a commit to espressif/esp-idf-kconfig that referenced this issue Oct 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Done Issue is done internally Status: Done Issue is done internally
Projects
None yet
Development

No branches or pull requests

5 participants