GithubHelp home page GithubHelp logo

javier-varez / rp2040_app Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 11 KB

Playing around with a raspberry pi pico in bare metal

License: MIT License

Makefile 7.38% Assembly 10.20% C++ 24.97% Python 57.46%

rp2040_app's Introduction

rp2040 App

Application to play around with a raspberry pi pico in bare metal (no sdk)

Getting the sources

This project uses other git dependencies. There is a master manifest file for repo that defines all dependencies and can be used to download all dependencies here. You can sync the sources by getting repo first:

# Or install from source.
mkdir -p ~/.bin
PATH="${HOME}/.bin:${PATH}"
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/.bin/repo
chmod a+rx ~/.bin/repo

Then you can setup the repository by running:

mkdir repo
cd repo
repo init -u https://github.com/Javier-varez/manifest -g rp2040_app
repo sync -c

Once this finishes you should have the following tree:

./
├── buildsystem/
├── cortex-m_atomics/
├── cortex-m_startup/
├── Makefile -> buildsystem/template.mk
├── postform/
├── rp2040_app/
└── third_party/

Building the project

The build process is described for Ubuntu 20.04. Other linux distributions or operating systems might need different configurations. You might want to use the ATE Builder docker image instead of setting up the local environment. This image already contains all tools required to build the software, so no other packages need to be installed

If you decided to install all the packages locally, you will need to check the dependencies listed in the ATE Build System project. In addition, you need to make sure to install the following dependencies:

sudo apt install \
    git \
    make \
    python3 \
    python-is-python3 \
    clang \
    lld

You will also need the gcc-arm-none-eabi toolchain, which you can find here. Make sure to add the bin folder to the PATH environment variable.

After getting these requirements, run make in the root of the repository we previously downloaded with repo. The output should be similar to this:

root@afe22045af7c:/opt/repo# make -j
[libcortex_m_startup] CXX startup.cpp
[libcortex_m_startup] LINKER_SCRIPT cortex-m_startup/cortex-m.ld
[libcortex_m_startup] AR
[rp2040_app] CXX main.cpp
[rp2040_app] AS bs2_default_padded_checksummed.s
[rp2040_app] LD
[rp2040_app.hex] objcopy
[rp2040_app.uf2] uf2conv

You can find the uf2 target image under build/targets/rp2040_app.uf2. Drag and drop this file into the MSC device mounted by the rp2040.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.