Hi,
I'm trying to compile the demo: RT-STM32-LWIP-FATFS-USB
The fatfs-0.13c_patched.7z as far as I can see seems to be stock except for a few renames. (source -> src, documents -> doc)
The demo however seems to be using a fatfs 0.13 config file and not 0.13c. Still deciding whether to downgrade the fatfs I'm going to use or if I'm going to upgrade the config file. (irritating because I want to try this for the LWIP, not the fatfs part).
bugreport fatfs. Topic is solved
bugreport LWIP.
Hi,
There seems to be a typo in the lwipbindings.mk file.
There is a typo in here somewhere, but I can't find it. This is the current state that seems to work, but "hacked":
Patching in the direct filenames seems to work, but all other efforts failed.
Ah! Found it while typing this. The define in Filelists.mk is httpDfiles, this uses httpfiles without the D. (in the real world in all-caps, here mixed case to be able to
Here is the patch:
There seems to be a typo in the lwipbindings.mk file.
There is a typo in here somewhere, but I can't find it. This is the current state that seems to work, but "hacked":
Patching in the direct filenames seems to work, but all other efforts failed.
Ah! Found it while typing this. The define in Filelists.mk is httpDfiles, this uses httpfiles without the D. (in the real world in all-caps, here mixed case to be able to
Code: Select all
# Add blocks of files from Filelists.mk as required for enabled options
LWSRC_REQUIRED = $(COREFILES) $(CORE4FILES) $(APIFILES) $(LWBINDSRC) $(NETIFFILES)
LWSRC_EXTRAS ?= $(HTTPFILES)
LWINC = \
$(CHIBIOS)/os/various/lwip_bindings \
$(LWIPDIR)/include
# Shared variables
ALLCSRC += $(LWSRC_REQUIRED) $(LWSRC_EXTRAS) $(HTTPFILES)
ALLCSRC += ../../../ext/lwip/src/apps/httpd/fs.c ../../../ext/lwip/src/apps/httpd/httpd.c
ALLINC += $(LWINC) \
$(CHIBIOS)/os/various
Here is the patch:
Code: Select all
--- a/os/various/lwip_bindings/lwip.mk
+++ b/os/various/lwip_bindings/lwip.mk
@@ -11,7 +11,7 @@ LWBINDSRC = \
# Add blocks of files from Filelists.mk as required for enabled options
LWSRC_REQUIRED = $(COREFILES) $(CORE4FILES) $(APIFILES) $(LWBINDSRC) $(NETIFFILES)
-LWSRC_EXTRAS ?= $(HTTPFILES)
+LWSRC_EXTRAS ?= $(HTTPDFILES)
LWINC = \
$(CHIBIOS)/os/various/lwip_bindings \
-
- Posts: 18
- Joined: Thu May 18, 2017 11:57 am
- Has thanked: 1 time
- Been thanked: 6 times
Re: bugreport fatfs.
When fatfs was upgraded to 13, the patched version wasn't used... so the changelog is wrong... you can check by comparing the sources against fatfs versions...
Re: bugreport fatfs.
I don't understand what you're trying to say.
Chibios comes with a few demos that use external libraries like FATFS and LWIP. Chibios comes with the (possibly patched) version of those libraries that you have to unpack to use. So I unpacked and tried to compile one of the demos and... The demo uses an older version of the config file from the library than what the included library expects.
Chibios comes with a few demos that use external libraries like FATFS and LWIP. Chibios comes with the (possibly patched) version of those libraries that you have to unpack to use. So I unpacked and tried to compile one of the demos and... The demo uses an older version of the config file from the library than what the included library expects.
Re: bugreport fatfs.
As far as I can tell from my own files (which are somewhat non-standard), FatFs 13c added just the following options:
And the revision ID needs bumping:
#define FFCONF_DEF 86604 /* Revision ID */
And fatFs 0.14 has been out for a little while....
Code: Select all
#ifndef FF_LFN_BUF
#define FF_LFN_BUF 255
#endif
#ifndef FF_SFN_BUF
#define FF_SFN_BUF 12
#endif
/* This set of options defines size of file name members in the FILINFO structure
/ which is used to read out directory items. These values should be sufficient for
/ the file names to read. The maximum possible length of the read file name depends
/ on character encoding. When LFN is not enabled, these options have no effect. */
And the revision ID needs bumping:
#define FFCONF_DEF 86604 /* Revision ID */
And fatFs 0.14 has been out for a little while....
Re: bugreport fatfs.
Yes. It was simple "upgrading" the config file.
But the "official" was of upgrading the config file is to start over with a clean copy, and change again what you changed first time.
Well... I don't know what Giovanni changed the first time: I didn't make the changes. It is a lot of work. You have to do a three-way-merge.
And the intent of the demo is that you can hit "make" and build the demo so that you can immediately see things working as a demonstration of the ease of Chibios.
So, yes the fix is easy, but it should be included in Chibios. For now, for me the upgrade to 13c was good.
Might I suggest that both fatfs and chibios restructure the include files?
I think the halconf file should look like:
Then at the end there is a:
There the code reads:
So now.... a project can just uncomment those options it needs and all the others that Chibios expects are simply off or at their default value.
Now, porting a project from chibios X to chibios X+1 suddenly becomes a lot easier.
But the "official" was of upgrading the config file is to start over with a clean copy, and change again what you changed first time.
Well... I don't know what Giovanni changed the first time: I didn't make the changes. It is a lot of work. You have to do a three-way-merge.
And the intent of the demo is that you can hit "make" and build the demo so that you can immediately see things working as a demonstration of the ease of Chibios.
So, yes the fix is easy, but it should be included in Chibios. For now, for me the upgrade to 13c was good.
Might I suggest that both fatfs and chibios restructure the include files?
I think the halconf file should look like:
Code: Select all
//#define HAL_USE_PAL TRUE
//#define HAL_USE_ADC TRUE
//#define HAL_USE_CAN TRUE
Then at the end there is a:
Code: Select all
#include "halconf_default.h"
There the code reads:
Code: Select all
#ifndef HAL_USE_PAL
#define HAL_USE_PAL FALSE
#endif
#ifndef HAL_USE_ADC
#define HAL_USE_ADC FALSE
#endif
#ifndef HAL_USE_CAN
#define HAL_USE_CAN FALSE
#endif
So now.... a project can just uncomment those options it needs and all the others that Chibios expects are simply off or at their default value.
Now, porting a project from chibios X to chibios X+1 suddenly becomes a lot easier.
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: bugreport fatfs.
Hi,
I updated FatFS to version 0.14 in trunk, also updated all ffconf.h files (except community). Could you please confirm that everything is OK before I port everything to stable branches?
Giovanni
I updated FatFS to version 0.14 in trunk, also updated all ffconf.h files (except community). Could you please confirm that everything is OK before I port everything to stable branches?
Giovanni
Who is online
Users browsing this forum: No registered users and 80 guests