cancel
Showing results for 
Search instead for 
Did you mean: 

ST Visual Programmer not programming .hex file properly

Christian W
Associate II
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
1 ACCEPTED SOLUTION

Accepted Solutions
LaurentL
ST Employee
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

View solution in original post

8 REPLIES 8
Max
ST Employee
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

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
LaurentL
ST Employee
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

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

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.

Posted on February 03, 2017 at 15:43

Sorry updated the last post didn't see your answer .

I create the file with IAR Workbench

0690X00000606EhQAI.png

I found this jump in the hex file this is the problem I guess

0690X000006068gQAA.png

In STVP it looks like

0690X00000606EmQAI.png
Posted on February 03, 2017 at 16:08

OK, i don't remember very well the hex format but there are offsets...

So, the addr you see are not always the exact addr.

I've attached the hex file but you can reproduce any with the fill mem menu or button and then save the file in hex format.

This is not a valid STM8 code of course.

Just a file to load in STVP, not in STM8.

I suggest you see with IAR if it is a new issue.

Maybe update IAR software.

Regards,

Laurent

________________

Attachments :

Test_8S007C8.hex.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hymp&d=%2Fa%2F0X0000000bEL%2FrN3qdbanKdP.w94fG5kxonLMpqhvC7XCnzp5f04kuvc&asPdf=false
Posted on February 03, 2017 at 16:24

You're right i think the offset at this position is the problem.

Ah okay didn't see that option.

Thank you for the file and the help, I check IAR software for the problem

Regards,

Christian