Page 1 of 1

defined with multiple prompts in single location

Posted: Thu Jul 14, 2022 7:08 am
by _arhi_
I'm getting some warnings:

warning: XXX_GPIO (defined at .../Kconfig.projbuild:34) defined with multiple prompts in single location
warning: YYY_GPIO (defined at .../Kconfig.projbuild:48) defined with multiple prompts in single location
warning: ZZZ_GPIO (defined at .../Kconfig.projbuild:62) defined with multiple prompts in single location

But none of them is mentioned anywhere else in any of the projects?! Not sure what this "multiple prompts" is supposed to tell me :(

I'm trying to make a component (so far it works only this warning is bugging me)

the kconfig in question

Code: Select all

menu "XXX Configuration"

	config GPIO_RANGE_MAX
		int
		default 33 if IDF_TARGET_ESP32
		default 46 if IDF_TARGET_ESP32S2
		default 19 if IDF_TARGET_ESP32C3
		default 48 if IDF_TARGET_ESP32S3

	choice INTERFACE
		prompt "Interface"
		default SPI_INTERFACE
		help
			Select Interface.
		config GPIO_INTERFACE
			bool "GPIO Interface"
			help
				Use GPIO to bitbang communication.
		config SPI_INTERFACE
			bool "SPI Interface"
			help
				SPI Interface.
	endchoice

	config SPI_FREQUENCY
		depends on SPI_INTERFACE
		int "SPI INTERFACE"
		range 10000 1000000
		default 500000 
		help
			SPI Frequency. 
			
	config XXX_GPIO
		prompt "XXX pin"
		int "XXX GPIO number"
		range 0 GPIO_RANGE_MAX
		default 23 if IDF_TARGET_ESP32
		default 35 if IDF_TARGET_ESP32S2
		default 35 if IDF_TARGET_ESP32S3
		default  0 if IDF_TARGET_ESP32C3
		help
			GPIO number 

	config YYY_GPIO
		prompt "YYY pin"
		int "YYY GPIO number"
		range 0 GPIO_RANGE_MAX
		default 18 if IDF_TARGET_ESP32
		default 36 if IDF_TARGET_ESP32S2
		default 36 if IDF_TARGET_ESP32S3
		default  1 if IDF_TARGET_ESP32C3
		help
			GPIO number 

	config YYY_GPIO
		prompt "YYY pin"
		int "YYY GPIO number"
		range 0 GPIO_RANGE_MAX
		default 13
		help
			GPIO number 


endmenu

I just started with IDF and it is nice but not sure how to debug this configuration system

Re: defined with multiple prompts in single location

Posted: Fri Jul 15, 2022 2:11 am
by ESP_Sprite
Well, you have two 'config YYY_GPIO' lines in that Kconfig fragment, for one...

Re: defined with multiple prompts in single location

Posted: Sat Jul 23, 2022 4:52 am
by _arhi_
Hi,
The second fragment was ZZZ sorry bad copy/paste.

Problem is solved by removing the "prompt" lines so

Code: Select all

menu "XXX Configuration"

	config GPIO_RANGE_MAX
		int
		default 33 if IDF_TARGET_ESP32
		default 46 if IDF_TARGET_ESP32S2
		default 19 if IDF_TARGET_ESP32C3
		default 48 if IDF_TARGET_ESP32S3

	choice INTERFACE
		prompt "Interface"
		default SPI_INTERFACE
		help
			Select Interface.
		config GPIO_INTERFACE
			bool "GPIO Interface"
			help
				Use GPIO to bitbang communication.
		config SPI_INTERFACE
			bool "SPI Interface"
			help
				SPI Interface.
	endchoice

	config SPI_FREQUENCY
		depends on SPI_INTERFACE
		int "SPI INTERFACE"
		range 10000 1000000
		default 500000 
		help
			SPI Frequency. 
			
	config XXX_GPIO
		; prompt "XXX pin"
		int "XXX GPIO number"
		range 0 GPIO_RANGE_MAX
		default 23 if IDF_TARGET_ESP32
		default 35 if IDF_TARGET_ESP32S2
		default 35 if IDF_TARGET_ESP32S3
		default  0 if IDF_TARGET_ESP32C3
		help
			GPIO number 

	config YYY_GPIO
		; prompt "YYY pin"
		int "YYY GPIO number"
		range 0 GPIO_RANGE_MAX
		default 18 if IDF_TARGET_ESP32
		default 36 if IDF_TARGET_ESP32S2
		default 36 if IDF_TARGET_ESP32S3
		default  1 if IDF_TARGET_ESP32C3
		help
			GPIO number 

	config ZZZ_GPIO
		; prompt "ZZZ pin"
		int "ZZZ GPIO number"
		range 0 GPIO_RANGE_MAX
		default 13
		help
			GPIO number 


endmenu
I used here ";" as comment, no clue what is the format for comment in this file, originally I just removed the lines but left here with comment for documentation if someone else ends up searching for same solution