Create a build direcotry in the project folder and cd into it.
mkdir build &&cd build
Execute cmake and run make command
cmake ..
make
After that connect the RPI-pico to the computer.
If it is very first flashing direction connection to the computer will work.
If another firmware is already running, push BOOTSEL button and then plug the USB to the computer.
The RPI-pico is conneced to the computer as a drive named RPI-RP2. Copy the .uf2 file within in the build directory and paste it in RPI-RP2. Then the RPI-pico will automatically reboot and LED starts blinking.
For monitoring through serial interface, any program or software that has serial monitro functionality will work. For linux following command will work as well: