I read through the documents that stated that the microlib doesn't support the Flash File System. I am curious if there's a work around for this. In the project, if I don't select the microlib checkbox, the code doesn't run correctly with RTX. I want to use the RTX OS but it seems like without the microlib, it doesn't jump to main when I started to debug. Any suggestions?
Thanks, Tom
I want to use the RTX OS but it seems like without the microlib, it doesn't jump to main when I started to debug
this can't be right; you're missing something. I'm working on an RTX based project - I can debug it without Microlib. Does your program jump to a SWI instead...? Do you use a boot loader?
I am using the STR91x.s startup file so it should be executing the reset code. It is booting out of bank 0 of the MCBSTR-9 evaluation board. I am not using a bootloader. As you have mentioned, I initially started out not using the microlib too, which has worked, if my memory serve me right, but I can't get it to go to main now that I have updated to the new version of RL-ARM v.3.40.
I try to create a test project with these settings and try again. Will let you know as soon as I try this out.
Actually, yes, it is in the SWI handler. What does this mean?
do you have "retarget.c" included in your project...?
No, I did not include retarget.c. Is there something functionality that is used from this file?
After I've included retarget.c, I get a bunch of unresolved symbols, i.e.,
__fclose __flushbuf __fopen __getfsize __read ... ...
Aren't these functions part of the C-library? Since I am not using the microlib than I thought it would default to the standard C-library. Is this true?
Ok, after I fiddled around I got it to compile and link correctly and jump to main. Now, I got a situation where I use fopen to create a file and wrote a bunch of data and called fclose to flush the data to the flash. The file is created but it's empty. Is there something I am missing again? I followed the instructions for the RL-FlashFS but the result seems to be the same whatever I tried. Is the RL-FlashFS fully implemented? My main goal is to write some configuration data in the flash and have it read back upon reset.
Also, I found that it was not jumping to main because the startup file didn't specify an initial size for the heap. That was probably the main reason that it was not jumping to main.
The standard runtime library prints errors on _ttywrch() function. You can catch the errors if you install a buffer into this function and store characters there. If you have done that, you would see the printed message "Out of heap memory". This error would be printed from premain code.