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
Hi,
Te problem is not solving the ip, if I place a "while (1)" after "netStart()" the hardfault is trowed, no error in recorder log but INVPC bit is set in fault reports.
I tried to solve the problem in my real application, not the example posted. My application mix CMSIS and initialization of peripherals with CubeMX, for any reason if I use microLIB the program runs ok but when use standard C Library the program crashes. Finally I rewrite the application only with CMSIS library without using code from CubeMXand works ok... I think there is a problem mixing CubeMX and CMSIS but the compiler don't show any warning or problem.
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
Hi Zack,
You are a source of wisdom :) lol
Thanks one more time, I will try it.
Tried your solution an added the __sys_exit() function but the problem stills... I think will continue by the only CMSIS way without MX.
I am having a similar issue getting a bootloader working - so; what was the answer here?
Thanks, John W.