Post Go back to editing

Custom Device Programmer for ADSP21363 not allocating AFPBuffer in system heap

Category: Software
Product Number: ADSP-21363
Software Version: Cross Core Embedded Studio v2.12.0

Hi,

I am trying to convert a project that uses the ADSP21363 from visual DSP 5.0 to Cross-Core Embedded Studio. From looking at other posts here, I know that I need to do a custom device programmer and have modified the example device programmer for the ADSP21364 EZ-kit board with m25p20 flash to our needs (ADSP21363 with m25p16 flash). Modifying from ADSP21364 is what we did for our original visual DSP setup so I'm fairly confident I modified the driver correctly.  We are using a USB-ICE probe which I have verified is successfully connecting to the board.

When trying to use the cldp.exe command to load the board with my custom device programmer, I am getting the following:

--

Error: couldn't find DPIA buffer address
Error: could not allocate storage for the buffer 0x0
Error: Error: There was a problem with one or more 
required expressions in the driver.  Please make
sure the following expressions are present and 
try again:
Error: driver load failed.

--

I am using the default ldf for ADSP21363, but I did use the Startup Code/LDF add-in to modify the heap and stack size to match what we had in visual DSP. I am using a custom heap of 10 kB and a custom stack of 6 kB. I ran the cldp.exe with the log option and see the following output which is confusing me: 

GetMemory()
[I] procId: 0
[I] memId: 1
[I] address: 0x000b862a
[I] locationCount: 1
[I] stride: 1
[I] buffer: 0x00ddfa7c
[I] bufferLength: 4
[O] buffer: 00 00 00 00
[T] 0.00145 seconds

The address lines up with the AFPBuffer in my symbol map file. I assume the address on the buffer: line is supposed to be the start address of the actual buffer itself. If my assumption is correct, then that address (0x00ddfa7c) is not coming from the system heap as I expect. The heap is at 0xe1800 per my generated symbol map from the device driver, which is what I would expect. The AFPBuffer should be allocated with a malloc per the driver code below (I did not change this from the example driver code for ADSP21364):

    AFP_Buffer = (int *)malloc(BUFFER_SIZE);

It seems to me that if the buffer is trying to be allocated at the 0x00ddfa7c address, then that would explain the error I'm getting when trying to load the DPIA buffer. What I can't figure out is why a malloc would not be allocating the buffer from system heap, which I can confirm is at address 0xe1800. Any help would be appreciated. 

  • Hi,

    Could you please let us confirm whether you have taken the CCES device programmer as a reference to modify your custom flash driver or you took the VisualDSP++ driver file as reference?

    If not, you can get the device programmer driver for CCES by installing the ADSP-21364 EZ-kit Board support package.
    download.analog.com/.../ADI_ADSP-21364_EZKIT-Rel1.0.0.exe

    after successful installation, you can find the flash programmer driver for the EZ-kit from the below location.
    C:\Analog Devices\ADSP-21364_EZKIT-Rel1.0.0\21364_EZ-KIT_Lite\Examples\Device_Programmer\serial

    For more information, please refer to the below thread.
    ez.analog.com/.../couldn-t-find-dpia-buffer-address-error


    Regards,
    Nishanthi.V