This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Configure flexlm license from command line on client machine (MDK 5.39)

Hello,

I want to automatically configure a flexLM license (<port>@<host_id>) via command line. (essential edition flexlm)

I edited the TOOLS.ini, but this doesn't work. I already tried to search AppData folder and registry, but couldnt find anything remotely relevant.

Especially weird: If I open uVision and open license managment, it tells me that the FlexLM-license is set up and I can borrow it, return it, etc. But when I want to compile I get: 

.\build\linker\some.sct: error: L6047U: The size of this image (34944 bytes) exceeds the maximum allowed for this version of the linker

Same thing if I call the compiler / linker from command line (tells me something "lite").

Please help!

Best regards

Parents
  • I edited the TOOLS.ini, but this doesn't work.

    Modifying the TOOLS.ini file should work and should be sufficient for a Flex Floating license (would not work for a Keil node-locked license). This is the way you can make an unattended MDK installation and license registration. However, it seems that the compilation toolchain does not find the license. Did you modify the folder structure of the MDK installation? You must not move the Tools.ini file or the \ARM\ARMCLANG\bin content to a different folder. If you do, the compiler toolchain does not find the Tools.ini file and, therefore, the license.

Reply
  • I edited the TOOLS.ini, but this doesn't work.

    Modifying the TOOLS.ini file should work and should be sufficient for a Flex Floating license (would not work for a Keil node-locked license). This is the way you can make an unattended MDK installation and license registration. However, it seems that the compilation toolchain does not find the license. Did you modify the folder structure of the MDK installation? You must not move the Tools.ini file or the \ARM\ARMCLANG\bin content to a different folder. If you do, the compiler toolchain does not find the Tools.ini file and, therefore, the license.

Children
  • Hello Hans,

    thank you for the input. The folder structure within the tool installation was not modified, but the path TO the installation was modified as I am building a package for Conan package manager, which uses a path like this: C:\SomeConan_Folder\<random_string>\package

    Best regards

  • The path to the MDK installation should not be a problem. With other words, the compiler (and linker.…) searches for the Tools.ini file 3 folder levels higher. The compiler is usually in C:\Keil_v5\ARM\ARMCLANG\bin and the Tools.ini in C:\Keil_v5\. When the Tools.ini file is not found there, the compilation tools also search in the same folder (bin), so you could try to copy the Tools.ini file there.

    Please also check if you have other MDK or compiler installations on your PC. It might happen that you start the compiler from a different folder than the one you think.

  • Hello Hans,

    your tipp pointed me in a good direction. Currently we use uVision in batchmode, because we have not set up our own buildsystem yet (cmake/ninja is planned) 

    The tools.ini has a separate item for uVision config. So, for anyone who might also want to create a portable package, you need to update the following items in tools.ini when deploying the package (for example using Python configparser library). Replace <> accordingly.

    • Section "UV2"
      • ORGANIZATION=<your company>
      • NAME="<LastName>", "<FirstName>"
      • EMAIL=<user mail>
      • ARMSEL=1
      • USERTE=1
      • TOOL_VARIANT=mdk_cm_std_flex (standard with FlexLM, change accordingly)
      • RTEPATH=<Path where your CMSIS packs are handled by CMSIS manager>
      • CPACKGETPATH=<package base path>\ARM\cmsis-toolbox\bin
      • FLEX=<port>@<license server host name>
      • FLEX_USE=1
      • FLEX_VARIANT=mdk_cm_std (change accordingly)
    • Section "ARM"
      • PATH=<package base path>\ARM
    • Section "ARMADS" <--- I forgot this one
      • PATH=<package base path>\ARM

    The rest should stay as the default. (my impression)