Тёмный

RP2040 - Bare Metal - Executing from SRAM - BMA07 

Life with David
Подписаться 9 тыс.
Просмотров 1,4 тыс.
50% 1

Опубликовано:

 

1 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 13   
@stephenwhite506
@stephenwhite506 Год назад
Can the assembler calculate the size to copy? Also, is there a word align directive, so you don't need to manually add the NOP?
@LifewithDavid1
@LifewithDavid1 Год назад
Yes it can, in this case I used the values from the linker script to calculate the size to copy. Regarding word alignment; I believe you are right; I'll have to check into that. I know that you can have word align directives in the linker script between sections; however my data was not in a separate section for this run. A lot of the tutorials showed using a NOP as a pad character; it would be really handy if I didn't have to do that. Thanks for the suggestion.
@bitogre
@bitogre Год назад
Very interesting. I wonder if it would be faster to execute the code that changes the CPU clock speed before coping everything to SRAM and executing there. Is the copy effected by the CPU clock speed? If not, then it would not matter but if it is, it could have a significant difference when your code gets really large and speed up the startup time. Also, given that a lot of the initialization code only gets executed once and is probably under 16Kb, what is the performance difference between executing the initialization before the copy and not coping that initialization code vs coping the code and executing the initialization from SRAM? Maybe the difference is only a few milliseconds but would be interesting to know if boot up time was critical.
@LifewithDavid1
@LifewithDavid1 Год назад
You are correct; it would be MUCH faster to change the clock speed before copying. I did this to see if I could make it happen by using a program I already knew that worked. Now that I've worked out the bugs (and I had a lot of them), I would keep the reset program in XIP flash and move the "real" program at high speed into SRAM. I think the speed difference is in the order of seconds, not milliseconds since the clock speed coming out of reset is V-E-R-Y slow. Thanks for the excellent insight!
@kwpctek9190
@kwpctek9190 Год назад
I'd love to have serial terminal (talking through USB) send a wave file sample to be copied into Sram for playback to an R2R ladder ADC at variable speeds. For a super cheap and simple ARB generator, does this sound feasible?
@LifewithDavid1
@LifewithDavid1 Год назад
Just so happens that I did 3 videos on AWGs. This is the first one: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-_lZ1Pw6WAqI.html See Episodes 15 and 16 also. Good luck
@simbasimba2029
@simbasimba2029 Год назад
What about some audio effects? Maybe real-time pitch shifting? What about a real-time Pi Pico version of AutoTune? Or a nice reverb?
@LifewithDavid1
@LifewithDavid1 Год назад
That would be interesting. I've done several AWG videos as well as MIDI. I've thought about making a little monophonic synthesizer. I'll have to get a lot smarter on how pitch shifting is done; I've used it with limited success with Audacity, but that's on a batch basis. If the math skills of the RP2040 aren't up to the task, maybe a RasPi 5. Thanks for the idea.
@sub_man9550
@sub_man9550 Год назад
Hi David, first i want to thank you for such great work on such amazing machine like pico, i would like to ask you for a video to explain how to use c language on pico without using the c/c++ sdk , thanks again.
@LifewithDavid1
@LifewithDavid1 Год назад
You're welcome. I'm not a c expert; but I think you can use GCC to create a C program without using the C/C++ SDK. However, If you want to use any other RP2040 features like UARTs, PIO, GPIO, DMA, etc, you will have to include a number of libraries that are included in the SDK. I would include the "reset" routines I've developed in ASM to initialize the RP2040. Try using the steps I outlined in my bare metal videos , but use the GCC to create the .S file from the c file. I've got a lot to discover in assembly, so it might be some time until I get to a bare metal C program. Thanks for watching!
@sub_man9550
@sub_man9550 Год назад
thanks, @@LifewithDavid1
@davidtwist3659
@davidtwist3659 Год назад
Thanks very interesting.
@LifewithDavid1
@LifewithDavid1 Год назад
Glad you enjoyed it
Далее
What is the Smallest Possible .EXE?
17:04
Просмотров 399 тыс.
▼ КАПИТАН НАШЁЛ НЕФТЬ В 🍑
33:40
Просмотров 485 тыс.
Why Are Open Source Alternatives So Bad?
13:06
Просмотров 644 тыс.
Raspberry Pi Pico2 vs. Pico - Benchmarks
15:43
Просмотров 1 тыс.
The Unreasonable Effectiveness of Linux Workstations
12:47
WHY IS THE STACK SO FAST?
13:46
Просмотров 156 тыс.
These Keys Shouldn't Exist | Nostalgia Nerd
19:32
Просмотров 680 тыс.
End the line: The last Sun Sparc Workstation
37:32
Просмотров 59 тыс.
But, what is Virtual Memory?
20:11
Просмотров 280 тыс.