I’m trying to use ucos2.lib for a simple http + ftp server.
All works fine if i do not use the rtos, but only by adding
to my files and the program crashes at
Yes, only if i add the “#use uncos2.lib” macro! even if i not call any function of the rtos (like OSInit etc…)!
any idea about the cause of the problem?
Have you followed the instructions in the documentation for using FAT and UC/OS II?
* The FAT API is not reentrant from multiple tasks. If you wish to
use the FAT from multiple uC/COS tasks, #define FAT_USE_UCOS_MUTEX.
* Mutex timeouts or other mutex errors will cause a run-time
error - ERR_FAT_MUTEX_ERROR. The default mutex timeout is 5 seconds
and can changed by #define’ing a different value
* You MUST call fat_InitUCOSMutex after calling OSInit() and before
calling FAT API functions
* You must run the FAT in blocking mode (#define FAT_BLOCK)
* You must not call low-level, non-API FAT or write-through cache
functions. Only call FAT functions appended with ‘fat_’ and
with public function descriptions.
Thanks Peter, I had missed! Now the filsystem it’s mounted properly.
Now I’ve a new trouble with FTP, (i don’t know if i can ask about it in the same topic)
Using filezilla, the FTP server works very fine if i upload simple .txt files, however when i try to upload something like a pdf or a zip file, the transfer freezes at 100% and the transfer it’s marked as not completed.
It may be due to the TCP buffer length? Or to the stack size of the task?
I’d start a new question as otherwise it gets confusing…