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.
i forget this one i use lpc1788 cortex m3 micro and keil 5.14.i can only format my 4g flash and when i want to open a fileafteropen the file system carsh! please help me to solve this problem. thenks all.
Hi
Did you try to compile and work with the existing examples (in Pack Installer) related to File system for LPC17xx ?
Yes I can do every thing without rtx kernel.I think i should make a task for usb init or any thing like this.
ok frinds i have another quesion. is it possible to use rl-flash function like fopen orr fclose in a rtk task becuase whin i use them in a task system crash but in a separate nontask function they work?!!!!!!
I don't understand your question.
A task/thread is a task/thread even if the task function calls another function that performs the work.
The only usage difference there can be in a threaded environment, is if you try to call a function from only one thread, or if you try to make calls from multiple threads.
Crash - out of stack space...?
i even increase stack size to 2048 byte but only command that i can use if fformat!!!even I create a user stack with 2200*8 byte but again system get in HardFault and crash!i use different retarget.c file but problem was again i use emwin for my GUI project but I don't think this have problem because even with out this I still have problem!!! if any one have a small project with rl-flash and rtx i will be happy to send it to me.I realy be tired.my email is :ghorban.pirizadeh@gmail.com. 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?!!!!!!!!!!!!!