cancel
Showing results for 
Search instead for 
Did you mean: 

obDisplay API crashes

sanjaysunil
Associate

Hi,

I'm trying to create a wrapper for STM32CubeProgrammer_API.dll.

The program crashes on trying to use the obDisplay API. I've tried using STM32CubeProgrammer_API.dll versions 2.10 and 2.15. Is there something I'm missing?

Thank you very much.

1 REPLY 1
Aziz BRIGUI
ST Employee

Hello @sanjaysunil,

I confirm there's an issue with obDisplay() API. It has been reported internally (internal tracking number : 180037).

 

A workaround would be to use this snippet from Example1.cpp to display the option bytes.

 

 

peripheral_C* ob;
ob = initOptionBytesInterface();
if (ob == 0)
{
    disconnect();
    continue;
}
/* Display option bytes */
for (unsigned int i = 0; i < ob->banksNbr; i++)
{
	logMessage(Normal, "OPTION BYTES BANK: %d\n", i);
	for (unsigned int j = 0; j < ob->banks[i]->categoriesNbr; j++)
	{
		logMessage(Title, "\t%s\n", ob->banks[i]->categories[j]);
		for (unsigned int k = 0; k < ob->banks[i]->categories[j]->bitsNbr; k++)
		{
			if (ob->banks[i]->categories[j]->bits[k]->access == 0 || ob->banks[i]->categories[j]->bits[k]->access == 2) {
				logMessage(Normal, "\t\t%s", ob->banks[i]->categories[j]->bits[k]->name);
				logMessage(Info, ": 0x%x\n", ob->banks[i]->categories[j]->bits[k]->bitValue);
			}
		}
	}
}

 

 

 Hope you find this helpful.

Aziz


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.