AnsweredAssumed Answered

ICP and IAP: Linker

Question asked by pradeep on Sep 18, 2012
Hi,

Is it possible to program only part of the flash memory using ICP?

I have STM8 programmed with bootloader using ICP where UBC is protected from 0x8000 to 0x8fff.

Now when I try to program the flash with application firmware separately using ICP with CODE settings 0x9000 to 0x9fff, I am encountering an error that UBC is enabled. Why does the programmer care about UBC, when code settings are outside the UBC enabled region?

Just to try, I disabled the UBC. But everything in the flash is reprogrammed i.e the UBC region is erased. The MAP file as shown below, however has no code segments in the UBC region.

LINK MAP OF MODULE: DEBUG\STM8_SOFTWARE.AOF (MAIN)
 
    TYPE     BASE         LENGTH     RELOCATION      SEGMENT NAME
    ----     ----         ------     ----------      ------------
 
    * * * * * * * *   C O D E       M E M O R Y   * * * * * * * *
          009000H      000080H                     *** GAP ***
    CODE    009080H      000006H    AT              ?PR??APPLICATION_MAIN?MAIN
          009086H      00037AH                     *** GAP ***
    CODE    009400H      000003H    AT     ?PR??TASK_CHECK_SOFTWARE_UPDATE?TASKS_ALL

Thank you.

Outcomes