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

Kconfig interface for Pico SDK (WiP) #1176

Open
DatanoiseTV opened this issue Jan 18, 2023 · 4 comments
Open

Kconfig interface for Pico SDK (WiP) #1176

DatanoiseTV opened this issue Jan 18, 2023 · 4 comments

Comments

@DatanoiseTV
Copy link
Contributor

DatanoiseTV commented Jan 18, 2023

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

@peterharperuk
Copy link
Contributor

peterharperuk commented Jan 18, 2023

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

@lurch
Copy link
Contributor

lurch commented Jan 18, 2023

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
Copy link
Contributor Author

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.

@DatanoiseTV
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants