Skip to main content
Visitor II
March 6, 2022
Solved

Why does my Cosmic compiler license fail?

  • March 6, 2022
  • 2 replies
  • 3229 views

When I do a "Rebuild all" of a new, blank project, I get the following errors:

----------- Project test - STM8 Cosmic - Configuration Debug -------------

Removing intermediate files ... Done!

----------- Project test - STM8 Cosmic - Configuration Debug -------------

Compiling main.c...

cxstm8 +debug -pxp -no -l +mods0 -pp -i"C:\Program Files (x86)\COSMIC\FSE_Compilers\Hstm8" -clDebug\ -coDebug\ main.c 

#error cpstm8 C:\Program Files (x86)\COSMIC\FSE_Compilers\CXSTM8\HSTM8\mods0.h:1 FlexLM Invalid host.

main.c:

 The command: "cxstm8 +debug -pxp -no -l +mods0 -pp -i"C:\Program Files (x86)\COSMIC\FSE_Compilers\Hstm8" -clDebug\ -coDebug\ main.c " has failed, the returned value is: 1

exit code=1.

test.elf - 3 error(s), 0 warning(s)

When I do the same in a VMware installation, there are no problems.

When I modify the the license file on the VM, I get a different error:

...

#error cpstm8 C:\Program Files (x86)\COSMIC\FSE_Compilers\CXSTM8\Hstm8\mods0.h:1 FlexLM Invalid (inconsistent) license key.

...

So it appears the problem is not that the license file is invalid, it is that the LmregFSE.exe file which generates the HOSTID does so incorrectly. The FLEXlm manual supports this:

"Invalid host." : The hostid of this system does not match the hostid specified in the license file.

A look in the license file shows that the HOSTID is partially based on the UUID / BIOS serial number. In the VM, the 5 last characters of the HOSTID correspond to the last 5 characters of the UUID / BIOS serial number. But this is not the case on the physical machine.

I tried generating licenses for modified HOSTID's, by editing the emails that are sent to stm8_Free@cosmic.fr. But when I do that, no license file email comes back. I only get the license files if I choose the "On the Web" License request.

I've tried changing my hostname (computer name) to no effect. Also, suspecting the LmregFSE.exe file could have problem with a non-ASCII character in my user name, I tried a different user. The generated HOSTID was the same.

So now I've run out of ideas...

Suggestions?

    This topic has been closed for replies.
    Best answer by lyoy

    It turned out that LmregFSE.exe failed when the network adapter called "Ethernet adapter Bluetooth Network Connection 2" was enabled.

    Anyone having similar problems could try to disable all non-essential network adapters.

    2 replies

    lyoyAuthorAnswer
    Visitor II
    March 7, 2022

    It turned out that LmregFSE.exe failed when the network adapter called "Ethernet adapter Bluetooth Network Connection 2" was enabled.

    Anyone having similar problems could try to disable all non-essential network adapters.

    Explorer
    March 29, 2024

    I had the same error : FSE_Compilers\CXSTM8\Hstm8\mods0.h:1 FlexLM Invalid host

    I was using STVD on a virtual machine with the network adapter disabled. When I turned it back on, the error was gone, and compiles with no errors again. Thank you

    Visitor II
    May 6, 2024

    IMO, the best solution to license issues is to use FOSS. In this case that would mean using SDCC as the C compiler.