Skip to content

cschorn01/rp2040Make

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 

Repository files navigation

rp2040Make

By Chris Schorn Download Repository Zip

Shell Script C CMake Raspberry Pi

Description Functionality File Structure How to Use

Stargazers repo roster for @cschorn01/rp2040Make

Description

Easy to use Raspberry Pi Pico command line build sequence replacement. There is both C and shell script files for whatever tickles your fancy. There is also a version that works with FreeRTOS in raspberry_pi_pico_lora_template.

Functionality

Instead of running the five commands used for building a Raspberry Pi Pico project:

rm -r build
mkdir build
cmake -D PICO_SDK_PATH=/Absolute/Path/To/pico-sdk -B ./build  #cmake from project folder into build folder
make -C build  # -C changes folder to build before running make

Replace that with shell script, or C code running shell commands, including export PICO_SDK_PATH=/Path/To/pico-sdk.

File Structure

The file structure shown here is the layout for the Raspberry Pi Github Examples with this file included.

How to Use

For this to work on your machine, add the path to your pico_sdk folder in the cmake command.

cmake -D PICO_SDK_PATH=/Absolute-Path-To/pico-sdk -B ./build

Then the rp2040Make.sh file will need its execute permissions changes. For this run:

chmod +x rp2040Make.sh

Now this file can be run using ./rp2040Make.sh.

For the C code, after you add your path, just compile the code and run the output.

gcc rp2040Make.c
./a.out

After running these command line prompts you should see a build folder appear, the output from CMake, and the build folder become populated.