cancel
Showing results for 
Search instead for 
Did you mean: 

What means ''UBC option'' and how I change it?

Pavel A.
Evangelist III
Posted on September 11, 2017 at 19:10

Dear experts,

I am totally new to STM8, but got a task to complete. Please be kind and explain in simple layman terms...

I have a project in ST Visual Develop, made by someone else. It has two parts: a bootloader (which I was told not to touch for now,  it is already flashed in the device) and the 'main' firmware.

The build is successful. But when I try to start debugger, it pops up the following:

ST Visual Develop

GDI Error: For better debugging performance, the user bootcode size must be reduced. You need to change the UBC option

So, the question is, what is the UBC option? Where it can be changed? Does it mean that I need to do something with the bootloader project?

The microcontroller model is STM8L101G3U with Cosmic compiler.

The debugger device is a white USB dongle with ST logo on it.

Any ideas?

Thanks in advance,

ddbug

#debugging
1 ACCEPTED SOLUTION

Accepted Solutions
Simon V.
ST Employee
Posted on September 12, 2017 at 08:41

Hello and welcome !

Regarding UBC, you can have a look to AN2659  (

http://www.st.com/content/ccc/resource/technical/document/application_note/0d/59/82/a6/87/d5/4f/3b/CD00176595.pdf/files/CD00176595.pdf/jcr:content/translations/en.CD00176595.pdf

 ).

You can also read chapter 7 of the product datasheet : 

http://www.st.com/content/ccc/resource/technical/document/datasheet/cb/08/7a/32/32/d8/4d/23/CD00220591.pdf/files/CD00220591.pdf/jcr:content/translations/en.CD00220591.pdf

 

Kind regards,

Simon

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.

View solution in original post

2 REPLIES 2
Simon V.
ST Employee
Posted on September 12, 2017 at 08:41

Hello and welcome !

Regarding UBC, you can have a look to AN2659  (

http://www.st.com/content/ccc/resource/technical/document/application_note/0d/59/82/a6/87/d5/4f/3b/CD00176595.pdf/files/CD00176595.pdf/jcr:content/translations/en.CD00176595.pdf

 ).

You can also read chapter 7 of the product datasheet : 

http://www.st.com/content/ccc/resource/technical/document/datasheet/cb/08/7a/32/32/d8/4d/23/CD00220591.pdf/files/CD00220591.pdf/jcr:content/translations/en.CD00220591.pdf

 

Kind regards,

Simon

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.

Pavel A.
Evangelist III
Posted on September 14, 2017 at 00:03

Thank you Simon.

So just for benefit of these who may have this question later:

The 'UBC option' is combination of bits in the option byte OPT2, which defines the size and protection mode of 'user boot code area'.

The Option bytes are described in the product datasheet.

One can set these bits using, for example, the Programmer tool. 

In my case, the puzzling error message was because other person who played with the device has set the OPT2 bits so that debugger thought there's a user bootloader present.

The solution was to erase the whole device and set all option bits to default (0).

Regards,

ddbug