Post Go back to editing

How to load and run a program from flash on BF516 target board using CrossCore Embedded Studio?

I am trying to load and run a program on BF 518F EZ board.

The instruction I found is for sharc, and I am following the CCES IDE option.

FAQ: How to load and run a program from flash on ADSP-SC5XX target board using CrossCore Embedded Studio? 

In the first step, creating ldr file, an initialization file is required.

I found a few files came with the CCES, including for the EZ board, and two versions for the 518 chip.

Which one should I use? What are the differences between them?

In the second step, a DPIA (device programmer interface application) file is required.

But I don't see it installed on my computer yet.

Can I download or build it?

Eventually, we are going to use our board with BF516.

Can I use the same initialization file and DPIA file for the ez board?

Or I need to create new ones?

Is there instruction for this?

  • Hi,

    The initcode file for the EZ-Board is the one you want (ezboardBF518f_initcode_ROM-V01.dxe). You should be able to use this as-is if you are using the EZ-Board, but will need to modify the project (Blackfin/ldr/init_code/BF518F_init) if you're using custom hardware.

    The other two dxe's are the ROM contents; one per revision, and aren't used for flash programming.

    For the DPIA, this is provided by the Board Support Package (BSP) for the BF518F EZ-Board, under Software, here:

    EVAL-BF518F-EZLITE Evaluation Board | Analog Devices

    These will be available under the Example Browser in CrossCore by searching for "Device Programmer", or the .dxe's can be used directly (if you're using an EZ-Board). The Projects are located in ${BSP}/Blackfin/Examples/Device_Programmer/

    Regards,

    Murray

  • Hi,

    I am able to locate the files you mentioned, but still have some trouble.

    Here is what I did.

    I am trying to load one of the examples (Button_LED_GPIO) to the 518f EZ board.

    The example works in debug mode.

    Then I edited the property of the Button_LED_GPIO project, changed the build artifact to loader file, and set boot mode to SPI master. See the attachment.

    I used the initialization file Blackfin\ldf\ezboardBF518f_initcode_ROM-v01.dxe, which is pre-installed already.

    (I also tried to build the initcode dxe file using the project file under ~\CrossCore Embedded Studio 2.6.0\Blackfin\ldr\init_code\BF518F_init\ezboardBF518f_initcode_ROM-V01, still got the same issue later.)

    Then I got the ldr file.

    Then I saved the ldr file and the used the cldp command line to download the file to the EZ board.

    It showed the download is finished.

    But when I restart the board, the program does not run (the LEDs don't light up when I press the buttons).

    Are there some settings or steps that I should change?

    Thanks,

    Guang

  • BTW, if I need to build the new initcode and dpia dxe files, should I use debug version or release version?

  • Hi,

    When you are booting an LDR file, this EBIU configuration is typically performed by an Initialization Code - a small DXE that resides at the start of the boot stream, which is copied into internal memory by the boot kernel when the processor boots. This Init Code executes and, typically, is used to configure the EBIU, PLL, etc. Initializing the EBIU through the use of an Init Code is essential if your main application DXE uses external memory for code or initialized data, otherwise, the Boot Kernel will attempt to load that code/data into SDRAM using an incorrect EBIU configuration, and the correct operation of the application could not be guaranteed.

    Please refer the below FAQs:
    FAQ: My application behaves incorrectly when using SDRAM.
    https://ez.analog.com/docs/DOC-1783
    FAQ: How to debug a target board which boots from Flash?
    https://ez.analog.com/docs/DOC-1471
    How do I debug my application which is not booting properly
    https://ez.analog.com/thread/1149

    Also please note that "Debug" and "Release" are simply names for different configurations of your project, allowing you to individually set Compiler, Linker, Loader, etc, options differently based on your requirements. The defaults of Debug and Release differ in that Debug generates Debug information and does not perform optimization, while the Release version does not generate debug information but does enable optimization.

    Regards,
    Reva

  • Hi,

    I was able to download the program to flash following the instructions.

    One issue we found is that the system clock seems wrong.

    Our test program toggles an output line every 1ms. It runs well when we test using the ICE-1000.

    But when we run it through the flash on the EZboard alone, the output line toggles every ~2.6ms.

    I used the two pre-built files: ezboardBF518f_initcode_ROM-V01.dxe and bf518f_m25p16_dpia.dxe.

    I see there is a dynamic power management feature.

    Could the issue be caused by this feature? And the two pre-built files configured the chip to run active instead of full-on mode?

    Thanks,

    Guang

  • Hi,

    We have tried to simulate your issue in ADSP-BF518F EZ-kit with Button_LED_GPIO example project. But we are not able to simulate your issue.

    Can you please confirm whether you are using adi_pwr_Init() API in your example project. Also can you please try with the attached example project and let us know how you get on.

    Regards

    Reva

    Button_LED_GPIO.zip

  • Hi,

    We are not using adi_pwr_Init() actually.

    Maybe it's the cause of the issue.

    I also realized that when I run the debug through JTAG, the toggle speed is different depending on the boot mode of the EZboard.

    For example, if I turn off the power, set the boot mode to 1(default), then power up and run debug through JTAG, the toggle is fast.

    If I turn off the power, set the boot mode to 0 (no boot), then power up and run debug through JTAG, the toggle speed is about 2.8x slower.

    Maybe when the board boots up, the power/clock was set differently unless we change the setting?

    Do you have adi_pwr_Init() examples for the 518 board?

    Thanks,

    Guang

  • Hi,

    Can you please try with the example project that we attached in our last reply and let us know how you get on.

    Regards

    Reva

  • Hi,

    I tried the new program.

    It behaves the same way.

    Basically, the CPU frequency (or something related) is set when the board powers up.

    If the mode is 1, the frequency is about 2.8X faster than booting from mode 0 and mode 3.

    I see your code defined a few min/max frequencies, but they don't play a role in my test.

    I also see that there is a sample project SetGetFreq. Maybe we should follow it to actively set the frequencies?

    Thanks,

    Guang

  • Hi,

    I see the boot mode 1 is pre-loaded with POST program, but the manual says the source code is only available for visualDSP++. Do you have the version for CCES?

    Guang