I checked the wiki page and could not find any source for building the firmware image on Windows. Is there a way to achieve this with Windows 10? Moreover, is it necessary to do this in order to program ARM core of Pluto? If so, after building firmware image, what should I do to run code examples like https://wiki.analog.com/university/tools/pluto/controlling_the_transceiver_and_transferring_data ?
Thanks for your time.
No, the firmware cannot be built on Windows. Generally building a Linux kernel on Windows usually doesn't work. Building the firmware is only necessary if you want to create something persistent on the device or change around the system in any way. Built firmware releases that can be just copied over to the device are available here: https://github.com/analogdevicesinc/plutosdr-fw/releases
If you just want to run scripts on the device itself you can either do so over SSH or by using a USB drive: https://wiki.analog.com/university/tools/pluto/devs/usb_otg
Streaming data to and from the transceiver can be done both remotely or on the device. Most users tend to use applications like MATLAB/Simulink, GNU Radio or others (See info.html on the device itself.)
We need to implement transmitter-receiver algorithms on the device itself rather than a remote solution. After building firmware image, how should I incorparate the necessary code? Should it be written in C?
Thanks in advance.
If you want your apps to be in the firmware you need to modify buildroot.
Here is example of how we added a library: https://github.com/analogdevicesinc/buildroot/commit/72f3cd7868fbecf4aa777ac9fdddace2990b9436
Know that to run C code it must be compiled with the same tools the firmware was compiled with and against the firmware's sysroot.
Where do I get buildroot image? For example, in this page it is only mentioned once without much detail https://wiki.analog.com/university/tools/pluto/building_the_image. Also, after adding the custom library, will it automatically be executed or need a trigger.
Thanks a lot.
Buildroot is part of the firmware. Its one of the repos you download.
You have to add scripts to init.d for them to start automatically on boot or something else. We have a number of custom scripts here: https://github.com/analogdevicesinc/buildroot/tree/pluto/board/pluto
which get added from here: https://github.com/analogdevicesinc/buildroot/blob/2e4817b2c0b18796ac319b80d3919664fb7d7c8a/board/pluto/post-build.sh
If you don't want to build custom firmware you can always run code from a USB stick connected to Pluto over OTG.
Thank you for your clarification. Regarding USB OTG, for example if we want to execute a C code that calculates FFT of sampled waveform and updates oscillator frequency accordingly, can we just include C code with the USB memory and refer it with a shell script? Thanks in advance
Here is an example program: https://github.com/analogdevicesinc/plutosdr_scripts/blob/master/power_check.c
Makefile (arm target): https://github.com/analogdevicesinc/plutosdr_scripts/blob/master/makefile
Start script: https://github.com/analogdevicesinc/plutosdr_scripts/blob/master/runme0.sh
One final question. Can we build the firmware image by using USB port of PLUTO or should we use empty JTAG pins on the board?
Thanks in advance