earlephilhower / arduino-pico

Raspberry Pi Pico Arduino core, for all RP2040 and RP2350 boards
GNU Lesser General Public License v2.1
2.03k stars 422 forks source link

minimal cmake build instructions? - Readme seems out of date. #1234

Closed tlalexander closed 1 year ago

tlalexander commented 1 year ago

I am trying to figure out the minimal setup to build a sketch with cmake. In the readme, the only mention of building with cmake goes to a two year old Toms Hardware article, and the people in the comments of that article mention that the tutorial is completely broken. Also that tutorial makes no mention of cmake.

Anyway I very much appreciate this library. I am trying to merge my application with a serial bootloader someone has made that uses cmake. Any instructions on a basic cmake build setup would be greatly appreciated. Thanks!

earlephilhower commented 1 year ago

Sorry, I think there's a bit of a misunderstanding here. The cmake info was for building plain C/C++ apps, not building Arduino apps. Back when the Pico-SDK came out, getting the SDK up and running was a pain and the Tom's Hardware article was a gret help. Now, I think there's a more developed infrastructure (and a 1-click Windows installer IIRC).

You can use the arduino-cli or Platform.IO to compile an Arduino project from the command line or in a Cmakefile target. There's no Cmakefile recipe for building an Arduino app, to the best of my knowledge.

I'll move this to a discussion since it's more "how do I" vs. a core problem.