Skip to main content
Super User
September 11, 2017
Solved

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

  • September 11, 2017
  • 2 replies
  • 1640 views
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
    This topic has been closed for replies.

    2 replies

    Simon V.Answer
    ST Employee
    September 12, 2017
    Pavel A.Author
    Super User
    September 13, 2017
    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