We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
hi all I'm working on a project and use a flash usb to store some data. without rtx i can init usb and open a file and do anything but when I use rtx kernel i only can format flash and when I want open a file after open the file system crash! i increase task number to 30 with 1024 byte stack size but problem is still here?? please help me thanks.
damm it. I don't understand why I can't use fopen or fclose in rtx task. nobody here to help me!!!!!
#include <RTL.h> #include <rl_usb.h> #include <stdio.h> #include <LPC177x_8x.h> int i; FILE *f; #ifdef __cplusplus extern "C" { #endif int __low_level_init(void); // Avoid "no ptototype" warning #ifdef __cplusplus } #endif U32 retv;
int __low_level_init(void) {
SystemCoreClockUpdate(); // Ensure, the SystemCoreClock is set
return 1; } __task void init(void); __task void init (void) {
os_tsk_prio_self(1); usbh_init(0); finit("U:"); fformat("U:"); while(1) { if(f==0) { f=fopen("test.txt","w"); for (i=1;1000;i++) fprintf(f,"ok"); fclose(f);
} } } int main (void) {
os_sys_init(init); /* Init RTX and start 'init' */ }
what is my mistake here thet cpy hardfualt whin reach to fopen line??? pleasssssssssssssssssss!!!!!!
nobody here to help me?!!!!!!!!!!!!!