Kconfig interface for Pico SDK (WiP) #1176

Open
opened 2023-01-17 18:17:27 -06:00 by DatanoiseTV · 4 comments
DatanoiseTV commented 2023-01-17 18:17:27 -06:00 (Migrated from github.com)

I am currently hacking on Kconfig support for my custom Pico SDK template, but would love to see something like this "out of the box" in the PicoSDK. It provides some options that are also passed by the pico-project-generator usually.

The plan is to also support "esp-idf style" components with own Kconfig submenus, so invididual subcomponents / libraries can be configured via menuconfig instead of editing defines or CMakeLists.txt.

image

asciicast

I am currently hacking on Kconfig support for my custom Pico SDK template, but would love to see something like this "out of the box" in the PicoSDK. It provides some options that are also passed by the pico-project-generator usually. The plan is to also support "esp-idf style" components with own Kconfig submenus, so invididual subcomponents / libraries can be configured via menuconfig instead of editing defines or CMakeLists.txt. ![image](https://user-images.githubusercontent.com/6614616/213042907-78a68572-609d-47a6-b352-3c97aa727411.png) [![asciicast](https://asciinema.org/a/UsZOEgVDXhNiOhoyz0DVeG7xo.svg)](https://asciinema.org/a/UsZOEgVDXhNiOhoyz0DVeG7xo)
peterharperuk commented 2023-01-18 04:16:34 -06:00 (Migrated from github.com)

A lot of the config options should be marked with // PICO_CONFIG: , , group= I wonder if it could use those?

A lot of the config options *should* be marked with // PICO_CONFIG: <name>, <description>, group=<lib> I wonder if it could use those?
lurch commented 2023-01-18 04:41:36 -06:00 (Migrated from github.com)

A lot of the config options should be marked with // PICO_CONFIG: , , group= I wonder if it could use those?

Yup, those automatically get extracted by https://github.com/raspberrypi/pico-sdk/blob/master/tools/extract_configs.py into the pico_configs.tsv used by https://github.com/raspberrypi/pico-project-generator/
ping @JamesH65 for his thoughts.

> A lot of the config options should be marked with // PICO_CONFIG: , , group= I wonder if it could use those? Yup, those automatically get extracted by https://github.com/raspberrypi/pico-sdk/blob/master/tools/extract_configs.py into the `pico_configs.tsv` used by https://github.com/raspberrypi/pico-project-generator/ ping @JamesH65 for his thoughts.
DatanoiseTV commented 2023-01-18 08:21:14 -06:00 (Migrated from github.com)

Also as side-note things like GPIO and custom peripheral initialization and CPU overclocking could be maybe done via:

void __attribute__ ((constructor)) premain(){
    // init hardware and overclock cpu
}

to be done before main() gets executed, so it is more pleasant to the user.

Also as side-note things like GPIO and custom peripheral initialization and CPU overclocking could be maybe done via: ```c void __attribute__ ((constructor)) premain(){ // init hardware and overclock cpu } ``` to be done before main() gets executed, so it is more pleasant to the user.
DatanoiseTV commented 2023-01-19 07:24:09 -06:00 (Migrated from github.com)

With the current proof of concept, i am able to load defconfigs for different boards which can also contain pin definitions for custom peripheral etc. It would be great if the pico-sdk would adopt the possibility to include "components" like in the esp-idf which can contain their own Kconfig.

For building I can use now:

cmake -GNinja -DBOARD=datanoise_picoadk ..
ninja

For config I can use now:

cmake -GNinja -DBOARD=datanoise_picoadk ..
ninja menuconfig
With the current proof of concept, i am able to load defconfigs for different boards which can also contain pin definitions for custom peripheral etc. It would be great if the pico-sdk would adopt the possibility to include "components" like in the esp-idf which can contain their own Kconfig. For building I can use now: ```shell cmake -GNinja -DBOARD=datanoise_picoadk .. ninja ``` For config I can use now: ```shell cmake -GNinja -DBOARD=datanoise_picoadk .. ninja menuconfig ```
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-raspberrypi/pico-sdk#1176
No description provided.