Skip to main content
Visitor II
February 3, 2017
Solved

ST Visual Programmer not programming .hex file properly

  • February 3, 2017
  • 2 replies
  • 4354 views
Posted on February 03, 2017 at 10:57

Hi,

I use the ST Visual Programmer to flash a stm8S007C8 and this is working good, until the size of the .hex file is bigger than 155 kB. After this size the STVP shows an error/warning that it is out of range

'FILE : line 3602: Address 0xXXXX is out of range and is ignored!' (see attached picture 001). The range (0xXXXX) starts from 0x8000 until 0x8BC7 (this depends on the size of the .hex file). If I flash the stm8 it's not starting because its overwrites/ignores the interrupt vector table. I have 6 kB left on the memory of the stm8 but i can't use it because of this problem.

Is there a solution how to fix this?

Thank you for your help.

#st-visual-programmer #stm8s007 #stm8
    This topic has been closed for replies.
    Best answer by LaurentL
    Posted on February 03, 2017 at 14:43

    Hello,

    I just tried with the same device on STVP 3.3.9, no issue to load an hex file with full memory.

    I just used the fill memory menu for the whole range and then save the hex file.

    I then relaunch STVP, drag and drop the hex file in memory window and it loads properly.

    By the way, the size of the full memory file of this device is 155KB. (Of course, size of file in hex text format isn't the size of flash memory of device).

    So, check your file has no data outside the memory range. (option bytes or Data memory ?).

    Rgds,

    Laurent

    2 replies

    ST Employee
    February 3, 2017
    Posted on February 03, 2017 at 11:14

    Hello,

    This is strange: this error should only happens if the addresses are out of the device memory range.

    but addresses 0x8BBD to 0x8BC7 shown on your picture are within the STM8S007C8 memory range.

    Are you sure you selected the correct part number?

    0690X000006065CQAQ.png

    Could you share the hex file generating this error?

    The tool version may be useful too.

    BR

    Max

    Visitor II
    February 3, 2017
    Posted on February 03, 2017 at 12:10

    Thank you for the anwser,

    yes that is what I thought too, but its not starting after I use this file. Sorry I can't send you this .hex file but I can try to create a new one with the same effect. I attached a picture (003) with all my settings (removed the .hex file from the screen and the names). Also you see in picture 0011 more warnings.

    The tool version is:

    0690X00000606BGQAY.png

    ________________

    Attachments :

    003.png : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HyxS&d=%2Fa%2F0X0000000bEO%2FUzJkrB0DNqiShFhPxH9QvxBIEZPHYZGHt5TvVATQ7dw&asPdf=false

    0011 Warning from st visual programmer.png : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hypo&d=%2Fa%2F0X0000000bEN%2FNT35P0oMTcvxDilOTW2yu.g9Mlek12D.1KZo9KrIzp0&asPdf=false
    LaurentLAnswer
    ST Employee
    February 3, 2017
    Posted on February 03, 2017 at 14:43

    Hello,

    I just tried with the same device on STVP 3.3.9, no issue to load an hex file with full memory.

    I just used the fill memory menu for the whole range and then save the hex file.

    I then relaunch STVP, drag and drop the hex file in memory window and it loads properly.

    By the way, the size of the full memory file of this device is 155KB. (Of course, size of file in hex text format isn't the size of flash memory of device).

    So, check your file has no data outside the memory range. (option bytes or Data memory ?).

    Rgds,

    Laurent

    Visitor II
    February 3, 2017
    Posted on February 03, 2017 at 15:25

    Hi Laurent,

    I tested it with STVP 3.3.9 and have the same problem. I think If the full memory size is 155 kB then the hex file is not created properly and i should check more IAR workbench.

    This is displayed in STVP:

    0690X00000606BKQAY.png

    and the hex file shows:

    0690X00000606EXQAY.png

    I think that is the problem that the STVP dont know the range, and the hexfile ends with:

    0690X00000606EcQAI.png

    and this is the last address that STVP shows as warning.  I guess the problem is not STVP more IAR Workbench that creates the file.

    Thank you for the advices. 

    Can you send me your 155kB hexfile that I can check the addresses?

    Thank you for the quick help. Good team here.

    Regards

    Christian

    ST Employee
    February 3, 2017
    Posted on February 03, 2017 at 15:36

    Yes, that's what i meant too.

    Which compiler produced the hex file ?

    Or is it a file you received from someone else that can be wrongly created.

    Can you edit the hex file and put the lines at the begining ? For trials.

    Or removed them first ?

    Or review how you created the file.