if you don't want to wrap gpio_put yourself, you can write (1
@riccardo17963 жыл бұрын
Really enjoying these arm vids, wish you did a more in depth course or something
@renechawy3 жыл бұрын
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.
@LowLevelTV3 жыл бұрын
Glad it was helpful!
@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.
@pup43013 жыл бұрын
I was literally researching this.
@arturk.22302 жыл бұрын
Dziękujemy.
@skf9573 жыл бұрын
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-en7er3 жыл бұрын
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.
@LowLevelTV3 жыл бұрын
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-nav3 жыл бұрын
noice, i spent more than 4 hrs before peeking in the comments
@williamdrum98992 жыл бұрын
Come to think of it, what's the difference between bx lr and MOV PC,LR
@plankalkulcompiler94688 күн бұрын
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.
@mytechnotalent3 жыл бұрын
Awesome!
@waelsadek812 жыл бұрын
@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 ?
@Dygear3 жыл бұрын
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.).
@siksniper19962 жыл бұрын
What would be a practical scenario where you need to write an assembly function?
@tetraquark24022 жыл бұрын
for the sake of being able to
@williamdrum98992 жыл бұрын
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.
@1900OP2 жыл бұрын
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.
@williamdrum98992 жыл бұрын
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)
@GuyA2 жыл бұрын
how to find the 1st video of how to do asm ? i want to run the full collection. thank you
@WistrelChianti2 жыл бұрын
fascinating how you can just call the c function from within the assembly
@williamdrum98992 жыл бұрын
Fun fact: C functions have memory addresses too. You can do something like printf("Main is stored at %p",&main);
@marcosdominguez47593 жыл бұрын
Very nice explanation How to compile poiasm seudoinstructios?
@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?
@dogukanbicer42283 жыл бұрын
what operating system do you use on your computer?