How to Write ARM Assembly Language for the Raspberry Pi Pico

  Рет қаралды 26,724

Low Level

Low Level

Күн бұрын

Пікірлер: 29
@minirop
@minirop 2 жыл бұрын
if you don't want to wrap gpio_put yourself, you can write (1
@riccardo1796
@riccardo1796 3 жыл бұрын
Really enjoying these arm vids, wish you did a more in depth course or something
@renechawy
@renechawy 3 жыл бұрын
Mr LLP thank you for time to make this video. Since last month of the request, searching web no book for the popular Pico on assembly no books or course. This us why, the ecosystem in million of devices around the world 🌎 so many thanks, for your time again and whenever you like a revision 2 or more will be awesome.
@LowLevelTV
@LowLevelTV 3 жыл бұрын
Glad it was helpful!
@JonPrevost
@JonPrevost Жыл бұрын
Fantastic work. I do think the asm direct port manipulation would have perfected this video. I see there is a comment suggesting how. Much appreciation for the free content.
@pup4301
@pup4301 3 жыл бұрын
I was literally researching this.
@arturk.2230
@arturk.2230 2 жыл бұрын
Dziękujemy.
@skf957
@skf957 3 жыл бұрын
Well, that hit the spot, thanks! I'm (slowly) learning C++ and have a couple of Pico's that I want to link via RFM69HCW radio modules (running before I can walk), and in the same vein of getting ahead of myself wanted to know how to call ASM code from the C++ program. Now I know. Or rather, I know where to look. Thanks again!
@Max-en7er
@Max-en7er 3 жыл бұрын
Doesn't this assembly program have a bug? At 7:03 you do a 'b my_gpio_put' but the 'b' is an unconditional branch without link, thus you can't return to the line after the 'b my_gpio_put'. In the my_gpio_put call the "return" in the C code will do the return as "bx lr" but since the assembly code hasn't set LR it will jump back to the whatever value was last set in LR, which is the line after the call to loop() (which also the end of the function). Thus the 'cpsie if' instruction is never executed. I think the assembly code should do 'bl my_gpio_put' and at the end 'bx lr' for normal operation.
@LowLevelTV
@LowLevelTV 3 жыл бұрын
Good eye! Yeah I noticed this bug a day after I uploaded the video. It still gets the point across but youre right that the returning doesnt work correctly.
@pro-nav
@pro-nav 3 жыл бұрын
noice, i spent more than 4 hrs before peeking in the comments
@williamdrum9899
@williamdrum9899 2 жыл бұрын
Come to think of it, what's the difference between bx lr and MOV PC,LR
@plankalkulcompiler9468
@plankalkulcompiler9468 8 күн бұрын
Hey, awesome video! Can you do RISC-V Assembly videos for Pi Pico 2, given it has a RISC-V core and is highly available/comfy to use? Its comfier than other RISC-V based MCU boards for sure.
@mytechnotalent
@mytechnotalent 3 жыл бұрын
Awesome!
@waelsadek81
@waelsadek81 2 жыл бұрын
@3:42 I wonder why only stdio_init_all and gpio_init are listed ? Why gpio_set_dir and gpio_put are not ? Is it kind of optimization and these are the defaults ?
@Dygear
@Dygear 3 жыл бұрын
This video is great! I actually want to do something like this to turn on a bunch of Neopixels for 250 micro seconds, and then turn them off again for 71 milliseconds (71,000 microseconds). I’m just not entirely sure if the Neopixel 800kHz data rate will allow me to do that entirely. (Trying to made a 14 Hz strobe light with Neopixels.).
@siksniper1996
@siksniper1996 2 жыл бұрын
What would be a practical scenario where you need to write an assembly function?
@tetraquark2402
@tetraquark2402 2 жыл бұрын
for the sake of being able to
@williamdrum9899
@williamdrum9899 2 жыл бұрын
When you need to do something very specific to the hardware that C wouldn't understand, or doesn't have syntax for. Such as: disabling interrupts, bit rotates, using IN/OUT to talk to external hardware, etc.
@1900OP
@1900OP 2 жыл бұрын
When time is critical and the code isn't meant to be portable, you can optimize hot functions if you know how to do it better than the compiler. Also assembly knowledge is valuable in embedded systems, looking at the assembly output can give you hints on why your programs are slow or chunky.
@williamdrum9899
@williamdrum9899 2 жыл бұрын
Gotta love LDR =#, if you've ever tried ARM Assembly using an assembler that doesn't have it... well lets just say you're putting your sanity at RISC (ba-dum tsss)
@GuyA
@GuyA 2 жыл бұрын
how to find the 1st video of how to do asm ? i want to run the full collection. thank you
@WistrelChianti
@WistrelChianti 2 жыл бұрын
fascinating how you can just call the c function from within the assembly
@williamdrum9899
@williamdrum9899 2 жыл бұрын
Fun fact: C functions have memory addresses too. You can do something like printf("Main is stored at %p",&main);
@marcosdominguez4759
@marcosdominguez4759 3 жыл бұрын
Very nice explanation How to compile poiasm seudoinstructios?
@sdmayday
@sdmayday Жыл бұрын
Great video! Will this asm code always be read from flash during runtime or is there a way to let it execute from sram?
@dogukanbicer4228
@dogukanbicer4228 3 жыл бұрын
what operating system do you use on your computer?
@LowLevelTV
@LowLevelTV 3 жыл бұрын
Ubuntu 20.04 :)
@MrVipulLal
@MrVipulLal 3 жыл бұрын
Very shallow example
rust runs on EVERYTHING (no operating system, just Rust)
18:10
Low Level
Рет қаралды 363 М.
Players push long pins through a cardboard box attempting to pop the balloon!
00:31
УДИВИЛ ВСЕХ СВОИМ УХОДОМ!😳 #shorts
00:49
Turn Off the Vacum And Sit Back and Laugh 🤣
00:34
SKITSFUL
Рет қаралды 11 МЛН
Как Я Брата ОБМАНУЛ (смешное видео, прикол, юмор, поржать)
00:59
RP2040 - NO SDK! Assembly Language Programming - BMA -04
25:19
Life with David
Рет қаралды 5 М.
rust runs on EVERYTHING (no operating system, just Rust)
14:29
Low Level
Рет қаралды 216 М.
Raspberry Pi Pico
16:16
ExplainingComputers
Рет қаралды 317 М.
#370 Raspberry Pi Pico vs ESP32 (-S2) and STM32 Blackpill
15:53
Andreas Spiess
Рет қаралды 392 М.
Raspberry Pi Pico - PIO explained
50:01
Slador
Рет қаралды 32 М.
Raspberry Pi  Pico PIO  - 8 Little Processors You Can Program
31:55
Gary Explains
Рет қаралды 94 М.
RP2040 - Introduction to Assembly Language - BMA-01
25:21
Life with David
Рет қаралды 13 М.
Pi Pico + KMK = the perfect combo for Custom Keyboards
7:41
Jan Lunge
Рет қаралды 81 М.
Players push long pins through a cardboard box attempting to pop the balloon!
00:31