defined with multiple prompts in single location

_arhi_
Posts: 4
Joined: Thu Jul 14, 2022 6:42 am

defined with multiple prompts in single location

Postby _arhi_ » Thu Jul 14, 2022 7:08 am

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

ESP_Sprite
Posts: 9591
Joined: Thu Nov 26, 2015 4:08 am

Re: defined with multiple prompts in single location

Postby ESP_Sprite » Fri Jul 15, 2022 2:11 am

Well, you have two 'config YYY_GPIO' lines in that Kconfig fragment, for one...

_arhi_
Posts: 4
Joined: Thu Jul 14, 2022 6:42 am

Re: defined with multiple prompts in single location

Postby _arhi_ » Sat Jul 23, 2022 4:52 am

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

Who is online

Users browsing this forum: martins and 136 guests