stm32duino / FatFs

FatFs is a generic FAT file system module for small embedded systems. The FatFs is written in compliance with ANSI C and completely separated from the disk I/O layer. Therefore it is independent of hardware architecture.
BSD 3-Clause "New" or "Revised" License
91 stars 30 forks source link

integer.h typedefs evaluate to sizes that do not meet requirement #9

Closed JoshLafleur closed 2 years ago

JoshLafleur commented 2 years ago

I compile on gcc-arm-none-eabi and the typedefs in src/integer.h:

/ These types MUST be 32-bit / typedef long LONG; typedef unsigned long DWORD;

compile to 64 bit sizes. Does this create any issues after implementation?

I think it would be smart to define it through standard types so there is no confusion or edit to integer_template.h and have it user defined.

Due to the presence of integer.h in FatFS relative path, any attempt to use a user defined integer.h included by way of -include or -I is overriden by gcc.

fpistm commented 2 years ago

Hi @JoshLafleur This library is provided to support stm32 as stated in the library.properties and is used for the STM32SD library. This is the official FatFS modified by ST. It has simply be integrated as Arduino Library. For STM32 long and unsigned long are 32 bits. Don't know for which target you try to use it anyway we only support STM32.

JoshLafleur commented 2 years ago

Hi @fpistm, I did more digging and see that this is from the Middleware STM32 package. I think my issue is better put there. I am programming for STM32F103C8T6 on the blue pill. I do see though that STM32 long is 32 bits and so is gcc-arm, but then my issue seems deeper than this library.

Thanks

fpistm commented 2 years ago

For STM32F1 it should be correct. And yes you should submit to official ST release: https://github.com/STMicroelectronics/stm32_mw_fatfs

But I don't think there is an issue here as long and unsigned are 32 bits. So I close this one.

JoshLafleur commented 2 years ago

Yes I will go there and work it out from there. Thank you for your help.

The issue is not here as this is for arduino specific toolchain, but thank you for closing it regardless.