|
Hello,
I have large problem....
I´m using the latest sam-ba version 2.11 and I wrote an mfc application to use the sam-ba.dll. I have an at91sam9g20 Rev.B
1.) After I execute the function AT91Boot_Scan(...) I have memory leaks although I free the complete memory - Could anybody verify it... Thanks a lot.
2.)I plug in my AT91SAM9G20 board -> "Romboot" appears on the console -> SAM-BA Bootloader is running. Then I start my code below, the scan functions returns "\USBserial\COM5" but the function AT91Boot_Open(...) never returns !!!!
Could anybody verify my problem - Thanks a lot.
This is my code:
AT91BOOT_HANDLE_TYPE h_handle = 0; int i=0;
for(i=0; i<50; i++) { pDeviceList[i] = (char*)malloc(512); }
// Scan all devices connected m_pAT91BootDLL->AT91Boot_Scan((char *)pDeviceList); for (i=0; i<50; i++) { if(pDeviceList[i] != NULL) { Device = pDeviceList[i]; iBack = Device.Find("\\USBserial\\", 0); if(iBack == 0) { m_pAT91BootDLL->AT91Boot_Open(pDeviceList[i], &h_handle); if (h_handle != 0) { m_pAT91BootDLL->AT91Boot_Close(h_handle); } } } }
for(i=0; i<50; i++) { free(pDeviceList[i]); }
|