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

Keil RTX5 without microLib don't work

Hi all,

I have an application with RTX5 and works fine but need to add a FlashFS and this is the beginning ofthe problem.
FlashFS is not compatible with microLIB and need to uncheck the "use microLib" from the target options, the project is compiled ok and the kernel starts ok but quickly raises a hard fault exception and can't get find the reason because the code is the same and the debugger don't helps so much.

Is RTX not compatible with the default C library and only works with microLIB?
Is possible to get the FlashFS run with microLIB?

Thanks

Parents
  • I bet it was semihosting. Semihosting was enabled, when it should be disabled in CubeMX project. CMSIS project may have disabled it.
    You can tell if this is the case, by looking in the map file for "__I$use$semihosting".

    Microlib disables semihosting automatically.

    For an application with Standard library,
    use:

    IMPORT __use_no_semihosting
    


    in an assembly file:
    developer.arm.com/.../using-the-libraries-in-a-nonsemihosting-environment

    Then try a build. This will give errors for any semihosting functions that were removed. Re-define the semihosting functions that were stripped away.
    The Manage Run-Time Environment re-defines some of these functions under Compiler, automatically, if you retarget some output, by checking some boxes there. Some of these can be defined as empty functions, without affecting the program.

    Some can be re-defined as:

    void _sys_<whatever> ( int ch ) {
    }
    

    In C++, just add:

     extern "C"
    


    at beginning to get C linkage.

    If you are still troubleshooting with CubeMX export to MDK, use the following guide:
    www.keil.com/.../_troubleshooting.html

Reply
  • I bet it was semihosting. Semihosting was enabled, when it should be disabled in CubeMX project. CMSIS project may have disabled it.
    You can tell if this is the case, by looking in the map file for "__I$use$semihosting".

    Microlib disables semihosting automatically.

    For an application with Standard library,
    use:

    IMPORT __use_no_semihosting
    


    in an assembly file:
    developer.arm.com/.../using-the-libraries-in-a-nonsemihosting-environment

    Then try a build. This will give errors for any semihosting functions that were removed. Re-define the semihosting functions that were stripped away.
    The Manage Run-Time Environment re-defines some of these functions under Compiler, automatically, if you retarget some output, by checking some boxes there. Some of these can be defined as empty functions, without affecting the program.

    Some can be re-defined as:

    void _sys_<whatever> ( int ch ) {
    }
    

    In C++, just add:

     extern "C"
    


    at beginning to get C linkage.

    If you are still troubleshooting with CubeMX export to MDK, use the following guide:
    www.keil.com/.../_troubleshooting.html

Children