Boa noite a todos,
Gostaria de partilhar a seguinte
informação avançada sobre programação com
Raspberry Pi Pico.
Play List -
Raspberry Pi Picohttps://www.youtube.com/playlist?list=PLc7W4b0WHTAV6EYRVayb9c9dEsq-NeXAtPlay List -
ARM Assembly - Para micro-controladores
youtube.com/playlist?list=PLc7W4b0WHTAXkCy3RUAO0Eqx52ALTLUdqGetting Started with Debugging using GDB - Find Bugs in Your Code with A Couple Easy Commands
Play List - Intro to Raspberry Pi Pico and RP2040 - DigiKeyhttps://www.youtube.com/playlist?list=PLEBQazB0HUyQO6rJxKr2umPCgmfAU-cqR---------
Rust no Raspberry Pico.Getting Started with
Rust on a Raspberry Pi Pico (Part 1)https://reltech.substack.com/p/getting-started-with-rust-on-a-raspberryGetting Started with
Rust on a Raspberry Pi Pico (Part 2)https://reltech.substack.com/p/getting-started-with-raspberry-piGetting Started with
Rust on a Raspberry Pi Pico (Part 3)https://reltech.substack.com/p/getting-started-with-rust-on-a-raspberry-a88Normalmente para ter-se um interface de série para o Raspberry Pico tem de se ligar uma conversor USB-Serial por exemplo com um chip FTDI. Mas como o micro-controlador do pico implementa USB por hardware basta ter o stack em falta de USB em software para implementar qualquer tipo de device USB no Pico.
E o link para o project template seguinte de um comentário da página anterior:--
Oleg Eterevsky Dec 5, 202 1Liked by Jim Hodapp
Hey! Thank you for this series of post.
I was just playing around with some RP2040 controllers, and ended up with a slightly simpler setup (IMO). Instead of using a separate controller for handling the debug, I've just set up debug logging via USB serial port. This requires a bit more boilerplate (handling the USB interrupt and such), but is much simpler from the hardware perspective: you need to just plug in a single Pico board in your USB, flash it and you can immediately see the debug output.
Here's my USB_Serial - repo: https://github.com/eterevsky/rp2040-blink--
O project template anterior funciona graças a este crate / package:
usb-device - Experimental device-side USB stack for embedded devices.
https://crates.io/crates/usb-deviceHAL - Hardware Abstraction LayerGithub
rp-hal - Rust support for the "Raspberry Silicon" family of microcontrollershttps://github.com/rp-rs/rp-halrp2040_hal - Documentationhttps://github.com/rp-rs/rp-halExemplos Rust para a board do rp-picohttps://github.com/rp-rs/rp-hal/tree/main/boards/rp-picoExemplos Rust genéricos para a HAL do Pico - rp2040-hal https://github.com/rp-rs/rp-hal/tree/main/rp2040-hal/examplesNOTA_1: Vejam o exemplo de
RTIC para micro-controladores que é um mini sistema operativo muito rápido em Rust.
NOTA_2: Pode-se fazer o reboot por botão externo de Run a GND, fazendo com que se carregue no botão de Boot e enquanto este tiver carregado, carrega-se num botão externo no pino Run a GND e depois solta-se o botão de Boot e ele entra em modo de programação. Isto sem ser necessário retirar o cabo USB e voltar a ligar.
Com o modulo de USB programado no MCU também se pode fazer o equivalente a um SCANF() do porto USB-Serial e depois emitir um reboot em modo de boot loader de programação sem ter de carregar no botões (pode estar dentro de um script). Nota: Eu ainda não testei esta parte mas deve funcionar.
Obrigado,
Cumprimentos,
João