AnsweredAssumed Answered

BF70x Memory Unexpected Memory Padding

Question asked by rpmarchand Employee on Jul 18, 2018
Latest reply on Jul 25, 2018 by rpmarchand

Hello EZ,


while developing my application with the BF70x i ran into an issue with an expected memory padding when declaring a structure.  For reference, i am declaring this structure and using it as part of a DMA to an external interface and it is causing issues where an extra 8 bits of zeroes are being transmitted.  


I broke my program down to the very simple one below; what i noticed is that when i define my structure, i get an an extra memory location which has been padded.  the highlighted memory location is unexpected.  This is with CCES 2.8.0.  I need to eliminate this memory padding for the DMA controller.  Are there any suggestions on how to do this?



* StructFile.c

#include <sys/platform.h>
#include "adi_initialize.h"
#include "StructFile.h"
#include <stdio.h>


char __argv_string[] = "";


struct myStructure
uint16_t var1;
uint8_t var2;
uint8_t var3;
uint16_t var4;
uint8_t var5;
uint16_t var6;

int main(int argc, char *argv[])

/* Begin adding your custom code here */

struct myStructure rpmStruct ={};
rpmStruct.var1 = 0xAAAA;
rpmStruct.var2 = 0xBB;
rpmStruct.var3 = 0xCC;
rpmStruct.var4 = 0xDDDD;
rpmStruct.var5 = 0xEE;
rpmStruct.var6= 0xFFFF;


printf("Start Of Message %h", rpmStruct.var1);


return 0;