I have tried to make new project with ChibiOS from scratch.
I see GPIOv1, GPIOv2 and GPIOv3 folders in LLD, how I can decide which one I should use?
Same question with all folder with versions.
Thanks!
HAL versions
- Giovanni
- Site Admin
- Posts: 14893
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 997 times
Re: HAL versions
Hi,
It depends on which STM32 you are using, see the platform.mk file inside the various STM32 subdirectories, the drivers are listed there.
Giovanni
It depends on which STM32 you are using, see the platform.mk file inside the various STM32 subdirectories, the drivers are listed there.
Giovanni
- Giovanni
- Site Admin
- Posts: 14893
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 997 times
Re: HAL versions
Hi,
Some related questions to this.
Other than the platform.mk for each processor family, which describes which LLD peripheral version to use for that processor,
is there any documentation on what the different are between the versions other than doing diff's on the code?
For example, I have made fixes to SDMMCv1 and want to test these on F407, but unfortunately F407 uses SDIOv1.
When looking at these files, other than SDIO vs SDMMC constant naming and 1 define path in SDIOv1 for F2/F4 (in sdc_lld_wait_transaction_end routine) the sdc_lld.c files seem to be the same (i.e. if the STM32_DMA_ADVANCED seems to cover all the F2/F4 specific define paths).
A thought: would consolidating into a single version with backward compatibility provided using defines for the processor differences, make upgrading easier? I.e. introduce the new code with defines if required, but the legacy code is still supported.
Then earlier version XXXv1, XXXv2 files can be maintained (so that all .ld and other linker project files will still work), and demos can be upgraded to latest version if and when time is available to test them out.
And all new code and fixes is applied to the latest versions, and only ported to earlier versions on an as needed basis.
And taking this a step further, if the changes were done in a backwards compatible fashion, maybe most changes wouldn't need a new version number either? Further simplifying processor to LLD linkages.
Thanks,
Al
Some related questions to this.
Other than the platform.mk for each processor family, which describes which LLD peripheral version to use for that processor,
is there any documentation on what the different are between the versions other than doing diff's on the code?
For example, I have made fixes to SDMMCv1 and want to test these on F407, but unfortunately F407 uses SDIOv1.
When looking at these files, other than SDIO vs SDMMC constant naming and 1 define path in SDIOv1 for F2/F4 (in sdc_lld_wait_transaction_end routine) the sdc_lld.c files seem to be the same (i.e. if the STM32_DMA_ADVANCED seems to cover all the F2/F4 specific define paths).
A thought: would consolidating into a single version with backward compatibility provided using defines for the processor differences, make upgrading easier? I.e. introduce the new code with defines if required, but the legacy code is still supported.
Then earlier version XXXv1, XXXv2 files can be maintained (so that all .ld and other linker project files will still work), and demos can be upgraded to latest version if and when time is available to test them out.
And all new code and fixes is applied to the latest versions, and only ported to earlier versions on an as needed basis.
And taking this a step further, if the changes were done in a backwards compatible fashion, maybe most changes wouldn't need a new version number either? Further simplifying processor to LLD linkages.
Thanks,
Al
- Giovanni
- Site Admin
- Posts: 14893
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 997 times
Re: HAL versions
hi,
Many LLD drivers have a readme with the compatibility list and other notes, not all currently.
SDIO has been forked not just because naming differences, the peripheral is a bit different too. I think there is a reason if they stopped calling it SDIO and it is now SDMMC, they never changed a name in the past.
Giovanni
Many LLD drivers have a readme with the compatibility list and other notes, not all currently.
SDIO has been forked not just because naming differences, the peripheral is a bit different too. I think there is a reason if they stopped calling it SDIO and it is now SDMMC, they never changed a name in the past.
Giovanni
Re: HAL versions
Hi,
OK, now that you mention it I do see note.txt files in ADC and DMA but no others.
And wrt to the SDIO vs SDMMC, that is unfortunate, since the code seems almost identical other than the naming and clearly defined ifdef code paths. I guess I'll find out pretty soon if the SDC abstraction works across SMDDC vs SDIO.
Hopefully the other ideas I mentioned may be of some use one day.
Thanks,
Al
OK, now that you mention it I do see note.txt files in ADC and DMA but no others.
And wrt to the SDIO vs SDMMC, that is unfortunate, since the code seems almost identical other than the naming and clearly defined ifdef code paths. I guess I'll find out pretty soon if the SDC abstraction works across SMDDC vs SDIO.
Hopefully the other ideas I mentioned may be of some use one day.
Thanks,
Al
- Giovanni
- Site Admin
- Posts: 14893
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 997 times
Re: HAL versions
I have started adding those readmes in newer drivers, I have to find time to make a pass on old ones 
The idea is to document there each driver implementation.
Giovanni
The idea is to document there each driver implementation.
Giovanni