Flash a Baremetal ELF on Pluto SDR with No OS AD9363 Code

I want to flash and run a baremetal No Os 9363 on PLUTO Board.

Can any one provide steps to do the same? some pointers will be helpful as I want to do that but I don't know where to start.

I had asked the similar question in the Linux Forum and I am hopeful I would get some solution over here.

https://ez.analog.com/linux-device-drivers/linux-software-drivers/f/q-a/111418/pluto-board-erase-flash-to-program-baremetal-code/332870

Regards

Top Replies

Parents
  • 0
    •  Analog Employees 
    on May 29, 2019 4:59 PM over 1 year ago

    Sorry, but we do not support no-OS on Pluto. Pluto is designed for learning segments and transceiver evaluation, and No-OS is for optimized end-product designs.

    You are free to use no-OS on Pluto but we will not provide support or documentation on the process. It is to support intensive for the staff.

    Can you provide reasoning behind your need to use No-OS over Linux?

    -Travis

  • I understand your concern and I do not insist for the same as well.

    I wanted to continuously output a IQ Data file with synchronization provided externally to a GPIO pin.

    I was using GNU Radio along with Raspberry Pi. The sync signal has a time period of 5ms and unfortunately the Raspberry Pi output is very jittery.

    Then I used the ADALM-JTAG Board, I modified the HDL Code and used No Os AD9363 Code to achieve the same. Now my output is working perfectly fine.

    I want to now flash a bin file in its flash so the code starts on power up. But I am not able to flash it through the program flash option in SDK. I just want a procedure to do this. As its not working using the traditional steps we use on other Xilinx Boards.

    I used GNU Radio and understood how to do it but when I want to make it perfect I have make changes to hdl and run a custom code. This helps me learn the lower level implementations so may be it suffices you objectives for creating this board.

    Hope it makes sense. Do consider this request if its feasible. I have to anyways find a way out as I won't be able to afford another board which costs more than $500 which can do that simple job.

    Regards

    Kashyap

  • +1
    •  Analog Employees 
    on May 31, 2019 6:32 AM over 1 year ago in reply to kashyapg

    1) With each PlutoSDR firmware release you can find a plutosdr-jtag-bootstrap.zip archive. You basically load u-boot via JTAG into memory. Once started you use this u-boot instance to write the SPI flash.

    Typically you would use DFU load your custom code. It's important to mention that you have to change the BOOT MODE back to SPI, since the JTAG boot mode conflicts with some SPI pins. You won't be able to init the SPI flash otherwise. If you want to overwrite the initial boot section including u-boot you also need to un-protect  the SPI flash first. 

    2) Don't mess with the initial u-boot and boot section. Just load your custom code where the normal FIT image is loaded and somehow execute it from u-boot using the boot command. I'm sure this can be done, but I haven't tried it myself.

    -Michael 

  • Thanks Mhennerich,

    Your Points were helpful to me along with few other posts on the forum - and I have been able to get my Boot.bin standalone code on the Flash memory.

    I have gone out of the way and implemented a non recommended solution, but for the time being it is supporting my cause - I am listing few steps that I have followed, I'd be happy if I am corrected if somethings I have done are wrong but they are working.

    1. Tools required - ADALM-JTAG-UART -Jumper Connected- Connect to the serial usingn TeraTerm

    2. Enter Uboot console by pressing Ctrl-C.

    3. Remove Jumper on ADALM-JTAG-UART Board.

    4. Unlock Flash - sf probe && sf protect unlock 0 100000

    5. Erase Flash - sf erase 0 0x200000

    6. Upload Boot.bin to RAM - loadb 0x08000000
        In teraterm File-Transfer-Kermit-Send - and select the Boot.bin

    7. Remember the amout of data transfered (For ex 0x3E444)

    8. Write to Flash - sf write 0x08000000 0 0x3E444

    9. Power On/OFF and Board should start with custom code.

    -------------------------------------------------------------------------------------------------------------

    I wish to do this with a more easy way -

    What I think is that I need to create a cust .frm/.dfu file.

    For this If any one can share how the .its/.itb files can be customized to create the .frm/dfu files.

    I am currently working on this so I can just create .dfu file and flash the same using dfu_util.

    Do let me know if I am on right path for this, and as always some direct references on doing this would be much appreciated.

    Thanks to the Community/Travis/Mhennrich.

  • Kashyapg what version of Vivado, SDK, AD93631 drivers and pluto fw you used to create bare metal application.  Could you share links, files or quick guide.

    I try to do the same thing in Vivado and SDK 2018.2. I used hdl-2019_r1 repository and Cygwin to build pluto HDL project under Windows. 

    When HDL project code is generated I run HDL in Vivado and open SDK.

    I follow these steps for Xilinx platform:

    https://wiki.analog.com/resources/eval/user-guides/ad-fmcomms2-ebz/software/baremetal

    Copy the drivers from depository 2019_R1:

    https://github.com/analogdevicesinc/no-OS/tree/2019_R1/ad9361/sw

    directly into src folder in SDK project (files from sw folder and subfolders of platform Xilinx and console commands).

    Have to change #include "../ad9361_api.h" in command.c into #include "ad9361_api.h".

    Next I uncomment:

    #define XILINX_PLATFORM

    #define CONSOLE_COMMANDS

    and set:

    #define AD9361_DEVICE            0 /* set it 1 if AD9361 device is used, 0 otherwise */

    #define AD9363A_DEVICE            1 /* set it 1 if AD9363A device is used, 0 otherwise */

    I follow the run configuration steps and set up new configuration.

    Then I run aplication on hardware and receive following message in SDK Terminal:

    Calibration TIMEOUT (0x244, 0x80)
    ad9361_init : AD936x initialization error

    I cannot push console commands like "help?" to communicate with ad9361.

    Not sure were is the devil. Can you give me some hints ?

    Mhennerich as pluto bare-metal applications are not supported which board would you recommend for profesional use ? 

Reply
  • Kashyapg what version of Vivado, SDK, AD93631 drivers and pluto fw you used to create bare metal application.  Could you share links, files or quick guide.

    I try to do the same thing in Vivado and SDK 2018.2. I used hdl-2019_r1 repository and Cygwin to build pluto HDL project under Windows. 

    When HDL project code is generated I run HDL in Vivado and open SDK.

    I follow these steps for Xilinx platform:

    https://wiki.analog.com/resources/eval/user-guides/ad-fmcomms2-ebz/software/baremetal

    Copy the drivers from depository 2019_R1:

    https://github.com/analogdevicesinc/no-OS/tree/2019_R1/ad9361/sw

    directly into src folder in SDK project (files from sw folder and subfolders of platform Xilinx and console commands).

    Have to change #include "../ad9361_api.h" in command.c into #include "ad9361_api.h".

    Next I uncomment:

    #define XILINX_PLATFORM

    #define CONSOLE_COMMANDS

    and set:

    #define AD9361_DEVICE            0 /* set it 1 if AD9361 device is used, 0 otherwise */

    #define AD9363A_DEVICE            1 /* set it 1 if AD9363A device is used, 0 otherwise */

    I follow the run configuration steps and set up new configuration.

    Then I run aplication on hardware and receive following message in SDK Terminal:

    Calibration TIMEOUT (0x244, 0x80)
    ad9361_init : AD936x initialization error

    I cannot push console commands like "help?" to communicate with ad9361.

    Not sure were is the devil. Can you give me some hints ?

    Mhennerich as pluto bare-metal applications are not supported which board would you recommend for profesional use ? 

Children